feat: Add update_theme functionality with UI support
Backend: - Add PUT /api/themes/:id endpoint for updating existing themes Store: - Add updateTheme method to theme store MCP: - Add update_theme tool to modify name, description, or save current variables UI: - Add edit button to ThemeListItem (custom themes only) - Add edit modal with name and description fields - Support editing from both desktop sidebar and mobile dropdown
This commit is contained in:
@@ -11,6 +11,7 @@ const emit = defineEmits<{
|
||||
delete: [id: string]
|
||||
clone: [id: string]
|
||||
setDefault: [id: string]
|
||||
edit: [theme: Theme]
|
||||
}>()
|
||||
|
||||
function getAccentColor(): string {
|
||||
@@ -48,6 +49,18 @@ function getAccentColor(): string {
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="!theme.is_system"
|
||||
class="action-btn"
|
||||
@click="emit('edit', theme)"
|
||||
title="Edit theme"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
|
||||
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="action-btn"
|
||||
@click="emit('clone', theme.id)"
|
||||
|
||||
Reference in New Issue
Block a user