Merge branch 'main' of github.com:immich-app/immich into pr/YFrendo/5066

This commit is contained in:
Alex Tran
2023-11-22 10:24:07 -06:00
18 changed files with 162 additions and 25 deletions

11
web/package-lock.json generated
View File

@@ -56,7 +56,7 @@
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"svelte-jester": "^2.3.2",
"svelte-jester": "^3.0.0",
"svelte-preprocess": "^5.0.3",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.2.7",
@@ -11301,12 +11301,13 @@
}
},
"node_modules/svelte-jester": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/svelte-jester/-/svelte-jester-2.3.2.tgz",
"integrity": "sha512-JtxSz4FWAaCRBXbPsh4LcDs4Ua7zdXgLC0TZvT1R56hRV0dymmNP+abw67DTPF7sQPyNxWsOKd0Sl7Q8SnP8kg==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/svelte-jester/-/svelte-jester-3.0.0.tgz",
"integrity": "sha512-V279cL906++hn00hkL1xAr/y5OjjxPYWic1g0yTJFmqdbdWKthdcuP3XBvmmwP9AzFBT51DlPgXz56HItle1Ug==",
"dev": true,
"engines": {
"node": ">=14"
"node": ">=16",
"pnpm": "^8.0.0"
},
"peerDependencies": {
"jest": ">= 27",

View File

@@ -49,7 +49,7 @@
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"svelte-jester": "^2.3.2",
"svelte-jester": "^3.0.0",
"svelte-preprocess": "^5.0.3",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.2.7",

View File

@@ -7,6 +7,7 @@
import { flip } from 'svelte/animate';
import { getThumbnailSize } from '$lib/utils/thumbnail-util';
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
import { onDestroy } from 'svelte';
export let assets: AssetResponseDto[];
export let selectedAssets: Set<AssetResponseDto> = new Set();
@@ -80,6 +81,10 @@
$showAssetViewer = false;
history.pushState(null, '', `${$page.url.pathname}`);
};
onDestroy(() => {
$showAssetViewer = false;
});
</script>
{#if assets.length > 0}

View File

@@ -123,7 +123,7 @@
afterNavigate(({ from }) => {
assetViewingStore.showAssetViewer(false);
let url: string | undefined = from?.url.pathname;
let url: string | undefined = from?.url?.pathname;
if (from?.route.id === '/(user)/search') {
url = from.url.href;

View File

@@ -72,7 +72,7 @@
afterNavigate(({ from }) => {
// Prevent setting previousRoute to the current page.
if (from && from.route.id !== $page.route.id) {
if (from?.url && from.route.id !== $page.route.id) {
previousRoute = from.url.href;
}
@@ -149,7 +149,7 @@
</section>
{/if}
<section id="search-content" class="relative bg-immich-bg dark:bg-immich-dark-bg">
{#if data.results?.assets?.items.length > 0}
{#if searchResultAssets.length > 0}
<div class="pl-4">
<GalleryViewer assets={searchResultAssets} bind:selectedAssets showArchiveIcon={true} />
</div>