Skip to content

Commit f298087

Browse files
committed
chore: reverting changes to icons in nav and account info panel
1 parent 26c5661 commit f298087

File tree

2 files changed

+36
-27
lines changed

2 files changed

+36
-27
lines changed

web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<script lang="ts">
2+
import { page } from '$app/state';
23
import { focusTrap } from '$lib/actions/focus-trap';
4+
import Button from '$lib/components/elements/buttons/button.svelte';
35
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
6+
import Icon from '$lib/components/elements/icon.svelte';
47
import { AppRoute } from '$lib/constants';
58
import { preferences, user } from '$lib/stores/user.store';
69
import { handleError } from '$lib/utils/handle-error';
@@ -11,14 +14,13 @@
1114
import { NotificationType, notificationController } from '../notification/notification';
1215
import UserAvatar from '../user-avatar.svelte';
1316
import AvatarSelector from './avatar-selector.svelte';
14-
import ThemeButton from '$lib/components/shared-components/theme-button.svelte';
15-
import { Button } from '@immich/ui';
1617
1718
interface Props {
1819
onLogout: () => void;
20+
onClose?: () => void;
1921
}
2022
21-
let { onLogout }: Props = $props();
23+
let { onLogout, onClose = () => {} }: Props = $props();
2224
2325
let isShowSelectAvatar = $state(false);
2426
@@ -46,11 +48,11 @@
4648
in:fade={{ duration: 100 }}
4749
out:fade={{ duration: 100 }}
4850
id="account-info-panel"
49-
class="absolute right-[25px] top-[75px] z-[100] w-[min(360px,100vw-50px)] rounded-3xl px-4 bg-gray-200 shadow-lg dark:border dark:border-immich-dark-gray dark:bg-immich-dark-gray"
51+
class="absolute right-[25px] top-[75px] z-[100] w-[min(360px,100vw-50px)] rounded-3xl bg-gray-200 shadow-lg dark:border dark:border-immich-dark-gray dark:bg-immich-dark-gray"
5052
use:focusTrap
5153
>
5254
<div
53-
class="mt-4 flex flex-col items-center justify-center gap-4 rounded-3xl bg-white p-4 dark:bg-immich-dark-primary/10"
55+
class="mx-4 mt-4 flex flex-col items-center justify-center gap-4 rounded-3xl bg-white p-4 dark:bg-immich-dark-primary/10"
5456
>
5557
<div class="relative">
5658
<UserAvatar user={$user} size="xl" />
@@ -70,40 +72,44 @@
7072
<p class="text-center text-lg font-medium text-immich-primary dark:text-immich-dark-primary">
7173
{$user.name}
7274
</p>
73-
<p class="text-center text-sm text-gray-500 dark:text-immich-dark-fg">{$user.email}</p>
75+
<p class="text-sm text-gray-500 dark:text-immich-dark-fg">{$user.email}</p>
7476
</div>
7577

7678
<div class="flex flex-col gap-1">
77-
<Button
78-
href={AppRoute.USER_SETTINGS}
79-
leadingIcon={mdiCog}
80-
variant="outline"
81-
color="secondary"
82-
size="small"
83-
shape="round"
84-
>
85-
{$t('account_settings')}
79+
<Button href={AppRoute.USER_SETTINGS} onclick={onClose} color="dark-gray" size="sm" shadow={false} border>
80+
<div class="flex place-content-center place-items-center text-center gap-2 px-2">
81+
<Icon path={mdiCog} size="18" ariaHidden />
82+
{$t('account_settings')}
83+
</div>
8684
</Button>
8785
{#if $user.isAdmin}
8886
<Button
8987
href={AppRoute.ADMIN_USER_MANAGEMENT}
90-
leadingIcon={mdiWrench}
91-
variant="outline"
92-
color="secondary"
93-
size="small"
94-
shape="round"
88+
onclick={onClose}
89+
color="dark-gray"
90+
size="sm"
91+
shadow={false}
92+
border
93+
aria-current={page.url.pathname.includes('/admin') ? 'page' : undefined}
9594
>
96-
{$t('administration')}
95+
<div class="flex place-content-center place-items-center text-center gap-2 px-2">
96+
<Icon path={mdiWrench} size="18" ariaHidden />
97+
{$t('administration')}
98+
</div>
9799
</Button>
98100
{/if}
99101
</div>
100102
</div>
101103

102-
<div class="mb-4 mt-2 flex flex-row justify-center gap-1">
103-
<ThemeButton padding="2" />
104-
<Button variant="ghost" color="secondary" leadingIcon={mdiLogout} onclick={onLogout}>
105-
{$t('sign_out')}
106-
</Button>
104+
<div class="mb-4 flex flex-col">
105+
<button
106+
type="button"
107+
class="flex w-full place-content-center place-items-center gap-2 py-3 font-medium text-gray-500 hover:bg-immich-primary/10 dark:text-gray-300"
108+
onclick={onLogout}
109+
>
110+
<Icon path={mdiLogout} size={24} />
111+
{$t('sign_out')}</button
112+
>
107113
</div>
108114
</div>
109115

web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import { onMount } from 'svelte';
2121
import { t } from 'svelte-i18n';
2222
import { fade } from 'svelte/transition';
23+
import ThemeButton from '../theme-button.svelte';
2324
import UserAvatar from '../user-avatar.svelte';
2425
import AccountInfoPanel from './account-info-panel.svelte';
2526
import { isSidebarOpen } from '$lib/stores/side-bar.svelte';
@@ -92,7 +93,7 @@
9293
{/if}
9394
</div>
9495

95-
<section class="flex place-items-center justify-end gap-1 w-full sm:w-auto">
96+
<section class="flex place-items-center justify-end gap-1 md:gap-2 w-full sm:w-auto">
9697
{#if $featureFlags.search}
9798
<IconButton
9899
color="secondary"
@@ -130,6 +131,8 @@
130131
/>
131132
{/if}
132133

134+
<ThemeButton padding="2" />
135+
133136
<div
134137
use:clickOutside={{
135138
onEscape: () => (shouldShowHelpPanel = false),

0 commit comments

Comments
 (0)