diff --git a/web/package-lock.json b/web/package-lock.json index 634c8a5591..872eceaa81 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -11,7 +11,6 @@ "axios": "^0.27.2", "copy-image-clipboard": "^2.1.2", "handlebars": "^4.7.7", - "justified-layout": "^4.1.0", "leaflet": "^1.9.3", "leaflet.markercluster": "^1.5.3", "lodash-es": "^4.17.21", @@ -9052,11 +9051,6 @@ "node": ">=6" } }, - "node_modules/justified-layout": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/justified-layout/-/justified-layout-4.1.0.tgz", - "integrity": "sha512-M5FimNMXgiOYerVRGsXZ2YK9YNCaTtwtYp7Hb2308U1Q9TXXHx5G0p08mcVR5O53qf8bWY4NJcPBxE6zuayXSg==" - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -18154,11 +18148,6 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, - "justified-layout": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/justified-layout/-/justified-layout-4.1.0.tgz", - "integrity": "sha512-M5FimNMXgiOYerVRGsXZ2YK9YNCaTtwtYp7Hb2308U1Q9TXXHx5G0p08mcVR5O53qf8bWY4NJcPBxE6zuayXSg==" - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte index 127e481fcb..115f48d981 100644 --- a/web/src/lib/components/album-page/album-viewer.svelte +++ b/web/src/lib/components/album-page/album-viewer.svelte @@ -27,7 +27,7 @@ import DownloadAction from '../photos-page/actions/download-action.svelte'; import RemoveFromAlbum from '../photos-page/actions/remove-from-album.svelte'; import AssetSelectControlBar from '../photos-page/asset-select-control-bar.svelte'; - import CircleAvatar from '../shared-components/circle-avatar.svelte'; + import UserAvatar from '../shared-components/user-avatar.svelte'; import ContextMenu from '../shared-components/context-menu/context-menu.svelte'; import MenuOption from '../shared-components/context-menu/menu-option.svelte'; import ControlAppBar from '../shared-components/control-app-bar.svelte'; @@ -478,13 +478,11 @@ {/if} {#if album.shared} -
- {#each album.sharedUsers as user} - {#key user.id} - - (isShowShareInfoModal = true)} /> - - {/key} +
+ {#each album.sharedUsers as user (user.id)} + {/each} {/key} @@ -95,7 +95,7 @@ >✓ {:else} - + {/if}
diff --git a/web/src/lib/components/shared-components/circle-avatar.svelte b/web/src/lib/components/shared-components/circle-avatar.svelte deleted file mode 100644 index d71aa12fff..0000000000 --- a/web/src/lib/components/shared-components/circle-avatar.svelte +++ /dev/null @@ -1,66 +0,0 @@ - - -{#await getUserAvatar()} - -{:catch} - -{/await} 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 1fc2ccc0b2..719ed42deb 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 @@ -1,78 +1,45 @@
-
-
-
- {#if user.profileImagePath} - profile-img (showProfilePictureFallback = false)} - /> - {/if} - {#if showProfilePictureFallback} -
- {getFirstLetter(user.firstName)}{getFirstLetter(user.lastName)} -
- {/if} -
+
+ + +
+

+ {user.firstName} + {user.lastName} +

+

{user.email}

-

- {user.firstName} - {user.lastName} -

- -

{user.email}

- -
- -
+
diff --git a/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte b/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte index c3ec2a3794..f7eac2bf2d 100644 --- a/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte +++ b/web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte @@ -2,7 +2,6 @@ import { goto } from '$app/navigation'; import { page } from '$app/stores'; import { clickOutside } from '$lib/utils/click-outside'; - import { imageLoad } from '$lib/utils/image-load'; import { createEventDispatcher } from 'svelte'; import { fade, fly } from 'svelte/transition'; import TrayArrowUp from 'svelte-material-icons/TrayArrowUp.svelte'; @@ -16,21 +15,15 @@ import Magnify from 'svelte-material-icons/Magnify.svelte'; import IconButton from '$lib/components/elements/buttons/icon-button.svelte'; import Cog from 'svelte-material-icons/Cog.svelte'; + import UserAvatar from '../user-avatar.svelte'; export let user: UserResponseDto; export let showUploadButton = true; let shouldShowAccountInfo = false; let shouldShowAccountInfoPanel = false; - // Show fallback while loading profile picture and hide when image loads. - let showProfilePictureFallback = true; - const dispatch = createEventDispatcher(); - const getFirstLetter = (text?: string) => { - return text?.charAt(0).toUpperCase(); - }; - const logOut = async () => { const { data } = await api.authenticationApi.logout(); @@ -116,27 +109,14 @@
(shouldShowAccountInfoPanel = false)}> {#if shouldShowAccountInfo && !shouldShowAccountInfoPanel} diff --git a/web/src/lib/components/shared-components/user-avatar.svelte b/web/src/lib/components/shared-components/user-avatar.svelte new file mode 100644 index 0000000000..93c3d54a94 --- /dev/null +++ b/web/src/lib/components/shared-components/user-avatar.svelte @@ -0,0 +1,79 @@ + + + + +
+ {#if user.profileImagePath} + Profile image of {title} (showFallback = false)} + /> + {/if} + {#if showFallback} + + {(user.firstName[0] + user.lastName[0]).toUpperCase()} + + {/if} +
diff --git a/web/src/lib/components/user-settings-page/partner-selection-modal.svelte b/web/src/lib/components/user-settings-page/partner-selection-modal.svelte index f0652ae6cb..2446883e7f 100644 --- a/web/src/lib/components/user-settings-page/partner-selection-modal.svelte +++ b/web/src/lib/components/user-settings-page/partner-selection-modal.svelte @@ -1,7 +1,7 @@