fix(ui): various RTL issues (#774)

This commit is contained in:
Mees Frensel
2026-09-03 08:57:01 -04:00
committed by GitHub
parent fa8955a232
commit 6a5dc00a0a
7 changed files with 36 additions and 13 deletions
@@ -22,7 +22,16 @@
toastManager,
type NavbarProps,
} from '@immich/ui';
import { mdiCodeBraces, mdiCompass, mdiCompassOutline, mdiMenu, mdiNote, mdiNoteOutline } from '@mdi/js';
import {
mdiAlignHorizontalLeft,
mdiAlignHorizontalRight,
mdiCodeBraces,
mdiCompass,
mdiCompassOutline,
mdiMenu,
mdiNote,
mdiNoteOutline,
} from '@mdi/js';
import { MediaQuery } from 'svelte/reactivity';
let { children } = $props();
@@ -42,6 +51,12 @@
commandPaletteManager.setTranslations({
command_palette_prompt_default: 'Quickly find components, links, and commands',
});
let dirIsLtr = $state(true);
$effect(() => {
document.dir = dirIsLtr ? 'ltr' : 'rtl';
});
</script>
<AppShell>
@@ -64,6 +79,14 @@
</ControlBarHeader>
<ControlBarOverflow>
<CommandPaletteButton />
<IconButton
shape="round"
variant="ghost"
size="medium"
aria-label="Switch between LTR and RTL text direction"
icon={dirIsLtr ? mdiAlignHorizontalLeft : mdiAlignHorizontalRight}
onclick={() => (dirIsLtr = !dirIsLtr)}
/>
<ThemeSwitcher size="medium" />
</ControlBarOverflow>
</ControlBar>
@@ -34,7 +34,7 @@ This is ~~strike-through~~
This is `code`
#### Headers can also container `code`
#### Headers can also contain `code`
### Link