Private
Public Access
1
0

Add board settings modal for editing board properties and deleting boards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-27 18:35:00 -05:00
parent faa2608a47
commit 0e77c50411
3 changed files with 240 additions and 4 deletions
+36
View File
@@ -8,6 +8,7 @@
import { api } from '$lib/utils/api.js';
import { toast } from '$lib/stores/toasts.svelte.js';
import CardModal from '$lib/components/CardModal.svelte';
import BoardSettingsModal from '$lib/components/BoardSettingsModal.svelte';
import ActivityFeed from '$lib/components/ActivityFeed.svelte';
import BoardFilters from '$lib/components/BoardFilters.svelte';
import BulkToolbar from '$lib/components/BulkToolbar.svelte';
@@ -34,6 +35,7 @@
let editingColumnTitle = $state('');
let viewingUsers = $state<any[]>([]);
let showActivity = $state(false);
let showSettings = $state(false);
let showArchivedCards = $state(false);
let archivedCards = $state<any[]>([]);
let activeFilters = $state<FilterState>({ labelIds: [], assigneeIds: [], due: null });
@@ -205,6 +207,9 @@
if (d.board) {
data.board.title = d.board.title;
data.board.visibility = d.board.visibility;
if (d.board.description !== undefined) data.board.description = d.board.description;
if (d.board.background !== undefined) data.board.background = d.board.background;
if (d.board.categoryId !== undefined) data.board.categoryId = d.board.categoryId;
}
}
@@ -421,6 +426,23 @@
<title>{data.board.title}</title>
</svelte:head>
{#if showSettings}
<BoardSettingsModal
board={data.board}
categories={data.categories}
canDelete={data.canDelete}
onclose={() => (showSettings = false)}
onsave={(updated) => {
data.board.title = updated.title;
data.board.visibility = updated.visibility;
data.board.description = updated.description;
data.board.background = updated.background;
data.board.categoryId = updated.categoryId;
showSettings = false;
}}
/>
{/if}
{#if selectedCard}
<CardModal
card={selectedCard}
@@ -526,6 +548,20 @@
</svg>
Activity
</button>
{#if data.canEdit}
<button
onclick={() => (showSettings = true)}
class="rounded px-2 py-1 text-sm text-gray-500 hover:bg-gray-200 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-300 transition flex items-center gap-1"
title="Board settings"
aria-label="Board settings"
>
<svg class="w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd" />
</svg>
Settings
</button>
{/if}
</div>
<!-- Filters bar -->