From b66405ca73c97d2472b78ac92df7ee0fe3ee03b9 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 21 Dec 2025 12:37:54 -0800 Subject: [PATCH] remove redundant edit description button and edit party modal --- src/lib/components/party/Party.svelte | 96 +------------------ .../sidebar/DescriptionSidebar.svelte | 27 +----- .../openDescriptionSidebar.svelte.ts | 10 +- 3 files changed, 5 insertions(+), 128 deletions(-) diff --git a/src/lib/components/party/Party.svelte b/src/lib/components/party/Party.svelte index eb5f1aa9..3adc78c3 100644 --- a/src/lib/components/party/Party.svelte +++ b/src/lib/components/party/Party.svelte @@ -122,8 +122,6 @@ let loading = $state(false) let error = $state(null) let selectedSlot = $state(0) - let editDialogOpen = $state(false) - let editingTitle = $state('') let conflictDialogOpen = $state(false) let conflictData = $state(null) @@ -327,30 +325,6 @@ } } - // Edit dialog functions - function openEditDialog() { - if (!canEdit()) return - editingTitle = party.name || '' - editDialogOpen = true - } - - async function savePartyTitle() { - if (!canEdit()) return - - try { - loading = true - error = null - - // Update party title via API - await updatePartyDetails({ name: editingTitle }) - editDialogOpen = false - } catch (err: any) { - error = err.message || 'Failed to update party title' - } finally { - loading = false - } - } - // Party operations async function updatePartyDetails(updates: Omit) { if (!canEdit()) return @@ -431,9 +405,7 @@ function openDescriptionPanel() { openDescriptionSidebar({ title: party.name || '(untitled party)', - description: party.description, - canEdit: canEdit(), - onEdit: openEditDialog + description: party.description }) } @@ -1046,34 +1018,6 @@ - - - {#snippet children()} - - -
- - -
-
- (editDialogOpen = false)} - cancelDisabled={loading} - primaryAction={{ - label: loading ? 'Saving...' : 'Save', - onclick: savePartyTitle, - disabled: loading || !editingTitle.trim() - }} - /> - {/snippet} -
- import DescriptionRenderer from '$lib/components/DescriptionRenderer.svelte' - import Button from '$lib/components/ui/Button.svelte' interface Props { - title?: string description?: string - canEdit?: boolean - onEdit?: () => void } - let { title, description, canEdit = false, onEdit }: Props = $props() + let { description }: Props = $props()
@@ -22,19 +18,10 @@ {:else}

No description available for this party.

- {#if canEdit} - - {/if}
{/if}
- - {#if canEdit && description} -
- -
- {/if} diff --git a/src/lib/features/description/openDescriptionSidebar.svelte.ts b/src/lib/features/description/openDescriptionSidebar.svelte.ts index 2ba0fd00..b304ea0f 100644 --- a/src/lib/features/description/openDescriptionSidebar.svelte.ts +++ b/src/lib/features/description/openDescriptionSidebar.svelte.ts @@ -4,19 +4,13 @@ import DescriptionSidebar from '$lib/components/sidebar/DescriptionSidebar.svelt interface DescriptionSidebarOptions { title?: string | undefined description?: string | undefined - canEdit?: boolean | undefined - onEdit?: (() => void) | undefined } export function openDescriptionSidebar(options: DescriptionSidebarOptions) { - const { title, description, canEdit = false, onEdit } = options + const { title, description } = options - // Open the sidebar with the party title as the header sidebar.openWithComponent(title ?? '', DescriptionSidebar, { - title, - description, - canEdit, - onEdit + description }) }