mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: update deps (#14755)
This commit is contained in:
parent
a03f4f5610
commit
6a855f6331
38 changed files with 4610 additions and 14215 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import FormatBoldMessage from '$lib/components/i18n/format-bold-message.svelte';
|
||||
import type { InterpolationValues } from '$lib/components/i18n/format-message';
|
||||
import { NotificationType, notificationController } from '$lib/components/shared-components/notification/notification';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
import type { AssetInteraction } from '$lib/stores/asset-interaction.svelte';
|
||||
|
|
@ -33,7 +34,7 @@ import {
|
|||
type UserResponseDto,
|
||||
} from '@immich/sdk';
|
||||
import { DateTime } from 'luxon';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { t, type Translations } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import { handleError } from './handle-error';
|
||||
|
||||
|
|
@ -120,7 +121,8 @@ export const addAssetsToNewAlbum = async (albumName: string, assetIds: string[])
|
|||
return;
|
||||
}
|
||||
const $t = get(t);
|
||||
notificationController.show({
|
||||
// for reasons beyond me <ComponentProps<typeof FormatBoldMessage>> doesn't work, even though it's (afaik) exactly this object
|
||||
notificationController.show<{ key: Translations; values: InterpolationValues }>({
|
||||
type: NotificationType.Info,
|
||||
timeout: 5000,
|
||||
component: {
|
||||
|
|
@ -549,7 +551,7 @@ export const delay = async (ms: number) => {
|
|||
};
|
||||
|
||||
export const canCopyImageToClipboard = (): boolean => {
|
||||
return !!(navigator.clipboard && window.ClipboardItem);
|
||||
return !!(navigator.clipboard && globalThis.ClipboardItem);
|
||||
};
|
||||
|
||||
const imgToBlob = async (imageElement: HTMLImageElement) => {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export const handleLogout = async (redirectUri: string) => {
|
|||
if (redirectUri.startsWith('/')) {
|
||||
await goto(redirectUri);
|
||||
} else {
|
||||
window.location.href = redirectUri;
|
||||
globalThis.location.href = redirectUri;
|
||||
}
|
||||
} finally {
|
||||
resetSavedUser();
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@ function fake_cancelIdleCallback(id: number) {
|
|||
return clearTimeout(id);
|
||||
}
|
||||
|
||||
export const idleCB = window.requestIdleCallback || fake_requestIdleCallback;
|
||||
export const cancelIdleCB = window.cancelIdleCallback || fake_cancelIdleCallback;
|
||||
export const idleCB = globalThis.requestIdleCallback || fake_requestIdleCallback;
|
||||
export const cancelIdleCB = globalThis.cancelIdleCallback || fake_cancelIdleCallback;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export class KeyedPriorityQueue<K, T> {
|
|||
const removed = this.set.delete(key);
|
||||
if (removed) {
|
||||
const idx = this.items.findIndex((i) => i.key === key);
|
||||
if (idx >= 0) {
|
||||
if (idx !== -1) {
|
||||
this.items.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@ export const getActivationKey = async (licenseKey: string): Promise<string> => {
|
|||
export const getLicenseLink = (license: ImmichProduct) => {
|
||||
const url = new URL('/', PUBLIC_IMMICH_BUY_HOST);
|
||||
url.searchParams.append('productId', license);
|
||||
url.searchParams.append('instanceUrl', get(serverConfig).externalDomain || window.origin);
|
||||
url.searchParams.append('instanceUrl', get(serverConfig).externalDomain || globalThis.origin);
|
||||
return url.href;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type AssetGridRouteSearchParams = {
|
|||
at: string | null | undefined;
|
||||
};
|
||||
export const isExternalUrl = (url: string): boolean => {
|
||||
return new URL(url, window.location.href).origin !== window.location.origin;
|
||||
return new URL(url, globalThis.location.href).origin !== globalThis.location.origin;
|
||||
};
|
||||
|
||||
export const isPhotosRoute = (route?: string | null) => !!route?.startsWith('/(user)/photos/[[assetId=id]]');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue