mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: use <a> tag for albums in list view (#5645)
* fix: multiple improvements * pr feedback * optimize
This commit is contained in:
parent
fb4b4e5895
commit
fba9e784fb
16 changed files with 86 additions and 59 deletions
|
|
@ -19,7 +19,7 @@
|
|||
import PhotoViewer from './photo-viewer.svelte';
|
||||
import VideoViewer from './video-viewer.svelte';
|
||||
import PanoramaViewer from './panorama-viewer.svelte';
|
||||
import { AssetAction, ProjectionType } from '$lib/constants';
|
||||
import { AppRoute, AssetAction, ProjectionType } from '$lib/constants';
|
||||
import ConfirmDialogue from '$lib/components/shared-components/confirm-dialogue.svelte';
|
||||
import ProfileImageCropper from '../shared-components/profile-image-cropper.svelte';
|
||||
import { isShowDetail } from '$lib/stores/preferences.store';
|
||||
|
|
@ -430,7 +430,7 @@
|
|||
const { albumName }: { albumName: string } = event.detail;
|
||||
api.albumApi.createAlbum({ createAlbumDto: { albumName, assetIds: [asset.id] } }).then((response) => {
|
||||
const album = response.data;
|
||||
goto('/albums/' + album.id);
|
||||
goto(`${AppRoute.ALBUMS}/${album.id}`);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -238,7 +238,9 @@
|
|||
on:mouseleave={() => ($boundingBoxesArray = [])}
|
||||
>
|
||||
<a
|
||||
href="/people/{person.id}?previousRoute={albumId ? `${AppRoute.ALBUMS}/${albumId}` : AppRoute.PHOTOS}"
|
||||
href="{AppRoute.PEOPLE}/{person.id}?previousRoute={albumId
|
||||
? `${AppRoute.ALBUMS}/${albumId}`
|
||||
: AppRoute.PHOTOS}"
|
||||
on:click={() => dispatch('close-viewer')}
|
||||
>
|
||||
<div class="relative">
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
on:mouseleave={() => (showVerticalDots = false)}
|
||||
role="group"
|
||||
>
|
||||
<a href="/people/{person.id}?previousRoute={AppRoute.PEOPLE}" draggable="false">
|
||||
<a href="{AppRoute.PEOPLE}/{person.id}?previousRoute={AppRoute.PEOPLE}" draggable="false">
|
||||
<div class="h-48 w-48 rounded-xl brightness-95 filter">
|
||||
<ImageThumbnail
|
||||
shadow
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
import { handleError } from '../../utils/handle-error';
|
||||
import Icon from '$lib/components/elements/icon.svelte';
|
||||
import { mdiAccountEditOutline } from '@mdi/js';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
|
||||
export let user: UserResponseDto;
|
||||
export let canResetPassword = true;
|
||||
|
|
@ -99,7 +100,7 @@
|
|||
|
||||
<p>
|
||||
Note: To apply the Storage Label to previously uploaded assets, run the
|
||||
<a href="/admin/jobs-status" class="text-immich-primary dark:text-immich-dark-primary">
|
||||
<a href={AppRoute.ADMIN_JOBS} class="text-immich-primary dark:text-immich-dark-primary">
|
||||
Storage Migration Job</a
|
||||
>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
import { AlbumResponseDto, api } from '@api';
|
||||
import { getMenuContext } from '../asset-select-context-menu.svelte';
|
||||
import { getAssetControlContext } from '../asset-select-control-bar.svelte';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
|
||||
export let shared = false;
|
||||
let showAlbumPicker = false;
|
||||
|
|
@ -37,7 +38,7 @@
|
|||
|
||||
clearSelect();
|
||||
|
||||
goto('/albums/' + id);
|
||||
goto(`${AppRoute.ALBUMS}/${id}`);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
import { notificationController, NotificationType } from '../shared-components/notification/notification';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { mdiArrowLeft, mdiFileImagePlusOutline, mdiFolderDownloadOutline, mdiSelectAll } from '@mdi/js';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
|
||||
export let sharedLink: SharedLinkResponseDto;
|
||||
export let isOwned: boolean;
|
||||
|
|
@ -78,7 +79,7 @@
|
|||
{/if}
|
||||
</AssetSelectControlBar>
|
||||
{:else}
|
||||
<ControlAppBar on:close-button-click={() => goto('/photos')} backIcon={mdiArrowLeft} showBackButton={false}>
|
||||
<ControlAppBar on:close-button-click={() => goto(AppRoute.PHOTOS)} backIcon={mdiArrowLeft} showBackButton={false}>
|
||||
<svelte:fragment slot="leading">
|
||||
<a
|
||||
data-sveltekit-preload-data="hover"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue