mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
Revert "feat(web): slight fade in animation when open/close asset-viewer (#16262)"
This reverts commit 57829cee26.
This commit is contained in:
parent
c0fe98fe27
commit
6c64a6dab8
2 changed files with 2 additions and 17 deletions
|
|
@ -168,8 +168,3 @@ input:focus-visible {
|
||||||
scrollbar-gutter: stable both-edges;
|
scrollbar-gutter: stable both-edges;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::view-transition-old(root),
|
|
||||||
::view-transition-new(root) {
|
|
||||||
animation-duration: 250ms;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ async function navigateAssetRoute(route: AssetRoute, options?: NavOptions) {
|
||||||
const next = assetId ? currentUrlReplaceAssetId(assetId) : currentUrlWithoutAsset();
|
const next = assetId ? currentUrlReplaceAssetId(assetId) : currentUrlWithoutAsset();
|
||||||
const current = currentUrl();
|
const current = currentUrl();
|
||||||
if (next !== current || options?.forceNavigate) {
|
if (next !== current || options?.forceNavigate) {
|
||||||
await navigateWithTransition(next, options);
|
await goto(next, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,7 +122,7 @@ async function navigateAssetGridRoute(route: AssetGridRoute, options?: NavOption
|
||||||
const next = replaceScrollTarget(assetUrl, assetGridScrollTarget);
|
const next = replaceScrollTarget(assetUrl, assetGridScrollTarget);
|
||||||
const current = currentUrl();
|
const current = currentUrl();
|
||||||
if (next !== current || options?.forceNavigate) {
|
if (next !== current || options?.forceNavigate) {
|
||||||
await navigateWithTransition(next, options);
|
await goto(next, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,16 +136,6 @@ export function navigate(change: ImmichRoute, options?: NavOptions): Promise<voi
|
||||||
throw `Invalid navigation: ${JSON.stringify(change)}`;
|
throw `Invalid navigation: ${JSON.stringify(change)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function navigateWithTransition(url: string, options?: NavOptions) {
|
|
||||||
if (document.startViewTransition) {
|
|
||||||
document.startViewTransition(async () => {
|
|
||||||
await goto(url, options);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
await goto(url, options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const clearQueryParam = async (queryParam: string, url: URL) => {
|
export const clearQueryParam = async (queryParam: string, url: URL) => {
|
||||||
if (url.searchParams.has(queryParam)) {
|
if (url.searchParams.has(queryParam)) {
|
||||||
url.searchParams.delete(queryParam);
|
url.searchParams.delete(queryParam);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue