mirror of
https://github.com/immich-app/immich.git
synced 2025-04-21 15:36:26 +02: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
web/src
|
@ -168,8 +168,3 @@ input:focus-visible {
|
|||
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 current = currentUrl();
|
||||
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 current = currentUrl();
|
||||
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)}`;
|
||||
}
|
||||
|
||||
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) => {
|
||||
if (url.searchParams.has(queryParam)) {
|
||||
url.searchParams.delete(queryParam);
|
||||
|
|
Loading…
Add table
Reference in a new issue