High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(web): user settings styling (#25775)
Mees Frensel0273dcb0cfe8
diff --git a/web/src/lib/components/user-settings-page/PinCodeChangeForm.svelte b/web/src/lib/components/user-settings-page/PinCodeChangeForm.svelteindex 2edb8fa606..1323380b7e 100644--- a/web/src/lib/components/user-settings-page/PinCodeChangeForm.svelte+++ b/web/src/lib/components/user-settings-page/PinCodeChangeForm.svelte@@ -5,7 +5,6 @@import { changePinCode } from '@immich/sdk';import { Button, Heading, modalManager, Text, toastManager } from '@immich/ui';import { t } from 'svelte-i18n';- import { fade } from 'svelte/transition';let currentPinCode = $state('');let newPinCode = $state('');@@ -38,27 +37,23 @@};</script>-<section class="my-4">- <div in:fade={{ duration: 200 }}>- <form autocomplete="off" onsubmit={handleSubmit} class="mt-6">- <div class="flex flex-col gap-6 place-items-center place-content-center">- <Heading>{$t('change_pin_code')}</Heading>- <PinCodeInput label={$t('current_pin_code')} bind:value={currentPinCode} tabindexStart={1} pinLength={6} />- <PinCodeInput label={$t('new_pin_code')} bind:value={newPinCode} tabindexStart={7} pinLength={6} />- <PinCodeInput label={$t('confirm_new_pin_code')} bind:value={confirmPinCode} tabindexStart={13} pinLength={6} />- <button type="button" onclick={() => modalManager.show(PinCodeResetModal, {})}>- <Text color="muted" class="underline" size="small">{$t('forgot_pin_code_question')}</Text>- </button>- </div>+<form autocomplete="off" onsubmit={handleSubmit}>+ <div class="flex flex-col gap-6 place-items-center place-content-center">+ <Heading>{$t('change_pin_code')}</Heading>+ <PinCodeInput label={$t('current_pin_code')} bind:value={currentPinCode} tabindexStart={1} pinLength={6} />+ <PinCodeInput label={$t('new_pin_code')} bind:value={newPinCode} tabindexStart={7} pinLength={6} />+ <PinCodeInput label={$t('confirm_new_pin_code')} bind:value={confirmPinCode} tabindexStart={13} pinLength={6} />+ <button type="button" onclick={() => modalManager.show(PinCodeResetModal, {})}>+ <Text color="muted" class="underline" size="small">{$t('forgot_pin_code_question')}</Text>+ </button>+ </div>- <div class="flex justify-end gap-2 mt-4">- <Button shape="round" color="secondary" type="button" size="small" onclick={resetForm}>- {$t('clear')}- </Button>- <Button shape="round" type="submit" size="small" loading={isLoading} disabled={!canSubmit}>- {$t('save')}- </Button>- </div>- </form>+ <div class="flex justify-end gap-2 mt-4">+ <Button shape="round" color="secondary" type="button" size="small" onclick={resetForm}>+ {$t('clear')}+ </Button>+ <Button shape="round" type="submit" size="small" loading={isLoading} disabled={!canSubmit}>+ {$t('save')}+ </Button></div>-</section>+</form>diff --git a/web/src/lib/components/user-settings-page/PinCodeSettings.svelte b/web/src/lib/components/user-settings-page/PinCodeSettings.svelteindex 1d18bc2448..53530b694d 100644--- a/web/src/lib/components/user-settings-page/PinCodeSettings.svelte+++ b/web/src/lib/components/user-settings-page/PinCodeSettings.svelte@@ -20,7 +20,7 @@<OnEvents {onUserPinCodeReset} />-<section>+<section class="my-4 sm:ms-8">{#if hasPinCode}<div in:fade={{ duration: 200 }}><PinCodeChangeForm />diff --git a/web/src/lib/components/user-settings-page/app-settings.svelte b/web/src/lib/components/user-settings-page/app-settings.svelteindex 5c3b59fafe..3e82b76418 100644--- a/web/src/lib/components/user-settings-page/app-settings.svelte+++ b/web/src/lib/components/user-settings-page/app-settings.svelte@@ -59,7 +59,7 @@<section class="my-4"><div in:fade={{ duration: 500 }}>- <div class="ms-8 mt-4 flex flex-col gap-6">+ <div class="sm:ms-8 flex flex-col gap-6"><Field label={$t('theme_selection')} description={$t('theme_selection_description')}><Switch checked={themeManager.theme.system} onCheckedChange={(checked) => themeManager.setSystem(checked)} /></Field>diff --git a/web/src/lib/components/user-settings-page/change-password-settings.svelte b/web/src/lib/components/user-settings-page/change-password-settings.svelteindex 8165f2e508..2579862056 100644--- a/web/src/lib/components/user-settings-page/change-password-settings.svelte+++ b/web/src/lib/components/user-settings-page/change-password-settings.svelte@@ -23,7 +23,7 @@<section class="my-4"><div in:fade={{ duration: 500 }}><form autocomplete="off" {onsubmit}>- <div class="ms-4 mt-4 flex flex-col gap-4">+ <div class="sm:ms-8 flex flex-col gap-4"><Field label={$t('password')} required><PasswordInput bind:value={password} autocomplete="current-password" /></Field>diff --git a/web/src/lib/components/user-settings-page/device-list.svelte b/web/src/lib/components/user-settings-page/device-list.svelteindex 41f1e3b790..6bc94672df 100644--- a/web/src/lib/components/user-settings-page/device-list.svelte+++ b/web/src/lib/components/user-settings-page/device-list.svelte@@ -3,6 +3,7 @@import { deleteAllSessions, deleteSession, getSessions, type SessionResponseDto } from '@immich/sdk';import { Button, modalManager, Text, toastManager } from '@immich/ui';import { t } from 'svelte-i18n';+ import { fade } from 'svelte/transition';import DeviceCard from './device-card.svelte';interface Props {@@ -50,33 +51,39 @@</script><section class="my-4">- {#if currentSession}- <div class="mb-6">- <Text class="mb-2" fontWeight="medium" size="tiny" color="primary">- {$t('current_device')}- </Text>- <DeviceCard session={currentSession} />- </div>- {/if}- {#if otherSessions.length > 0}- <div class="mb-6">- <Text class="mb-2" fontWeight="medium" size="tiny" color="primary">- {$t('other_devices')}- </Text>- {#each otherSessions as session, index (session.id)}- <DeviceCard {session} onDelete={() => handleDelete(session)} />- {#if index !== otherSessions.length - 1}- <hr class="my-3" />- {/if}- {/each}- </div>+ <div in:fade={{ duration: 500 }}>+ <div class="sm:ms-8 flex flex-col gap-4">+ {#if currentSession}+ <div class="mb-6">+ <Text class="mb-2" fontWeight="medium" size="tiny" color="primary">+ {$t('current_device')}+ </Text>+ <DeviceCard session={currentSession} />+ </div>+ {/if}+ {#if otherSessions.length > 0}+ <div class="mb-6">+ <Text class="mb-2" fontWeight="medium" size="tiny" color="primary">+ {$t('other_devices')}+ </Text>+ {#each otherSessions as session, index (session.id)}+ <DeviceCard {session} onDelete={() => handleDelete(session)} />+ {#if index !== otherSessions.length - 1}+ <hr class="my-3" />+ {/if}+ {/each}+ </div>- <div class="my-3">- <hr />- </div>+ <div class="my-3">+ <hr />+ </div>- <div class="flex justify-end">- <Button shape="round" color="danger" size="small" onclick={handleDeleteAll}>{$t('log_out_all_devices')}</Button>+ <div class="flex justify-end">+ <Button shape="round" color="danger" size="small" onclick={handleDeleteAll}+ >{$t('log_out_all_devices')}</Button+ >+ </div>+ {/if}</div>- {/if}+ </div></section>diff --git a/web/src/lib/components/user-settings-page/download-settings.svelte b/web/src/lib/components/user-settings-page/download-settings.svelteindex 79d6ba6a1d..78e97ffd11 100644--- a/web/src/lib/components/user-settings-page/download-settings.svelte+++ b/web/src/lib/components/user-settings-page/download-settings.svelte@@ -39,7 +39,7 @@<section class="my-4"><div in:fade={{ duration: 500 }}><form autocomplete="off" {onsubmit}>- <div class="ms-4 mt-4 flex flex-col gap-4">+ <div class="sm:ms-8 flex flex-col gap-4"><SettingInputFieldinputType={SettingInputFieldType.NUMBER}label={$t('archive_size')}diff --git a/web/src/lib/components/user-settings-page/feature-settings.svelte b/web/src/lib/components/user-settings-page/feature-settings.svelteindex 58723781ef..0ce2e97840 100644--- a/web/src/lib/components/user-settings-page/feature-settings.svelte+++ b/web/src/lib/components/user-settings-page/feature-settings.svelte@@ -67,9 +67,9 @@<section class="my-4"><div in:fade={{ duration: 500 }}><form autocomplete="off" {onsubmit}>- <div class="ms-4 mt-4 flex flex-col">+ <div class="sm:ms-4 md:ms-8 flex flex-col"><SettingAccordion key="albums" title={$t('albums')} subtitle={$t('albums_feature_description')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('albums_default_sort_order')} description={$t('albums_default_sort_order_description')}><Selectoptions={[@@ -83,7 +83,7 @@</SettingAccordion><SettingAccordion key="folders" title={$t('folders')} subtitle={$t('folders_feature_description')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('enable')}><Switch bind:checked={foldersEnabled} /></Field>@@ -97,7 +97,7 @@</SettingAccordion><SettingAccordion key="memories" title={$t('time_based_memories')} subtitle={$t('photos_from_previous_years')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('enable')}><Switch bind:checked={memoriesEnabled} /></Field>@@ -109,7 +109,7 @@</SettingAccordion><SettingAccordion key="people" title={$t('people')} subtitle={$t('people_feature_description')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('enable')}><Switch bind:checked={peopleEnabled} /></Field>@@ -123,7 +123,7 @@</SettingAccordion><SettingAccordion key="rating" title={$t('rating')} subtitle={$t('rating_description')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('enable')}><Switch bind:checked={ratingsEnabled} /></Field>@@ -131,7 +131,7 @@</SettingAccordion><SettingAccordion key="shared-links" title={$t('shared_links')} subtitle={$t('shared_links_description')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('enable')}><Switch bind:checked={sharedLinksEnabled} /></Field>@@ -145,7 +145,7 @@</SettingAccordion><SettingAccordion key="tags" title={$t('tags')} subtitle={$t('tag_feature_description')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('enable')}><Switch bind:checked={tagsEnabled} /></Field>@@ -159,7 +159,7 @@</SettingAccordion><SettingAccordion key="cast" title={$t('cast')} subtitle={$t('cast_description')}>- <div class="ms-4 mt-6 flex flex-col gap-4">+ <div class="sm:ms-4 mt-4 flex flex-col gap-4"><Field label={$t('gcast_enabled')} description={$t('gcast_enabled_description')}><Switch bind:checked={gCastEnabled} /></Field>diff --git a/web/src/lib/components/user-settings-page/notifications-settings.svelte b/web/src/lib/components/user-settings-page/notifications-settings.svelteindex 8762a790ce..00bd150b33 100644--- a/web/src/lib/components/user-settings-page/notifications-settings.svelte+++ b/web/src/lib/components/user-settings-page/notifications-settings.svelte@@ -42,7 +42,7 @@<section class="my-4"><div in:fade={{ duration: 500 }}><form autocomplete="off" {onsubmit}>- <div class="ms-4 mt-4 flex flex-col gap-6">+ <div class="sm:ms-8 flex flex-col gap-6"><Field label={$t('enable')} description={$t('notification_toggle_setting_description')}><Switch bind:checked={emailNotificationsEnabled} /></Field>diff --git a/web/src/lib/components/user-settings-page/oauth-settings.svelte b/web/src/lib/components/user-settings-page/oauth-settings.svelteindex f881c4cd65..f711a8b02d 100644--- a/web/src/lib/components/user-settings-page/oauth-settings.svelte+++ b/web/src/lib/components/user-settings-page/oauth-settings.svelte@@ -45,7 +45,7 @@<section class="my-4"><div in:fade={{ duration: 500 }}>- <div class="flex justify-end">+ <div class="sm:ms-8 flex justify-end">{#if loading}<div class="flex place-content-center place-items-center"><LoadingSpinner />diff --git a/web/src/lib/components/user-settings-page/user-api-key-list.svelte b/web/src/lib/components/user-settings-page/user-api-key-list.svelteindex 62c093f289..b2b428c86e 100644--- a/web/src/lib/components/user-settings-page/user-api-key-list.svelte+++ b/web/src/lib/components/user-settings-page/user-api-key-list.svelte@@ -33,7 +33,7 @@<OnEvents {onApiKeyCreate} {onApiKeyUpdate} {onApiKeyDelete} /><section class="my-4">- <div class="flex flex-col gap-2" in:fade={{ duration: 500 }}>+ <div class="sm:ms-8 flex flex-col gap-2" in:fade={{ duration: 500 }}><div class="mb-2 flex justify-end"><Button leadingIcon={Create.icon} shape="round" size="small" onclick={() => Create.onAction(Create)}>{Create.title}diff --git a/web/src/lib/components/user-settings-page/user-profile-settings.svelte b/web/src/lib/components/user-settings-page/user-profile-settings.svelteindex 2fb2be8107..4f909a141d 100644--- a/web/src/lib/components/user-settings-page/user-profile-settings.svelte+++ b/web/src/lib/components/user-settings-page/user-profile-settings.svelte@@ -33,7 +33,7 @@<section class="my-4"><div in:fade={{ duration: 500 }}><form autocomplete="off" onsubmit={preventDefault(bubble('submit'))}>- <div class="ms-4 mt-4 flex flex-col gap-4">+ <div class="sm:ms-8 flex flex-col gap-4"><Field label={$t('user_id')} disabled><Input bind:value={editedUser.id} /></Field>diff --git a/web/src/lib/components/user-settings-page/user-purchase-settings.svelte b/web/src/lib/components/user-settings-page/user-purchase-settings.svelteindex 5aeed92d41..5635cb0fa7 100644--- a/web/src/lib/components/user-settings-page/user-purchase-settings.svelte+++ b/web/src/lib/components/user-settings-page/user-purchase-settings.svelte@@ -105,7 +105,7 @@</script><section class="my-4">- <div in:fade={{ duration: 500 }}>+ <div class="sm:ms-8" in:fade={{ duration: 500 }}>{#if $isPurchased}<!-- BADGE TOGGLE --><div class="mb-4">diff --git a/web/src/lib/components/user-settings-page/user-usage-statistic.svelte b/web/src/lib/components/user-settings-page/user-usage-statistic.svelteindex 423a581e19..817c8933a6 100644--- a/web/src/lib/components/user-settings-page/user-usage-statistic.svelte+++ b/web/src/lib/components/user-settings-page/user-usage-statistic.svelte@@ -65,7 +65,7 @@</TableRow>{/snippet}-<section class="my-6 w-full">+<section class="my-4 w-full"><Heading size="tiny">{$t('photos_and_videos')}</Heading><Table striped spacing="small" class="mt-4" size="small"><TableHeader>