From 0a552d2bfada73eee072ac5d036b907d90f24bb6 Mon Sep 17 00:00:00 2001 From: Ben <45583362+ben-basten@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:29:23 -0400 Subject: [PATCH] feat(web): responsive top navigation (#12373) - icons fit in mobile - guarantee the search bar space in all screen sizes - fix the storage bar being too wide --- .../navigation-bar/account-info-panel.svelte | 49 +++++++++---- .../navigation-bar/navigation-bar.svelte | 73 ++++++------------- .../side-bar/storage-space.svelte | 2 +- .../shared-components/theme-button.svelte | 5 +- 4 files changed, 60 insertions(+), 69 deletions(-) diff --git a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte index a23ef6eab2..ef103a9e03 100644 --- a/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte +++ b/web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte @@ -7,13 +7,14 @@ import { preferences, user } from '$lib/stores/user.store'; import { handleError } from '$lib/utils/handle-error'; import { deleteProfileImage, updateMyPreferences, type UserAvatarColor } from '@immich/sdk'; - import { mdiCog, mdiLogout, mdiPencil } from '@mdi/js'; + import { mdiCog, mdiLogout, mdiPencil, mdiWrench } from '@mdi/js'; import { createEventDispatcher } from 'svelte'; import { fade } from 'svelte/transition'; import { NotificationType, notificationController } from '../notification/notification'; import UserAvatar from '../user-avatar.svelte'; import AvatarSelector from './avatar-selector.svelte'; import { t } from 'svelte-i18n'; + import { page } from '$app/stores'; let isShowSelectAvatar = false; @@ -46,7 +47,7 @@ in:fade={{ duration: 100 }} out:fade={{ duration: 100 }} id="account-info-panel" - class="absolute right-[25px] top-[75px] z-[100] w-[360px] rounded-3xl bg-gray-200 shadow-lg dark:border dark:border-immich-dark-gray dark:bg-immich-dark-gray" + 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" use:focusTrap >