mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore: svelte enable svelte_referenced_localy
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
"build:stats": "BUILD_STATS=true vite build",
|
"build:stats": "BUILD_STATS=true vite build",
|
||||||
"package": "svelte-kit package",
|
"package": "svelte-kit package",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"check:svelte": "svelte-check --no-tsconfig --fail-on-warnings --compiler-warnings 'state_referenced_locally:ignore'",
|
"check:svelte": "svelte-check --no-tsconfig --fail-on-warnings",
|
||||||
"check:typescript": "tsc --noEmit",
|
"check:typescript": "tsc --noEmit",
|
||||||
"check:watch": "pnpm run check:svelte --watch",
|
"check:watch": "pnpm run check:svelte --watch",
|
||||||
"check:code": "pnpm run format && pnpm run lint && pnpm run check:svelte && pnpm run check:typescript",
|
"check:code": "pnpm run format && pnpm run lint && pnpm run check:svelte && pnpm run check:typescript",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
let { sharedLink }: Props = $props();
|
let { sharedLink }: Props = $props();
|
||||||
|
|
||||||
const album = sharedLink.album as AlbumResponseDto;
|
const album = $derived(sharedLink.album as AlbumResponseDto);
|
||||||
|
|
||||||
let { slideshowState, slideshowNavigation } = slideshowStore;
|
let { slideshowState, slideshowNavigation } = slideshowStore;
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
let activityHeight: number = $state(0);
|
let activityHeight: number = $state(0);
|
||||||
let chatHeight: number = $state(0);
|
let chatHeight: number = $state(0);
|
||||||
let divHeight = $derived(innerHeight - activityHeight);
|
let divHeight = $derived(innerHeight - activityHeight);
|
||||||
let previousAssetId: string | undefined = $state(assetId);
|
// svelte-ignore state_referenced_locally
|
||||||
|
let previousAssetId = $state(assetId);
|
||||||
let message = $state('');
|
let message = $state('');
|
||||||
let isSendingMessage = $state(false);
|
let isSendingMessage = $state(false);
|
||||||
const isAlbumOwner = $derived(albumUsers[0].user.id === authManager.user.id);
|
const isAlbumOwner = $derived(albumUsers[0].user.id === authManager.user.id);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let { asset, onAction, preAction }: Props = $props();
|
let { asset, onAction, preAction }: Props = $props();
|
||||||
const isLocked = asset.visibility === AssetVisibility.Locked;
|
const isLocked = $derived(asset.visibility === AssetVisibility.Locked);
|
||||||
|
|
||||||
const toggleLockedVisibility = async () => {
|
const toggleLockedVisibility = async () => {
|
||||||
const isConfirmed = await modalManager.showDialog({
|
const isConfirmed = await modalManager.showDialog({
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
class: className,
|
class: className,
|
||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
let remainingSeconds = $state(durationInSeconds);
|
let remainingSeconds = $derived(durationInSeconds);
|
||||||
let loading = $state(true);
|
let loading = $state(true);
|
||||||
let error = $state(false);
|
let error = $state(false);
|
||||||
let player: HTMLVideoElement | undefined = $state();
|
let player: HTMLVideoElement | undefined = $state();
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
let props: Props = $props();
|
let props: Props = $props();
|
||||||
|
|
||||||
let backups = $state(props.backups ?? []);
|
let backups = $derived(props.backups ?? []);
|
||||||
|
|
||||||
async function reloadBackups() {
|
async function reloadBackups() {
|
||||||
const result = await listDatabaseBackups();
|
const result = await listDatabaseBackups();
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
const { data }: Props = $props();
|
const { data }: Props = $props();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let { sharedLink, passwordRequired, key, slug, meta } = $state(data);
|
let { sharedLink, passwordRequired, key, slug, meta } = $state(data);
|
||||||
let { title, description } = $state(meta);
|
let { title, description } = $state(meta);
|
||||||
let isOwned = $derived(authManager.authenticated && authManager.user.id === sharedLink?.userId);
|
let isOwned = $derived(authManager.authenticated && authManager.user.id === sharedLink?.userId);
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
let width = $derived(fullWidth ? 'w-full' : 'w-1/2');
|
let width = $derived(fullWidth ? 'w-full' : 'w-1/2');
|
||||||
|
|
||||||
const hoverClasses = onClick
|
const hoverClasses = $derived(
|
||||||
? `border dark:border-immich-dark-gray hover:bg-immich-primary/5 dark:hover:bg-immich-dark-primary/25`
|
onClick ? `border dark:border-immich-dark-gray hover:bg-immich-primary/5 dark:hover:bg-immich-dark-primary/25` : '',
|
||||||
: '';
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||||
|
|||||||
@@ -36,12 +36,15 @@
|
|||||||
onClick();
|
onClick();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$effect(() => {
|
||||||
if (shortcut && !shortcutLabel) {
|
if (shortcut && !shortcutLabel) {
|
||||||
shortcutLabel = computeShortcutLabel(shortcut);
|
shortcutLabel = computeShortcutLabel(shortcut);
|
||||||
}
|
}
|
||||||
const bindShortcutIfSet = shortcut
|
});
|
||||||
? (n: HTMLElement) => bindShortcut(n, { shortcut, onShortcut: onClick })
|
|
||||||
: () => {};
|
const bindShortcutIfSet = $derived(
|
||||||
|
shortcut ? (n: HTMLElement) => bindShortcut(n, { shortcut, onShortcut: onClick }) : () => {},
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:document use:bindShortcutIfSet />
|
<svelte:document use:bindShortcutIfSet />
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
await play();
|
await play();
|
||||||
};
|
};
|
||||||
|
|
||||||
let progress = setDuration(duration);
|
let progress = $derived(setDuration(duration));
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
handlePromiseError(onChange(duration));
|
handlePromiseError(onChange(duration));
|
||||||
|
|||||||
@@ -25,7 +25,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let { queryParam, state = writable(getParamValues(queryParam)), children }: Props = $props();
|
let { queryParam, state = writable(getParamValues(queryParam)), children }: Props = $props();
|
||||||
|
|
||||||
|
$effect.pre(() => {
|
||||||
setAccordionState(state);
|
setAccordionState(state);
|
||||||
|
});
|
||||||
|
|
||||||
const searchParams = new SvelteURLSearchParams(page.url.searchParams);
|
const searchParams = new SvelteURLSearchParams(page.url.searchParams);
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
const { node, getLink, title, icon }: Props = $props();
|
const { node, getLink, title, icon }: Props = $props();
|
||||||
|
|
||||||
const rootLink = getLink('');
|
const rootLink = $derived(getLink(''));
|
||||||
const isRoot = $derived(node.parent === null);
|
const isRoot = $derived(node.parent === null);
|
||||||
const parentLink = $derived(getLink(node.parent ? node.parent.path : ''));
|
const parentLink = $derived(getLink(node.parent ? node.parent.path : ''));
|
||||||
const parents = $derived(node.parents);
|
const parents = $derived(node.parents);
|
||||||
|
|||||||
@@ -122,7 +122,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
const setFocusTo = setFocusToInit.bind(undefined, scrollToAsset, timelineManager);
|
const setFocusTo = setFocusToInit.bind(undefined, scrollToAsset, timelineManager);
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
const setFocusAsset = setFocusAssetInit.bind(undefined, scrollToAsset);
|
const setFocusAsset = setFocusAssetInit.bind(undefined, scrollToAsset);
|
||||||
|
|
||||||
const handleOpenDateModal = async () => {
|
const handleOpenDateModal = async () => {
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
|
|
||||||
let { album, onClose }: Props = $props();
|
let { album, onClose }: Props = $props();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let albumName = $state(album.albumName);
|
let albumName = $state(album.albumName);
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let description = $state(album.description);
|
let description = $state(album.description);
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -20,8 +20,10 @@
|
|||||||
? Object.values(Permission).filter((permission) => permission !== Permission.All)
|
? Object.values(Permission).filter((permission) => permission !== Permission.All)
|
||||||
: permissions;
|
: permissions;
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let name = $state(apiKey.name);
|
let name = $state(apiKey.name);
|
||||||
let selectedPermissions = $state<Permission[]>(mapPermissions(apiKey.permissions));
|
// svelte-ignore state_referenced_locally
|
||||||
|
let selectedPermissions = $state(mapPermissions(apiKey.permissions));
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
const success = await handleUpdateApiKey(apiKey, {
|
const success = await handleUpdateApiKey(apiKey, {
|
||||||
|
|||||||
@@ -20,9 +20,11 @@
|
|||||||
|
|
||||||
let { initialDate = DateTime.now(), initialTimeZone, timezoneInput = true, asset, onClose }: Props = $props();
|
let { initialDate = DateTime.now(), initialTimeZone, timezoneInput = true, asset, onClose }: Props = $props();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"));
|
let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"));
|
||||||
const timezones = $derived(getTimezones(selectedDate));
|
const timezones = $derived(getTimezones(selectedDate));
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let selectedOption = $state(getPreferredTimeZone(initialDate, initialTimeZone, getTimezones(selectedDate)));
|
let selectedOption = $state(getPreferredTimeZone(initialDate, initialTimeZone, getTimezones(selectedDate)));
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
let showRelative = $state(false);
|
let showRelative = $state(false);
|
||||||
let selectedDuration = $state(0);
|
let selectedDuration = $state(0);
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"));
|
let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"));
|
||||||
const timezones = $derived(getTimezones(selectedDate));
|
const timezones = $derived(getTimezones(selectedDate));
|
||||||
// svelte-ignore state_referenced_locally
|
// svelte-ignore state_referenced_locally
|
||||||
|
|||||||
@@ -45,8 +45,11 @@
|
|||||||
return { lat: latitude, lng: longitude };
|
return { lat: latitude, lng: longitude };
|
||||||
});
|
});
|
||||||
|
|
||||||
let point = $state<LatLng | undefined>(initialPoint ?? assetPoint);
|
// svelte-ignore state_referenced_locally
|
||||||
|
let point = $state(initialPoint ?? assetPoint);
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let zoom = $state(point ? 12.5 : 1);
|
let zoom = $state(point ? 12.5 : 1);
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let center = $state(point ?? geolocationManager.lastPoint);
|
let center = $state(point ?? geolocationManager.lastPoint);
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const { library, exclusionPattern: oldValue, onClose }: Props = $props();
|
const { library, exclusionPattern: oldValue, onClose }: Props = $props();
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let newValue = $state(oldValue);
|
let newValue = $state(oldValue);
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
const { library, folder: oldValue, onClose }: Props = $props();
|
const { library, folder: oldValue, onClose }: Props = $props();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let newValue = $state(oldValue);
|
let newValue = $state(oldValue);
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
let { settings: initialValues, onClose }: Props = $props();
|
let { settings: initialValues, onClose }: Props = $props();
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let settings = $state(initialValues);
|
let settings = $state(initialValues);
|
||||||
|
|
||||||
let customDateRange = $state(!!settings.dateAfter || !!settings.dateBefore);
|
let customDateRange = $state(!!settings.dateAfter || !!settings.dateBefore);
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let filter: SearchFilter = $state(asFilter(searchQuery));
|
let filter: SearchFilter = $state(asFilter(searchQuery));
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
const { onClose, baseTag }: Props = $props();
|
const { onClose, baseTag }: Props = $props();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let tagValue = $state(baseTag?.path ? `${baseTag.path}/` : '');
|
let tagValue = $state(baseTag?.path ? `${baseTag.path}/` : '');
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
const { tag, onClose }: Props = $props();
|
const { tag, onClose }: Props = $props();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let tagColor = $state(tag.color ?? '');
|
let tagColor = $state(tag.color ?? '');
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
let places = $derived(getFieldItems(data.items, 'exifInfo.city'));
|
let places = $derived(getFieldItems(data.items, 'exifInfo.city'));
|
||||||
let people = $state(data.response.people);
|
let people = $derived(data.response.people);
|
||||||
|
|
||||||
let hasPeople = $derived(data.response.total > 0);
|
let hasPeople = $derived(data.response.total > 0);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
let searchName = $state('');
|
let searchName = $state('');
|
||||||
let newName = $state('');
|
let newName = $state('');
|
||||||
let currentPage = $state(1);
|
let currentPage = $state(1);
|
||||||
let nextPage = $state(data.people.hasNextPage ? 2 : null);
|
let nextPage = $derived(data.people.hasNextPage ? 2 : null);
|
||||||
let personMerge1 = $state<PersonResponseDto>();
|
let personMerge1 = $state<PersonResponseDto>();
|
||||||
let personMerge2 = $state<PersonResponseDto>();
|
let personMerge2 = $state<PersonResponseDto>();
|
||||||
let potentialMergePeople: PersonResponseDto[] = $state([]);
|
let potentialMergePeople: PersonResponseDto[] = $state([]);
|
||||||
|
|||||||
+4
-6
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import ControlAppBar from '$lib/components/shared-components/ControlAppBar.svelte';
|
||||||
import { timeBeforeShowLoadingSpinner } from '$lib/constants';
|
import { timeBeforeShowLoadingSpinner } from '$lib/constants';
|
||||||
import { handleError } from '$lib/utils/handle-error';
|
import { handleError } from '$lib/utils/handle-error';
|
||||||
import {
|
import {
|
||||||
@@ -14,7 +15,6 @@
|
|||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
import { quintOut } from 'svelte/easing';
|
import { quintOut } from 'svelte/easing';
|
||||||
import { fly } from 'svelte/transition';
|
import { fly } from 'svelte/transition';
|
||||||
import ControlAppBar from '$lib/components/shared-components/ControlAppBar.svelte';
|
|
||||||
import FaceThumbnail from './FaceThumbnail.svelte';
|
import FaceThumbnail from './FaceThumbnail.svelte';
|
||||||
import PeopleList from './PeopleList.svelte';
|
import PeopleList from './PeopleList.svelte';
|
||||||
|
|
||||||
@@ -39,11 +39,9 @@
|
|||||||
|
|
||||||
let peopleToNotShow = $derived(selectedPerson ? [personAssets, selectedPerson] : [personAssets]);
|
let peopleToNotShow = $derived(selectedPerson ? [personAssets, selectedPerson] : [personAssets]);
|
||||||
|
|
||||||
const selectedPeople: AssetFaceUpdateItem[] = [];
|
const selectedPeople = $derived<AssetFaceUpdateItem[]>(
|
||||||
|
assetIds.map((assetId) => ({ assetId, personId: personAssets.id })),
|
||||||
for (const assetId of assetIds) {
|
);
|
||||||
selectedPeople.push({ assetId, personId: personAssets.id });
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
const data = await getAllPeople({ withHidden: false });
|
const data = await getAllPeople({ withHidden: false });
|
||||||
|
|||||||
@@ -15,16 +15,16 @@
|
|||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
const sharedLink = $state(data.sharedLink);
|
const sharedLink = $derived(data.sharedLink);
|
||||||
|
|
||||||
let description = $state(sharedLink.description ?? '');
|
let description = $derived(sharedLink.description ?? '');
|
||||||
let allowDownload = $state(sharedLink.allowDownload);
|
let allowDownload = $derived(sharedLink.allowDownload);
|
||||||
let allowUpload = $state(sharedLink.allowUpload);
|
let allowUpload = $derived(sharedLink.allowUpload);
|
||||||
let showMetadata = $state(sharedLink.showMetadata);
|
let showMetadata = $derived(sharedLink.showMetadata);
|
||||||
let password = $state(sharedLink.password ?? '');
|
let password = $derived(sharedLink.password ?? '');
|
||||||
let slug = $state(sharedLink.slug ?? '');
|
let slug = $derived(sharedLink.slug ?? '');
|
||||||
let shareType = sharedLink.album ? SharedLinkType.Album : SharedLinkType.Individual;
|
let shareType = $derived(sharedLink.album ? SharedLinkType.Album : SharedLinkType.Individual);
|
||||||
let expiresAt = $state(sharedLink.expiresAt);
|
let expiresAt = $derived(sharedLink.expiresAt);
|
||||||
|
|
||||||
const onClose = async () => {
|
const onClose = async () => {
|
||||||
await goto(Route.sharedLinks());
|
await goto(Route.sharedLinks());
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
let assets = $state(data.assets);
|
let assets = $derived(data.assets);
|
||||||
let asset = $derived(data.asset);
|
let asset = $derived(data.asset);
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
|||||||
@@ -37,12 +37,13 @@
|
|||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
let workflows = $state<WorkflowResponseDto[]>(data.workflows);
|
let workflows = $derived<WorkflowResponseDto[]>(data.workflows);
|
||||||
|
|
||||||
const expandedWorkflows = new SvelteSet<string>();
|
const expandedWorkflows = new SvelteSet<string>();
|
||||||
const pluginFilterLookup = new SvelteMap<string, PluginFilterResponseDto>();
|
const pluginFilterLookup = new SvelteMap<string, PluginFilterResponseDto>();
|
||||||
const pluginActionLookup = new SvelteMap<string, PluginFilterResponseDto>();
|
const pluginActionLookup = new SvelteMap<string, PluginFilterResponseDto>();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
for (const plugin of data.plugins) {
|
for (const plugin of data.plugins) {
|
||||||
for (const filter of plugin.filters ?? []) {
|
for (const filter of plugin.filters ?? []) {
|
||||||
pluginFilterLookup.set(filter.id, { ...filter });
|
pluginFilterLookup.set(filter.id, { ...filter });
|
||||||
|
|||||||
@@ -63,11 +63,16 @@
|
|||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
const triggers = data.triggers;
|
const triggers = data.triggers;
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
const filters = data.plugins.flatMap((plugin) => plugin.filters);
|
const filters = data.plugins.flatMap((plugin) => plugin.filters);
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
const actions = data.plugins.flatMap((plugin) => plugin.actions);
|
const actions = data.plugins.flatMap((plugin) => plugin.actions);
|
||||||
|
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let previousWorkflow = data.workflow;
|
let previousWorkflow = data.workflow;
|
||||||
|
// svelte-ignore state_referenced_locally
|
||||||
let editWorkflow = $state(data.workflow);
|
let editWorkflow = $state(data.workflow);
|
||||||
|
|
||||||
let viewMode: 'visual' | 'json' = $state('visual');
|
let viewMode: 'visual' | 'json' = $state('visual');
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
const { data }: Props = $props();
|
const { data }: Props = $props();
|
||||||
|
|
||||||
let ownerId: string = $state(authManager.user.id);
|
let ownerId: string = $state(authManager.user.id);
|
||||||
const users = $state(data.allUsers);
|
const users = $derived(data.allUsers);
|
||||||
|
|
||||||
const onClose = async () => {
|
const onClose = async () => {
|
||||||
await goto(Route.libraries());
|
await goto(Route.libraries());
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
const library = $state(data.library);
|
const library = $derived(data.library);
|
||||||
let name = $state(library.name);
|
let name = $derived(library.name);
|
||||||
|
|
||||||
const onClose = async () => {
|
const onClose = async () => {
|
||||||
await goto(Route.viewLibrary(library));
|
await goto(Route.viewLibrary(library));
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
let { children, data }: Props = $props();
|
let { children, data }: Props = $props();
|
||||||
|
|
||||||
let users: UserAdminResponseDto[] = $state(data.users);
|
let users: UserAdminResponseDto[] = $derived(data.users);
|
||||||
|
|
||||||
const onUpdate = async (user: UserAdminResponseDto) => {
|
const onUpdate = async (user: UserAdminResponseDto) => {
|
||||||
const index = users.findIndex(({ id }) => id === user.id);
|
const index = users.findIndex(({ id }) => id === user.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user