mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(server): visibility column (#17939)
* feat: private view * pr feedback * sql generation * feat: visibility column * fix: set visibility value as the same as the still part after unlinked live photos * fix: test * pr feedback
This commit is contained in:
parent
016d7a6ceb
commit
d33ce13561
90 changed files with 1137 additions and 867 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import FormatBoldMessage from '$lib/components/i18n/format-bold-message.svelte';
|
||||
import type { InterpolationValues } from '$lib/components/i18n/format-message';
|
||||
import { NotificationType, notificationController } from '$lib/components/shared-components/notification/notification';
|
||||
import { notificationController, NotificationType } from '$lib/components/shared-components/notification/notification';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
import { authManager } from '$lib/managers/auth-manager.svelte';
|
||||
import { downloadManager } from '$lib/managers/download-manager.svelte';
|
||||
|
|
@ -15,6 +15,7 @@ import { getFormatter } from '$lib/utils/i18n';
|
|||
import { navigate } from '$lib/utils/navigation';
|
||||
import {
|
||||
addAssetsToAlbum as addAssets,
|
||||
AssetVisibility,
|
||||
createStack,
|
||||
deleteAssets,
|
||||
deleteStacks,
|
||||
|
|
@ -507,7 +508,7 @@ export const toggleArchive = async (asset: AssetResponseDto) => {
|
|||
const data = await updateAsset({
|
||||
id: asset.id,
|
||||
updateAssetDto: {
|
||||
isArchived: !asset.isArchived,
|
||||
visibility: asset.isArchived ? AssetVisibility.Timeline : AssetVisibility.Archive,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -531,7 +532,9 @@ export const archiveAssets = async (assets: AssetResponseDto[], archive: boolean
|
|||
|
||||
try {
|
||||
if (ids.length > 0) {
|
||||
await updateAssets({ assetBulkUpdateDto: { ids, isArchived } });
|
||||
await updateAssets({
|
||||
assetBulkUpdateDto: { ids, visibility: isArchived ? AssetVisibility.Archive : AssetVisibility.Timeline },
|
||||
});
|
||||
}
|
||||
|
||||
for (const asset of assets) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue