|
|
|
@@ -8,6 +8,7 @@
|
|
|
|
import AddToStackAction from '$lib/components/asset-viewer/actions/add-to-stack-action.svelte';
|
|
|
|
import AddToStackAction from '$lib/components/asset-viewer/actions/add-to-stack-action.svelte';
|
|
|
|
import ArchiveAction from '$lib/components/asset-viewer/actions/archive-action.svelte';
|
|
|
|
import ArchiveAction from '$lib/components/asset-viewer/actions/archive-action.svelte';
|
|
|
|
import DeleteAction from '$lib/components/asset-viewer/actions/delete-action.svelte';
|
|
|
|
import DeleteAction from '$lib/components/asset-viewer/actions/delete-action.svelte';
|
|
|
|
|
|
|
|
import EditAction from '$lib/components/asset-viewer/actions/edit-action.svelte';
|
|
|
|
import KeepThisDeleteOthersAction from '$lib/components/asset-viewer/actions/keep-this-delete-others.svelte';
|
|
|
|
import KeepThisDeleteOthersAction from '$lib/components/asset-viewer/actions/keep-this-delete-others.svelte';
|
|
|
|
import RatingAction from '$lib/components/asset-viewer/actions/rating-action.svelte';
|
|
|
|
import RatingAction from '$lib/components/asset-viewer/actions/rating-action.svelte';
|
|
|
|
import RemoveAssetFromStack from '$lib/components/asset-viewer/actions/remove-asset-from-stack.svelte';
|
|
|
|
import RemoveAssetFromStack from '$lib/components/asset-viewer/actions/remove-asset-from-stack.svelte';
|
|
|
|
@@ -20,7 +21,7 @@
|
|
|
|
import UnstackAction from '$lib/components/asset-viewer/actions/unstack-action.svelte';
|
|
|
|
import UnstackAction from '$lib/components/asset-viewer/actions/unstack-action.svelte';
|
|
|
|
import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte';
|
|
|
|
import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte';
|
|
|
|
import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte';
|
|
|
|
import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte';
|
|
|
|
import { AppRoute } from '$lib/constants';
|
|
|
|
import { AppRoute, ProjectionType } from '$lib/constants';
|
|
|
|
import { featureFlagsManager } from '$lib/managers/feature-flags-manager.svelte';
|
|
|
|
import { featureFlagsManager } from '$lib/managers/feature-flags-manager.svelte';
|
|
|
|
import { getGlobalActions } from '$lib/services/app.service';
|
|
|
|
import { getGlobalActions } from '$lib/services/app.service';
|
|
|
|
import { getAssetActions, handleReplaceAsset } from '$lib/services/asset.service';
|
|
|
|
import { getAssetActions, handleReplaceAsset } from '$lib/services/asset.service';
|
|
|
|
@@ -72,7 +73,7 @@
|
|
|
|
onUndoDelete?: OnUndoDelete;
|
|
|
|
onUndoDelete?: OnUndoDelete;
|
|
|
|
onRunJob: (name: AssetJobName) => void;
|
|
|
|
onRunJob: (name: AssetJobName) => void;
|
|
|
|
onPlaySlideshow: () => void;
|
|
|
|
onPlaySlideshow: () => void;
|
|
|
|
// onEdit: () => void;
|
|
|
|
onEdit: () => void;
|
|
|
|
onClose?: () => void;
|
|
|
|
onClose?: () => void;
|
|
|
|
playOriginalVideo: boolean;
|
|
|
|
playOriginalVideo: boolean;
|
|
|
|
setPlayOriginalVideo: (value: boolean) => void;
|
|
|
|
setPlayOriginalVideo: (value: boolean) => void;
|
|
|
|
@@ -92,7 +93,7 @@
|
|
|
|
onRunJob,
|
|
|
|
onRunJob,
|
|
|
|
onPlaySlideshow,
|
|
|
|
onPlaySlideshow,
|
|
|
|
onClose,
|
|
|
|
onClose,
|
|
|
|
// onEdit,
|
|
|
|
onEdit,
|
|
|
|
playOriginalVideo = false,
|
|
|
|
playOriginalVideo = false,
|
|
|
|
setPlayOriginalVideo,
|
|
|
|
setPlayOriginalVideo,
|
|
|
|
}: Props = $props();
|
|
|
|
}: Props = $props();
|
|
|
|
@@ -116,18 +117,15 @@
|
|
|
|
$derived(getAssetActions($t, asset));
|
|
|
|
$derived(getAssetActions($t, asset));
|
|
|
|
const sharedLink = getSharedLink();
|
|
|
|
const sharedLink = getSharedLink();
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Enable when edits are ready for release
|
|
|
|
const editorDisabled = $derived(
|
|
|
|
// let showEditorButton = $derived(
|
|
|
|
!isOwner ||
|
|
|
|
// isOwner &&
|
|
|
|
asset.type !== AssetTypeEnum.Image ||
|
|
|
|
// asset.type === AssetTypeEnum.Image &&
|
|
|
|
asset.livePhotoVideoId ||
|
|
|
|
// !(
|
|
|
|
(asset.exifInfo?.projectionType === ProjectionType.EQUIRECTANGULAR &&
|
|
|
|
// asset.exifInfo?.projectionType === ProjectionType.EQUIRECTANGULAR ||
|
|
|
|
asset.originalPath.toLowerCase().endsWith('.insp')) ||
|
|
|
|
// (asset.originalPath && asset.originalPath.toLowerCase().endsWith('.insp'))
|
|
|
|
asset.originalPath.toLowerCase().endsWith('.gif') ||
|
|
|
|
// ) &&
|
|
|
|
asset.originalPath.toLowerCase().endsWith('.svg'),
|
|
|
|
// !(asset.originalPath && asset.originalPath.toLowerCase().endsWith('.gif')) &&
|
|
|
|
);
|
|
|
|
// !(asset.originalPath && asset.originalPath.toLowerCase().endsWith('.svg')) &&
|
|
|
|
|
|
|
|
// !asset.livePhotoVideoId,
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<CommandPaletteDefaultProvider
|
|
|
|
<CommandPaletteDefaultProvider
|
|
|
|
@@ -180,9 +178,9 @@
|
|
|
|
<RatingAction {asset} {onAction} />
|
|
|
|
<RatingAction {asset} {onAction} />
|
|
|
|
{/if}
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
<!-- {#if showEditorButton}
|
|
|
|
{#if !editorDisabled}
|
|
|
|
<EditAction onAction={onEdit} />
|
|
|
|
<EditAction onAction={onEdit} />
|
|
|
|
{/if} -->
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
{#if isOwner}
|
|
|
|
{#if isOwner}
|
|
|
|
<DeleteAction {asset} {onAction} {preAction} {onUndoDelete} />
|
|
|
|
<DeleteAction {asset} {onAction} {preAction} {onUndoDelete} />
|
|
|
|
|