mirror of
https://github.com/immich-app/immich.git
synced 2025-06-01 20:54:22 -04:00
Revert "feat(web): slight fade in animation when open/close asset-viewer (#16262)" This reverts commit 57829cee26807317d3448abd0502da21fe33097f.
This commit is contained in:
parent
c0fe98fe27
commit
6c64a6dab8
@ -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…
x
Reference in New Issue
Block a user