fix(contacts): remove groups store dependency from data page

- Remove groupsStore import and usage from data/+page.svelte
- Remove group filter from export options (groups feature not implemented)
- Clean up export button removal from ContactList

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2025-12-09 18:07:56 +01:00
parent 4e5d12aa53
commit 05dd9a0063
2 changed files with 6 additions and 30 deletions

View file

@ -26,7 +26,7 @@
let loadMoreTrigger: HTMLDivElement;
// Filter state
let selectedGroupId = $state<string | null>(null);
let selectedTagId = $state<string | null>(null);
let contactFilter = $state<ContactFilter>('all');
let birthdayFilter = $state<BirthdayFilter>('all');
let selectedCompany = $state<string | null>(null);
@ -432,13 +432,13 @@
</button>
<FilterBar
contacts={contactsStore.contacts}
{selectedGroupId}
onGroupChange={(id) => {
selectedGroupId = id;
{selectedTagId}
onTagChange={(id) => {
selectedTagId = id;
if (id) {
contactsStore.setGroupId(id);
contactsStore.setTagId(id);
} else {
contactsStore.setGroupId(undefined);
contactsStore.setTagId(undefined);
}
contactsStore.loadContacts();
}}

View file

@ -8,7 +8,6 @@
import { importApi, type ImportPreviewResponse, type DuplicateAction } from '$lib/api/import';
import { exportApi, type ExportFormat } from '$lib/api/export';
import { contactsStore } from '$lib/stores/contacts.svelte';
import { groupsStore } from '$lib/stores/groups.svelte';
import '$lib/i18n';
type Tab = 'import' | 'export';
@ -40,19 +39,11 @@
let includeArchived = $state(false);
let includeNotes = $state(true);
let includePhotos = $state(true);
let selectedGroupId = $state<string | null>(null);
let onlyFavorites = $state(false);
let isExporting = $state(false);
let exportError = $state<string | null>(null);
let exportSuccess = $state(false);
// Load groups for export filter
$effect(() => {
if (activeTab === 'export' && groupsStore.groups.length === 0) {
groupsStore.loadGroups();
}
});
function setActiveTab(tab: Tab) {
activeTab = tab;
updateUrl();
@ -156,7 +147,6 @@
try {
await exportApi.exportContacts({
format: exportFormat,
groupId: selectedGroupId || undefined,
includeFavorites: onlyFavorites || undefined,
includeArchived,
});
@ -529,20 +519,6 @@
<h3 class="font-semibold text-foreground">Filter</h3>
<div class="space-y-4">
<!-- Group Filter -->
<div>
<label class="block text-sm font-medium text-foreground mb-2">Gruppe</label>
<select
bind:value={selectedGroupId}
class="w-full px-3 py-2 bg-background border border-border rounded-lg text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"
>
<option value={null}>Alle Kontakte</option>
{#each groupsStore.groups as group}
<option value={group.id}>{group.name}</option>
{/each}
</select>
</div>
<!-- Favorites Only -->
<label class="flex items-center gap-3 cursor-pointer">
<input