mirror of
https://github.com/immich-app/immich.git
synced 2025-06-01 20:54:22 -04:00
parent
c14e2914f8
commit
da12d5f567
@ -13,13 +13,14 @@
|
|||||||
import { loadConfig, serverConfig } from '$lib/stores/server-config.store';
|
import { loadConfig, serverConfig } from '$lib/stores/server-config.store';
|
||||||
import { user } from '$lib/stores/user.store';
|
import { user } from '$lib/stores/user.store';
|
||||||
import { closeWebsocketConnection, openWebsocketConnection } from '$lib/stores/websocket';
|
import { closeWebsocketConnection, openWebsocketConnection } from '$lib/stores/websocket';
|
||||||
import { setKey } from '$lib/utils';
|
import { copyToClipboard, setKey } from '$lib/utils';
|
||||||
import { handleError } from '$lib/utils/handle-error';
|
import { handleError } from '$lib/utils/handle-error';
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import '../app.css';
|
import '../app.css';
|
||||||
import { isAssetViewerRoute, isSharedLinkRoute } from '$lib/utils/navigation';
|
import { isAssetViewerRoute, isSharedLinkRoute } from '$lib/utils/navigation';
|
||||||
import DialogWrapper from '$lib/components/shared-components/dialog/dialog-wrapper.svelte';
|
import DialogWrapper from '$lib/components/shared-components/dialog/dialog-wrapper.svelte';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
|
import { shortcut } from '$lib/actions/shortcut';
|
||||||
|
|
||||||
let showNavigationLoadingBar = false;
|
let showNavigationLoadingBar = false;
|
||||||
$: changeTheme($colorTheme);
|
$: changeTheme($colorTheme);
|
||||||
@ -49,6 +50,10 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getMyImmichLink = () => {
|
||||||
|
return new URL($page.url.pathname + $page.url.search, 'https://my.immich.app');
|
||||||
|
};
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
// if the browser theme changes, changes the Immich theme too
|
// if the browser theme changes, changes the Immich theme too
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', handleChangeTheme);
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', handleChangeTheme);
|
||||||
@ -123,6 +128,12 @@
|
|||||||
</FullscreenContainer>
|
</FullscreenContainer>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
|
<svelte:window
|
||||||
|
use:shortcut={{
|
||||||
|
shortcut: { ctrl: true, shift: true, key: 'm' },
|
||||||
|
onShortcut: () => copyToClipboard(getMyImmichLink().toString()),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
{#if showNavigationLoadingBar}
|
{#if showNavigationLoadingBar}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user