mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
use for Props
This commit is contained in:
@@ -3,11 +3,11 @@
|
|||||||
import { Field, Input, MultiSelect, Select, Switch, Text, type SelectItem } from '@immich/ui';
|
import { Field, Input, MultiSelect, Select, Switch, Text, type SelectItem } from '@immich/ui';
|
||||||
import WorkflowPickerField from './WorkflowPickerField.svelte';
|
import WorkflowPickerField from './WorkflowPickerField.svelte';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
schema: object | null;
|
schema: object | null;
|
||||||
config: Record<string, unknown>;
|
config: Record<string, unknown>;
|
||||||
configKey?: string;
|
configKey?: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { schema = null, config = $bindable({}), configKey }: Props = $props();
|
let { schema = null, config = $bindable({}), configKey }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
interface Props {
|
type Props = {
|
||||||
animated?: boolean;
|
animated?: boolean;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { animated = true }: Props = $props();
|
let { animated = true }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
import { mdiCodeJson } from '@mdi/js';
|
import { mdiCodeJson } from '@mdi/js';
|
||||||
import { JSONEditor, Mode, type Content, type OnChangeStatus } from 'svelte-jsoneditor';
|
import { JSONEditor, Mode, type Content, type OnChangeStatus } from 'svelte-jsoneditor';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
jsonContent: WorkflowPayload;
|
jsonContent: WorkflowPayload;
|
||||||
onApply: () => void;
|
onApply: () => void;
|
||||||
onContentChange: (content: WorkflowPayload) => void;
|
onContentChange: (content: WorkflowPayload) => void;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { jsonContent, onApply, onContentChange }: Props = $props();
|
let { jsonContent, onApply, onContentChange }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
import { mdiClose, mdiPlus } from '@mdi/js';
|
import { mdiClose, mdiPlus } from '@mdi/js';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
component: ComponentConfig;
|
component: ComponentConfig;
|
||||||
configKey: string;
|
configKey: string;
|
||||||
value: string | string[] | undefined;
|
value: string | string[] | undefined;
|
||||||
onchange: (value: string | string[]) => void;
|
onchange: (value: string | string[]) => void;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { component, configKey, value = $bindable(), onchange }: Props = $props();
|
let { component, configKey, value = $bindable(), onchange }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
import { mdiClose, mdiFilterOutline, mdiFlashOutline, mdiPlayCircleOutline, mdiViewDashboardOutline } from '@mdi/js';
|
import { mdiClose, mdiFilterOutline, mdiFlashOutline, mdiPlayCircleOutline, mdiViewDashboardOutline } from '@mdi/js';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
trigger: PluginTriggerResponseDto;
|
trigger: PluginTriggerResponseDto;
|
||||||
filters: PluginFilterResponseDto[];
|
filters: PluginFilterResponseDto[];
|
||||||
actions: PluginActionResponseDto[];
|
actions: PluginActionResponseDto[];
|
||||||
}
|
};
|
||||||
|
|
||||||
let { trigger, filters, actions }: Props = $props();
|
let { trigger, filters, actions }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
import { mdiFaceRecognition, mdiFileUploadOutline, mdiLightningBolt } from '@mdi/js';
|
import { mdiFaceRecognition, mdiFileUploadOutline, mdiLightningBolt } from '@mdi/js';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
trigger: PluginTriggerResponseDto;
|
trigger: PluginTriggerResponseDto;
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
onclick: () => void;
|
onclick: () => void;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { trigger, selected, onclick }: Props = $props();
|
let { trigger, selected, onclick }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
import { mdiFilterOutline, mdiPlayCircleOutline } from '@mdi/js';
|
import { mdiFilterOutline, mdiPlayCircleOutline } from '@mdi/js';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
filters: PluginFilterResponseDto[];
|
filters: PluginFilterResponseDto[];
|
||||||
actions: PluginActionResponseDto[];
|
actions: PluginActionResponseDto[];
|
||||||
onClose: (result?: { type: 'filter' | 'action'; item: PluginFilterResponseDto | PluginActionResponseDto }) => void;
|
onClose: (result?: { type: 'filter' | 'action'; item: PluginFilterResponseDto | PluginActionResponseDto }) => void;
|
||||||
type?: 'filter' | 'action';
|
type?: 'filter' | 'action';
|
||||||
}
|
};
|
||||||
|
|
||||||
let { filters, actions, onClose, type }: Props = $props();
|
let { filters, actions, onClose, type }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
excludedIds?: string[];
|
excludedIds?: string[];
|
||||||
onClose: (people?: PersonResponseDto[]) => void;
|
onClose: (people?: PersonResponseDto[]) => void;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { multiple = false, excludedIds = [], onClose }: Props = $props();
|
let { multiple = false, excludedIds = [], onClose }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,9 @@
|
|||||||
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
data: PageData;
|
data: PageData;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
@@ -56,9 +56,9 @@
|
|||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
|
||||||
interface Props {
|
type Props = {
|
||||||
data: PageData;
|
data: PageData;
|
||||||
}
|
};
|
||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user