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:
2026-03-22 00:27:47 +03:00
parent a3a1fe3d75
commit 9d3abd9fa0
4 changed files with 37 additions and 19 deletions
@@ -12,6 +12,11 @@
import ConfirmModal from '$lib/components/ConfirmModal.svelte';
import IconButton from '$lib/components/IconButton.svelte';
import CrossLink from '$lib/components/CrossLink.svelte';
import IconGridSelect from '$lib/components/IconGridSelect.svelte';
const providerTypeItems = [
{ value: 'immich', icon: 'mdiCamera', label: 'Immich' },
];
import EntitySelect from '$lib/components/EntitySelect.svelte';
import { snackSuccess, snackError } from '$lib/stores/snackbar.svelte';
import { highlightFromUrl } from '$lib/highlight';
@@ -162,11 +167,12 @@
</div>
<div>
<label for="cfg-provider-type" class="block text-sm font-medium mb-1">{t('commandConfig.providerType')}</label>
<select id="cfg-provider-type" bind:value={form.provider_type}
class="w-full px-3 py-2 border border-[var(--color-border)] rounded-md text-sm bg-[var(--color-background)]">
<option value="immich">Immich</option>
</select>
<label class="block text-sm font-medium mb-1">{t('commandConfig.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>
<!-- Enabled commands -->