use for Props

This commit is contained in:
Alex Tran
2025-12-05 15:15:09 +00:00
parent 1c64d21148
commit 6222c4e97f
10 changed files with 20 additions and 20 deletions

View File

@@ -3,11 +3,11 @@
import { Field, Input, MultiSelect, Select, Switch, Text, type SelectItem } from '@immich/ui';
import WorkflowPickerField from './WorkflowPickerField.svelte';
interface Props {
type Props = {
schema: object | null;
config: Record<string, unknown>;
configKey?: string;
}
};
let { schema = null, config = $bindable({}), configKey }: Props = $props();

View File

@@ -1,7 +1,7 @@
<script lang="ts">
interface Props {
type Props = {
animated?: boolean;
}
};
let { animated = true }: Props = $props();
</script>

View File

@@ -5,11 +5,11 @@
import { mdiCodeJson } from '@mdi/js';
import { JSONEditor, Mode, type Content, type OnChangeStatus } from 'svelte-jsoneditor';
interface Props {
type Props = {
jsonContent: WorkflowPayload;
onApply: () => void;
onContentChange: (content: WorkflowPayload) => void;
}
};
let { jsonContent, onApply, onContentChange }: Props = $props();

View File

@@ -8,12 +8,12 @@
import { mdiClose, mdiPlus } from '@mdi/js';
import { t } from 'svelte-i18n';
interface Props {
type Props = {
component: ComponentConfig;
configKey: string;
value: string | string[] | undefined;
onchange: (value: string | string[]) => void;
}
};
let { component, configKey, value = $bindable(), onchange }: Props = $props();

View File

@@ -9,11 +9,11 @@
import { mdiClose, mdiFilterOutline, mdiFlashOutline, mdiPlayCircleOutline, mdiViewDashboardOutline } from '@mdi/js';
import { t } from 'svelte-i18n';
interface Props {
type Props = {
trigger: PluginTriggerResponseDto;
filters: PluginFilterResponseDto[];
actions: PluginActionResponseDto[];
}
};
let { trigger, filters, actions }: Props = $props();

View File

@@ -4,11 +4,11 @@
import { mdiFaceRecognition, mdiFileUploadOutline, mdiLightningBolt } from '@mdi/js';
import { t } from 'svelte-i18n';
interface Props {
type Props = {
trigger: PluginTriggerResponseDto;
selected: boolean;
onclick: () => void;
}
};
let { trigger, selected, onclick }: Props = $props();

View File

@@ -4,12 +4,12 @@
import { mdiFilterOutline, mdiPlayCircleOutline } from '@mdi/js';
import { t } from 'svelte-i18n';
interface Props {
type Props = {
filters: PluginFilterResponseDto[];
actions: PluginActionResponseDto[];
onClose: (result?: { type: 'filter' | 'action'; item: PluginFilterResponseDto | PluginActionResponseDto }) => void;
type?: 'filter' | 'action';
}
};
let { filters, actions, onClose, type }: Props = $props();

View File

@@ -8,11 +8,11 @@
import { onMount } from 'svelte';
import { t } from 'svelte-i18n';
interface Props {
type Props = {
multiple?: boolean;
excludedIds?: string[];
onClose: (people?: PersonResponseDto[]) => void;
}
};
let { multiple = false, excludedIds = [], onClose }: Props = $props();

View File

@@ -37,9 +37,9 @@
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
import type { PageData } from './$types';
interface Props {
type Props = {
data: PageData;
}
};
let { data }: Props = $props();

View File

@@ -56,9 +56,9 @@
import { t } from 'svelte-i18n';
import type { PageData } from './$types';
interface Props {
type Props = {
data: PageData;
}
};
let { data }: Props = $props();