feat: add provider type selector to tracking-configs, use IconGridSelect everywhere
- Tracking Configs: add provider type field (was missing entirely) - All 4 config pages: provider type uses IconGridSelect during creation, shown as read-only text during editing (provider type is immutable) - Pages: tracking-configs, command-configs, template-configs, command-template-configs
This commit is contained in:
@@ -13,6 +13,11 @@
|
||||
import ConfirmModal from '$lib/components/ConfirmModal.svelte';
|
||||
import Hint from '$lib/components/Hint.svelte';
|
||||
import IconButton from '$lib/components/IconButton.svelte';
|
||||
import IconGridSelect from '$lib/components/IconGridSelect.svelte';
|
||||
|
||||
const providerTypeItems = [
|
||||
{ value: 'immich', icon: 'mdiCamera', label: 'Immich' },
|
||||
];
|
||||
import { snackSuccess, snackError } from '$lib/stores/snackbar.svelte';
|
||||
import { highlightFromUrl } from '$lib/highlight';
|
||||
import type { TrackingConfig } from '$lib/types';
|
||||
@@ -98,6 +103,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-1">{t('trackingConfig.providerType')}</label>
|
||||
{#if !editing}
|
||||
<IconGridSelect items={providerTypeItems} bind:value={form.provider_type} columns={2} />
|
||||
{:else}
|
||||
<p class="text-sm text-[var(--color-muted-foreground)]">{form.provider_type}</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Event tracking -->
|
||||
<fieldset class="border border-[var(--color-border)] rounded-md p-3">
|
||||
<legend class="text-sm font-medium px-1">{t('trackingConfig.eventTracking')}</legend>
|
||||
|
||||
Reference in New Issue
Block a user