mirror of
https://github.com/immich-app/static-pages.git
synced 2026-09-30 21:27:54 +08:00
chore(deps): update dependency eslint-plugin-unicorn to v76 (#849)
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
co-authored by
Daniel Dietzler
parent
0bb948e639
commit
652e25934e
@@ -109,11 +109,13 @@ class PlaygroundManager {
|
||||
|
||||
async load() {
|
||||
const data = localStorage.getItem(LOCAL_STORAGE_KEY);
|
||||
if (data) {
|
||||
const { apiKey = '', serverUrl = '' } = JSON.parse(data);
|
||||
this.apiKey = apiKey;
|
||||
this.serverUrl = serverUrl;
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { apiKey = '', serverUrl = '' } = JSON.parse(data);
|
||||
this.apiKey = apiKey;
|
||||
this.serverUrl = serverUrl;
|
||||
}
|
||||
|
||||
async save() {
|
||||
|
||||
@@ -373,10 +373,12 @@ const validationSchema = immichConfigSchema.superRefine((config, ctx) => {
|
||||
: overlaps
|
||||
? 'This path overlaps another mount.'
|
||||
: undefined;
|
||||
if (message) {
|
||||
fail(mount.path, message);
|
||||
fail(other.path, message);
|
||||
if (!message) {
|
||||
continue;
|
||||
}
|
||||
|
||||
fail(mount.path, message);
|
||||
fail(other.path, message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -68,10 +68,12 @@ export const decodeShare = (params: URLSearchParams): ImmichConfig => {
|
||||
|
||||
for (const [path, raw] of params) {
|
||||
const value = path === PASSWORD_PATH ? (raw === PASSWORD_MARKER ? randomPassword() : undefined) : coerce(raw, path);
|
||||
if (value !== undefined) {
|
||||
set(draft, path, value);
|
||||
applied.push(path);
|
||||
if (value === undefined) {
|
||||
continue;
|
||||
}
|
||||
|
||||
set(draft, path, value);
|
||||
applied.push(path);
|
||||
}
|
||||
|
||||
let parsed = immichConfigSchema.safeParse(draft);
|
||||
|
||||
@@ -132,10 +132,12 @@
|
||||
|
||||
$effect(() => {
|
||||
const target = shareUrl;
|
||||
if (decoded && routerReady && target !== writtenUrl) {
|
||||
writtenUrl = target;
|
||||
replaceState(target, {});
|
||||
if (!(decoded && routerReady) || target === writtenUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
writtenUrl = target;
|
||||
replaceState(target, {});
|
||||
});
|
||||
|
||||
onMount(async () => {
|
||||
|
||||
Reference in New Issue
Block a user