mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: TimelineAsset visibility (#18395)
* fix: TimelineAsset visibility * fix enum values
This commit is contained in:
parent
895e0eacfe
commit
bdf19ce331
12 changed files with 27 additions and 120 deletions
|
|
@ -6,7 +6,7 @@
|
|||
import type { TimelineAsset } from '$lib/stores/assets-store.svelte';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { AssetVisibility, updateAssets } from '@immich/sdk';
|
||||
import { mdiEyeOffOutline, mdiFolderMoveOutline } from '@mdi/js';
|
||||
import { mdiLockOpenVariantOutline, mdiLockOutline } from '@mdi/js';
|
||||
import { t } from 'svelte-i18n';
|
||||
import type { OnAction, PreAction } from './action';
|
||||
|
||||
|
|
@ -57,5 +57,5 @@
|
|||
<MenuOption
|
||||
onClick={() => toggleLockedVisibility()}
|
||||
text={isLocked ? $t('move_off_locked_folder') : $t('add_to_locked_folder')}
|
||||
icon={isLocked ? mdiFolderMoveOutline : mdiEyeOffOutline}
|
||||
icon={isLocked ? mdiLockOpenVariantOutline : mdiLockOutline}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
import {
|
||||
AssetJobName,
|
||||
AssetTypeEnum,
|
||||
Visibility,
|
||||
AssetVisibility,
|
||||
type AlbumResponseDto,
|
||||
type AssetResponseDto,
|
||||
type PersonResponseDto,
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
const sharedLink = getSharedLink();
|
||||
let isOwner = $derived($user && asset.ownerId === $user?.id);
|
||||
let showDownloadButton = $derived(sharedLink ? sharedLink.allowDownload : !asset.isOffline);
|
||||
let isLocked = $derived(asset.visibility === Visibility.Locked);
|
||||
let isLocked = $derived(asset.visibility === AssetVisibility.Locked);
|
||||
|
||||
// $: showEditorButton =
|
||||
// isOwner &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue