From 3fb60aca4f4fde7971924f25d4fd929f7d9f6f04 Mon Sep 17 00:00:00 2001 From: Daniele Ricci Date: Wed, 16 Aug 2023 20:25:07 +0200 Subject: [PATCH 1/4] chore(web): better explain what the thumbnails type are for (#3724) --- .../settings/thumbnail/thumbnail-settings.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/lib/components/admin-page/settings/thumbnail/thumbnail-settings.svelte b/web/src/lib/components/admin-page/settings/thumbnail/thumbnail-settings.svelte index 2bfce8e8d..5370611d9 100644 --- a/web/src/lib/components/admin-page/settings/thumbnail/thumbnail-settings.svelte +++ b/web/src/lib/components/admin-page/settings/thumbnail/thumbnail-settings.svelte @@ -79,8 +79,8 @@
Date: Wed, 16 Aug 2023 14:25:39 -0400 Subject: [PATCH 2/4] feat(web): remove and delete from album (#3725) --- .../photos-page/actions/delete-assets.svelte | 8 +++++++- .../photos-page/actions/remove-from-album.svelte | 12 +++++++++--- web/src/routes/(user)/albums/[albumId]/+page.svelte | 10 +++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/web/src/lib/components/photos-page/actions/delete-assets.svelte b/web/src/lib/components/photos-page/actions/delete-assets.svelte index 6283d6b4d..7aa83b78f 100644 --- a/web/src/lib/components/photos-page/actions/delete-assets.svelte +++ b/web/src/lib/components/photos-page/actions/delete-assets.svelte @@ -9,8 +9,10 @@ import { OnAssetDelete, getAssetControlContext } from '../asset-select-control-bar.svelte'; import ConfirmDialogue from '$lib/components/shared-components/confirm-dialogue.svelte'; import { handleError } from '../../../utils/handle-error'; + import MenuOption from '../../shared-components/context-menu/menu-option.svelte'; export let onAssetDelete: OnAssetDelete; + export let menuItem = false; const { getAssets, clearSelect } = getAssetControlContext(); let isShowConfirmation = false; @@ -46,7 +48,11 @@ }; - (isShowConfirmation = true)} /> +{#if menuItem} + (isShowConfirmation = true)} /> +{:else} + (isShowConfirmation = true)} /> +{/if} {#if isShowConfirmation} import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte'; + import ConfirmDialogue from '$lib/components/shared-components/confirm-dialogue.svelte'; import { NotificationType, notificationController, } from '$lib/components/shared-components/notification/notification'; import { AlbumResponseDto, api } from '@api'; import DeleteOutline from 'svelte-material-icons/DeleteOutline.svelte'; + import MenuOption from '../../shared-components/context-menu/menu-option.svelte'; import { getAssetControlContext } from '../asset-select-control-bar.svelte'; - import ConfirmDialogue from '$lib/components/shared-components/confirm-dialogue.svelte'; export let album: AlbumResponseDto; export let onRemove: ((assetIds: string[]) => void) | undefined = undefined; + export let menuItem = false; const { getAssets, clearSelect } = getAssetControlContext(); @@ -48,11 +50,15 @@ }; - (isShowConfirmation = true)} logo={DeleteOutline} /> +{#if menuItem} + (isShowConfirmation = true)} /> +{:else} + (isShowConfirmation = true)} /> +{/if} {#if isShowConfirmation} (isShowConfirmation = false)} diff --git a/web/src/routes/(user)/albums/[albumId]/+page.svelte b/web/src/routes/(user)/albums/[albumId]/+page.svelte index 8922ab073..f53b89df0 100644 --- a/web/src/routes/(user)/albums/[albumId]/+page.svelte +++ b/web/src/routes/(user)/albums/[albumId]/+page.svelte @@ -7,6 +7,7 @@ import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte'; import AddToAlbum from '$lib/components/photos-page/actions/add-to-album.svelte'; import CreateSharedLink from '$lib/components/photos-page/actions/create-shared-link.svelte'; + import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; import FavoriteAction from '$lib/components/photos-page/actions/favorite-action.svelte'; import RemoveFromAlbum from '$lib/components/photos-page/actions/remove-from-album.svelte'; @@ -287,14 +288,17 @@ - {#if isOwned || isAllUserOwned} - handleRemoveAssets(assetIds)} /> - {/if} {#if isAllUserOwned} {/if} + {#if isOwned || isAllUserOwned} + handleRemoveAssets(assetIds)} /> + {/if} + {#if isAllUserOwned} + assetStore.removeAsset(assetId)} /> + {/if} {:else} From 8568ec838a84fe8577fe38862c4babddd91c0ddd Mon Sep 17 00:00:00 2001 From: Daniele Ricci Date: Wed, 16 Aug 2023 20:27:57 +0200 Subject: [PATCH 3/4] fix(web): Fix label for attribute (#3726) --- .../settings/storage-template/storage-template-settings.svelte | 2 +- web/src/lib/components/album-page/edit-description-modal.svelte | 2 +- web/src/lib/components/forms/api-key-form.svelte | 2 +- web/src/lib/components/forms/api-key-secret.svelte | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/lib/components/admin-page/settings/storage-template/storage-template-settings.svelte b/web/src/lib/components/admin-page/settings/storage-template/storage-template-settings.svelte index bda0b61e6..893736e98 100644 --- a/web/src/lib/components/admin-page/settings/storage-template/storage-template-settings.svelte +++ b/web/src/lib/components/admin-page/settings/storage-template/storage-template-settings.svelte @@ -175,7 +175,7 @@
- +