chore: various UI improvements and fixes

Calendar:
- Fix EventDetailModal and QuickEventOverlay component updates
- Update TodoDetailModal and TodoItem components
- Remove unused settings section code
- Fix network page styling

Todo Backend:
- Improve task service validation

Shared UI:
- Update Card, DataCard, Input components with improvements
- Enhance TagBadge with better color handling
- Fix TagEditModal and TagList components
- Update PillNavigation and PillDropdown styling
- Add NetworkGraph improvements
- Update CommandBar, FormModal, AppsPage components
- Fix chart types and GlobalSettingsSection

🤖 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-10 20:05:02 +01:00
parent b92dc296a1
commit 0b28eba3f2
26 changed files with 167 additions and 198 deletions

View file

@ -6,7 +6,7 @@ pnpm docker:up:all
pnpm docker:down pnpm docker:down
pnpm dev:calendar:app pnpm dev:calendar:full
pnpm dev:todo:full pnpm dev:todo:full
pnpm dev:contacts:full pnpm dev:contacts:full
pnpm dev:clock:full pnpm dev:clock:full

View file

@ -145,8 +145,8 @@
<svelte:window onkeydown={handleKeydown} /> <svelte:window onkeydown={handleKeydown} />
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions --> <!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions a11y_no_noninteractive_element_to_interactive_role -->
<div class="modal-backdrop" onclick={handleBackdropClick}> <div class="modal-backdrop" onclick={handleBackdropClick} role="button" tabindex="-1">
<div class="modal-container" role="dialog" aria-modal="true" aria-labelledby="modal-title"> <div class="modal-container" role="dialog" aria-modal="true" aria-labelledby="modal-title">
{#if loading} {#if loading}
<EventDetailSkeleton /> <EventDetailSkeleton />

View file

@ -383,7 +383,7 @@
<!-- Tags --> <!-- Tags -->
{#if availableTags.length > 0 || eventTagsStore.loading} {#if availableTags.length > 0 || eventTagsStore.loading}
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<label class="text-sm font-medium text-foreground">Tags</label> <span class="text-sm font-medium text-foreground">Tags</span>
<TagSelector <TagSelector
tags={availableTags} tags={availableTags}
{selectedTags} {selectedTags}

View file

@ -551,7 +551,7 @@
></div> ></div>
</div> </div>
<div class="row-content"> <div class="row-content">
<label class="field-label">Kalender</label> <span class="field-label">Kalender</span>
{#if calendarsStore.calendars.length > 0} {#if calendarsStore.calendars.length > 0}
<select class="field-select" value={calendarId} onchange={handleCalendarChange}> <select class="field-select" value={calendarId} onchange={handleCalendarChange}>
{#each calendarsStore.calendars as cal} {#each calendarsStore.calendars as cal}
@ -565,7 +565,8 @@
</div> </div>
<!-- All day toggle --> <!-- All day toggle -->
<div class="form-row clickable" onclick={handleAllDayToggle}> <!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions a11y_no_noninteractive_element_to_interactive_role -->
<div class="form-row clickable" onclick={handleAllDayToggle} role="button" tabindex="0">
<div class="row-icon"> <div class="row-icon">
<svg class="icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path <path
@ -593,7 +594,7 @@
<div class="form-row sub-row"> <div class="form-row sub-row">
<div class="row-icon"></div> <div class="row-icon"></div>
<div class="row-content"> <div class="row-content">
<label class="field-label">Anzeigeart</label> <span class="field-label">Anzeigeart</span>
<select class="field-select" bind:value={allDayDisplayMode}> <select class="field-select" bind:value={allDayDisplayMode}>
<option value="default">Standard (aus Einstellungen)</option> <option value="default">Standard (aus Einstellungen)</option>
<option value="header">In Kopfzeile</option> <option value="header">In Kopfzeile</option>
@ -617,7 +618,7 @@
</div> </div>
<div class="row-content datetime-row"> <div class="row-content datetime-row">
<div class="datetime-field"> <div class="datetime-field">
<label class="field-label">Beginn</label> <span class="field-label">Beginn</span>
<input <input
type="date" type="date"
class="field-input" class="field-input"
@ -627,7 +628,7 @@
</div> </div>
{#if !isAllDay} {#if !isAllDay}
<div class="datetime-field time-field"> <div class="datetime-field time-field">
<label class="field-label">Uhrzeit</label> <span class="field-label">Uhrzeit</span>
<input <input
type="time" type="time"
class="field-input" class="field-input"
@ -653,7 +654,7 @@
</div> </div>
<div class="row-content datetime-row"> <div class="row-content datetime-row">
<div class="datetime-field"> <div class="datetime-field">
<label class="field-label">Ende</label> <span class="field-label">Ende</span>
<input <input
type="date" type="date"
class="field-input" class="field-input"
@ -663,7 +664,7 @@
</div> </div>
{#if !isAllDay} {#if !isAllDay}
<div class="datetime-field time-field"> <div class="datetime-field time-field">
<label class="field-label">Uhrzeit</label> <span class="field-label">Uhrzeit</span>
<input <input
type="time" type="time"
class="field-input" class="field-input"
@ -731,7 +732,7 @@
<div class="row-icon"></div> <div class="row-icon"></div>
<div class="row-content address-details-form"> <div class="row-content address-details-form">
<div class="address-field"> <div class="address-field">
<label class="field-label">Straße</label> <span class="field-label">Straße</span>
<input <input
type="text" type="text"
class="field-input" class="field-input"
@ -741,7 +742,7 @@
</div> </div>
<div class="address-row"> <div class="address-row">
<div class="address-field postal"> <div class="address-field postal">
<label class="field-label">PLZ</label> <span class="field-label">PLZ</span>
<input <input
type="text" type="text"
class="field-input" class="field-input"
@ -750,7 +751,7 @@
/> />
</div> </div>
<div class="address-field city"> <div class="address-field city">
<label class="field-label">Stadt</label> <span class="field-label">Stadt</span>
<input <input
type="text" type="text"
class="field-input" class="field-input"
@ -760,7 +761,7 @@
</div> </div>
</div> </div>
<div class="address-field"> <div class="address-field">
<label class="field-label">Land</label> <span class="field-label">Land</span>
<input <input
type="text" type="text"
class="field-input" class="field-input"

View file

@ -83,6 +83,7 @@
</button> </button>
{:else} {:else}
<form class="quick-add-form" onsubmit={handleSubmit}> <form class="quick-add-form" onsubmit={handleSubmit}>
<!-- svelte-ignore a11y_autofocus -->
<input <input
bind:this={inputRef} bind:this={inputRef}
bind:value={title} bind:value={title}

View file

@ -23,12 +23,21 @@
let isDeleting = $state(false); let isDeleting = $state(false);
let isToggling = $state(false); let isToggling = $state(false);
// Form state // Form state - initialized with derived values
let title = $state(task.title); let title = $state(initialTask.title);
let description = $state(task.description || ''); let description = $state(initialTask.description || '');
let dueDate = $state(task.dueDate ? formatDateForInput(task.dueDate) : ''); let dueDate = $state(initialTask.dueDate ? formatDateForInput(initialTask.dueDate) : '');
let dueTime = $state(task.dueTime || ''); let dueTime = $state(initialTask.dueTime || '');
let priority = $state<TaskPriority>(task.priority); let priority = $state<TaskPriority>(initialTask.priority);
// Sync form state when task changes
$effect(() => {
title = task.title;
description = task.description || '';
dueDate = task.dueDate ? formatDateForInput(task.dueDate) : '';
dueTime = task.dueTime || '';
priority = task.priority;
});
function formatDateForInput(date: string | Date | null | undefined): string { function formatDateForInput(date: string | Date | null | undefined): string {
if (!date) return ''; if (!date) return '';
@ -132,8 +141,8 @@
<svelte:window onkeydown={handleKeydown} /> <svelte:window onkeydown={handleKeydown} />
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions --> <!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions a11y_no_noninteractive_element_to_interactive_role -->
<div class="modal-backdrop" onclick={handleBackdropClick}> <div class="modal-backdrop" onclick={handleBackdropClick} role="button" tabindex="-1">
<div class="modal" role="dialog" aria-labelledby="modal-title" aria-modal="true"> <div class="modal" role="dialog" aria-labelledby="modal-title" aria-modal="true">
<!-- Header --> <!-- Header -->
<div class="modal-header"> <div class="modal-header">
@ -168,14 +177,7 @@
> >
<div class="form-group"> <div class="form-group">
<label for="title">Titel</label> <label for="title">Titel</label>
<input <input id="title" type="text" bind:value={title} placeholder="Aufgabentitel" required />
id="title"
type="text"
bind:value={title}
placeholder="Aufgabentitel"
required
autofocus
/>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -201,7 +203,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Priorität</label> <span class="label-text">Priorität</span>
<div class="priority-options"> <div class="priority-options">
{#each Object.entries(PRIORITY_LABELS) as [key, label]} {#each Object.entries(PRIORITY_LABELS) as [key, label]}
<button <button

View file

@ -77,6 +77,7 @@
} }
</script> </script>
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
<div <div
class="todo-item" class="todo-item"
class:completed={task.isCompleted} class:completed={task.isCompleted}

View file

@ -5,7 +5,7 @@
import { NetworkGraph, NetworkControls } from '@manacore/shared-ui'; import { NetworkGraph, NetworkControls } from '@manacore/shared-ui';
import '$lib/i18n'; import '$lib/i18n';
let graphComponent: NetworkGraph; let graphComponent = $state<NetworkGraph | null>(null);
let controlsComponent: NetworkControls; let controlsComponent: NetworkControls;
let graphContainer: HTMLDivElement; let graphContainer: HTMLDivElement;
@ -172,7 +172,11 @@
<div class="info-panel"> <div class="info-panel">
<div class="info-header"> <div class="info-header">
<h3>{networkStore.selectedNode.name}</h3> <h3>{networkStore.selectedNode.name}</h3>
<button class="close-btn" onclick={() => networkStore.selectNode(null)}> <button
class="close-btn"
onclick={() => networkStore.selectNode(null)}
aria-label="Schließen"
>
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path <path
stroke-linecap="round" stroke-linecap="round"

View file

@ -516,105 +516,6 @@
color: hsl(var(--color-muted-foreground)); color: hsl(var(--color-muted-foreground));
} }
/* Language options */
.locale-options {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.locale-option {
padding: 0.5rem 1rem;
border: 2px solid hsl(var(--color-border));
border-radius: var(--radius-md);
background: transparent;
color: hsl(var(--color-foreground));
font-size: 0.875rem;
cursor: pointer;
transition: all 150ms ease;
}
.locale-option:hover {
border-color: hsl(var(--color-primary) / 0.5);
}
.locale-option.active {
border-color: hsl(var(--color-primary));
background: hsl(var(--color-primary) / 0.1);
}
/* Theme options */
.theme-options {
display: flex;
gap: 0.5rem;
}
.theme-option {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border: 2px solid hsl(var(--color-border));
border-radius: var(--radius-md);
background: transparent;
color: hsl(var(--color-foreground));
font-size: 0.875rem;
cursor: pointer;
transition: all 150ms ease;
}
.theme-option:hover {
border-color: hsl(var(--color-primary) / 0.5);
}
.theme-option.active {
border-color: hsl(var(--color-primary));
background: hsl(var(--color-primary) / 0.1);
}
.theme-option .icon {
width: 1.25rem;
height: 1.25rem;
}
/* Variant grid */
.variant-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 0.5rem;
}
.variant-option {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
padding: 0.75rem;
border: 2px solid hsl(var(--color-border));
border-radius: var(--radius-md);
background: transparent;
cursor: pointer;
transition: all 150ms ease;
}
.variant-option:hover {
border-color: hsl(var(--color-primary) / 0.5);
}
.variant-option.active {
border-color: hsl(var(--color-primary));
background: hsl(var(--color-primary) / 0.1);
}
.variant-icon {
font-size: 1.5rem;
}
.variant-label {
font-size: 0.75rem;
color: hsl(var(--color-muted-foreground));
}
/* Select input */ /* Select input */
.select-input { .select-input {
width: 100%; width: 100%;

View file

@ -439,12 +439,16 @@ export class TaskService {
const endDate = new Date(today); const endDate = new Date(today);
endDate.setDate(endDate.getDate() + days); endDate.setDate(endDate.getDate() + days);
// Use SQL date strings for more reliable comparison
const todayStr = today.toISOString();
const endDateStr = endDate.toISOString();
const result = await this.db.query.tasks.findMany({ const result = await this.db.query.tasks.findMany({
where: and( where: and(
eq(tasks.userId, userId), eq(tasks.userId, userId),
eq(tasks.isCompleted, false), eq(tasks.isCompleted, false),
gte(tasks.dueDate, today), gte(tasks.dueDate, todayStr),
lte(tasks.dueDate, endDate) lte(tasks.dueDate, endDateStr)
), ),
orderBy: [asc(tasks.dueDate), asc(tasks.order)], orderBy: [asc(tasks.dueDate), asc(tasks.order)],
}); });
@ -526,9 +530,16 @@ export class TaskService {
const taskIds = taskList.map((t) => t.id); const taskIds = taskList.map((t) => t.id);
// Single query to get all task-label relationships // Single query to get all task-label relationships
const allTaskLabels = await this.db.query.taskLabels.findMany({ // Use inArray for better performance with multiple IDs
where: or(...taskIds.map((id) => eq(taskLabels.taskId, id))), const allTaskLabels = await this.db
}); .select()
.from(taskLabels)
.where(
sql`${taskLabels.taskId} IN (${sql.join(
taskIds.map((id) => sql`${id}`),
sql`, `
)})`
);
if (allTaskLabels.length === 0) { if (allTaskLabels.length === 0) {
// No labels for any task - return tasks with empty labels array // No labels for any task - return tasks with empty labels array
@ -538,10 +549,16 @@ export class TaskService {
// Get unique label IDs // Get unique label IDs
const uniqueLabelIds = [...new Set(allTaskLabels.map((tl) => tl.labelId))]; const uniqueLabelIds = [...new Set(allTaskLabels.map((tl) => tl.labelId))];
// Single query to get all labels // Single query to get all labels using IN clause
const allLabels = await this.db.query.labels.findMany({ const allLabels = await this.db
where: or(...uniqueLabelIds.map((id) => eq(labels.id, id))), .select()
}); .from(labels)
.where(
sql`${labels.id} IN (${sql.join(
uniqueLabelIds.map((id) => sql`${id}`),
sql`, `
)})`
);
// Create a map of labelId -> label for fast lookup // Create a map of labelId -> label for fast lookup
const labelMap = new Map(allLabels.map((l) => [l.id, l])); const labelMap = new Map(allLabels.map((l) => [l.id, l]));

View file

@ -110,8 +110,6 @@
color: hsl(var(--color-foreground, 0 0% 17%)); color: hsl(var(--color-foreground, 0 0% 17%));
} }
.feedback-form__input,
.feedback-form__select,
.feedback-form__textarea { .feedback-form__textarea {
padding: 0.75rem; padding: 0.75rem;
border: 1px solid hsl(var(--color-border, 0 0% 90%)); border: 1px solid hsl(var(--color-border, 0 0% 90%));
@ -126,8 +124,6 @@
color: hsl(var(--color-muted-foreground, 0 0% 40%)); color: hsl(var(--color-muted-foreground, 0 0% 40%));
} }
.feedback-form__input:focus,
.feedback-form__select:focus,
.feedback-form__textarea:focus { .feedback-form__textarea:focus {
outline: none; outline: none;
border-color: hsl(var(--color-primary, 47 95% 58%)); border-color: hsl(var(--color-primary, 47 95% 58%));

View file

@ -164,10 +164,7 @@
border-bottom: none; border-bottom: none;
} }
/* Body */ /* Body - padding applied via variant classes above */
.card__body {
/* Padding applied via variant classes above */
}
/* Footer */ /* Footer */
.card__footer { .card__footer {

View file

@ -2,8 +2,6 @@
* Shared Types for Chart Components * Shared Types for Chart Components
*/ */
import type { Component } from 'svelte';
// Stat card variant colors // Stat card variant colors
export type StatVariant = 'success' | 'primary' | 'neutral' | 'danger' | 'info' | 'accent'; export type StatVariant = 'success' | 'primary' | 'neutral' | 'danger' | 'info' | 'accent';
@ -17,11 +15,13 @@ export const STAT_VARIANT_COLORS: Record<StatVariant, { bg: string; color: strin
}; };
// StatsGrid types // StatsGrid types
export interface StatItem { export interface StatItem {
id: string; id: string;
label: string; label: string;
value: number | string; value: number | string;
icon: Component; /** Svelte component to render as icon (e.g., lucide-svelte icon) */
icon: any;
variant: StatVariant; variant: StatVariant;
/** Optional: only show this stat if condition is true */ /** Optional: only show this stat if condition is true */
showCondition?: boolean; showCondition?: boolean;

View file

@ -102,7 +102,7 @@
let creating = $state(false); let creating = $state(false);
let selectedIndex = $state(0); let selectedIndex = $state(0);
let searchTimeout: ReturnType<typeof setTimeout>; let searchTimeout: ReturnType<typeof setTimeout>;
let inputElement: HTMLInputElement; let inputElement = $state<HTMLInputElement | null>(null);
// Computed create preview // Computed create preview
let createPreview = $derived( let createPreview = $derived(
@ -260,6 +260,7 @@
role="dialog" role="dialog"
aria-modal="true" aria-modal="true"
aria-label="Suchen" aria-label="Suchen"
tabindex="-1"
onclick={handleBackdropClick} onclick={handleBackdropClick}
onkeydown={handleKeydown} onkeydown={handleKeydown}
> >

View file

@ -80,6 +80,7 @@
const isClickable = $derived(interactive || !!onclick); const isClickable = $derived(interactive || !!onclick);
</script> </script>
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
<div <div
class="data-card rounded-xl p-4 transition-colors {variantClasses[variant]} {isClickable class="data-card rounded-xl p-4 transition-colors {variantClasses[variant]} {isClickable
? 'cursor-pointer hover:bg-menu-hover' ? 'cursor-pointer hover:bg-menu-hover'
@ -153,6 +154,7 @@
.line-clamp-2 { .line-clamp-2 {
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
} }

View file

@ -5,6 +5,7 @@
value: string; value: string;
oninput?: (value: string) => void; oninput?: (value: string) => void;
onchange?: (value: string) => void; onchange?: (value: string) => void;
onkeydown?: (e: KeyboardEvent) => void;
label?: string; label?: string;
placeholder?: string; placeholder?: string;
type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url'; type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
@ -21,6 +22,7 @@
value = $bindable(), value = $bindable(),
oninput, oninput,
onchange, onchange,
onkeydown,
label, label,
placeholder, placeholder,
type = 'text', type = 'text',
@ -66,6 +68,7 @@
autocomplete={autocomplete as HTMLInputAttributes['autocomplete']} autocomplete={autocomplete as HTMLInputAttributes['autocomplete']}
oninput={handleInput} oninput={handleInput}
onchange={handleChange} onchange={handleChange}
{onkeydown}
class="w-full rounded-lg border px-4 py-2.5 text-theme bg-content transition-colors focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:cursor-not-allowed {error class="w-full rounded-lg border px-4 py-2.5 text-theme bg-content transition-colors focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:cursor-not-allowed {error
? 'border-red-500 focus:ring-red-500/50' ? 'border-red-500 focus:ring-red-500/50'
: 'border-theme'}" : 'border-theme'}"

View file

@ -10,7 +10,7 @@
/** Alternative name field (for compatibility) */ /** Alternative name field (for compatibility) */
text?: string; text?: string;
/** Tag color (hex) */ /** Tag color (hex) */
color?: string; color?: string | null;
/** Nested style object with color */ /** Nested style object with color */
style?: { color?: string }; style?: { color?: string };
} }
@ -55,36 +55,64 @@
} }
</script> </script>
<span {#if clickable}
class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium transition-all" <span
class:cursor-pointer={clickable} class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium transition-all cursor-pointer hover:scale-105"
class:hover:scale-105={clickable} style="background-color: {tagColor}20; color: {tagColor}"
style="background-color: {tagColor}20; color: {tagColor}" onclick={handleClick}
onclick={handleClick} onkeydown={handleKeyDown}
onkeydown={handleKeyDown} role="button"
role={clickable ? 'button' : undefined} tabindex="0"
tabindex={clickable ? 0 : undefined} >
> <!-- Color indicator dot -->
<!-- Color indicator dot --> <div class="h-2 w-2 rounded-full" style="background-color: {tagColor}"></div>
<div class="h-2 w-2 rounded-full" style="background-color: {tagColor}"></div>
<span>{tagName}</span> <span>{tagName}</span>
{#if removable} {#if removable}
<button <button
onclick={handleRemove} onclick={handleRemove}
class="ml-1 rounded-full hover:bg-black/10 p-0.5 transition-colors" class="ml-1 rounded-full hover:bg-black/10 p-0.5 transition-colors"
type="button" type="button"
aria-label="Remove tag" aria-label="Remove tag"
> >
<svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path <path
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
stroke-width="2" stroke-width="2"
d="M6 18L18 6M6 6l12 12" d="M6 18L18 6M6 6l12 12"
/> />
</svg> </svg>
</button> </button>
{/if} {/if}
</span> </span>
{:else}
<span
class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium"
style="background-color: {tagColor}20; color: {tagColor}"
>
<!-- Color indicator dot -->
<div class="h-2 w-2 rounded-full" style="background-color: {tagColor}"></div>
<span>{tagName}</span>
{#if removable}
<button
onclick={handleRemove}
class="ml-1 rounded-full hover:bg-black/10 p-0.5 transition-colors"
type="button"
aria-label="Remove tag"
>
<svg class="h-3 w-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
{/if}
</span>
{/if}

View file

@ -79,22 +79,22 @@
<div class="space-y-6"> <div class="space-y-6">
<!-- Name Input --> <!-- Name Input -->
<div> <div>
<Input bind:value={name} placeholder={namePlaceholder} onkeydown={handleKeyDown} autofocus /> <Input bind:value={name} placeholder={namePlaceholder} onkeydown={handleKeyDown} />
</div> </div>
<!-- Color Picker --> <!-- Color Picker -->
<div> <div>
<label class="block text-sm font-medium text-muted-foreground mb-3"> <span class="block text-sm font-medium text-muted-foreground mb-3">
{colorLabel} {colorLabel}
</label> </span>
<TagColorPicker selectedColor={color} onColorChange={(c) => (color = c)} /> <TagColorPicker selectedColor={color} onColorChange={(c) => (color = c)} />
</div> </div>
<!-- Preview --> <!-- Preview -->
<div> <div>
<label class="block text-sm font-medium text-muted-foreground mb-3"> <span class="block text-sm font-medium text-muted-foreground mb-3">
{previewLabel} {previewLabel}
</label> </span>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<TagBadge tag={previewTag} /> <TagBadge tag={previewTag} />
</div> </div>

View file

@ -83,6 +83,7 @@
<div class={layout === 'grid' ? gridClasses : listClasses}> <div class={layout === 'grid' ? gridClasses : listClasses}>
{#each tags as tag (tag.id)} {#each tags as tag (tag.id)}
{@const color = getTagColor(tag)} {@const color = getTagColor(tag)}
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
<div <div
class=" class="
group relative flex items-center gap-3 p-4 group relative flex items-center gap-3 p-4

View file

@ -32,7 +32,7 @@ export interface Tag {
export interface TagData { export interface TagData {
name?: string; name?: string;
text?: string; text?: string;
color?: string; color?: string | null;
style?: { color?: string }; style?: { color?: string };
} }

View file

@ -148,7 +148,11 @@
{#if open} {#if open}
<!-- Backdrop --> <!-- Backdrop -->
<button class="menu-backdrop" onclick={close} onkeydown={(e) => e.key === 'Escape' && close()} <button
class="menu-backdrop"
onclick={close}
onkeydown={(e) => e.key === 'Escape' && close()}
aria-label="Close dropdown"
></button> ></button>
<!-- Dropdown items --> <!-- Dropdown items -->

View file

@ -467,7 +467,8 @@
{:else if item.iconSvg} {:else if item.iconSvg}
{@html item.iconSvg} {@html item.iconSvg}
{:else if phosphorIcons[item.icon]} {:else if phosphorIcons[item.icon]}
<svelte:component this={phosphorIcons[item.icon]} size={18} class="pill-icon" /> {@const IconComponent = phosphorIcons[item.icon]}
<IconComponent size={18} class="pill-icon" />
{:else} {:else}
<svg class="pill-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="pill-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path <path
@ -500,7 +501,8 @@
<a href={element.href} class="pill glass-pill" class:active={isActive(element.href)}> <a href={element.href} class="pill glass-pill" class:active={isActive(element.href)}>
{#if element.icon} {#if element.icon}
{#if phosphorIcons[element.icon]} {#if phosphorIcons[element.icon]}
<svelte:component this={phosphorIcons[element.icon]} size={18} class="pill-icon" /> {@const IconComponent = phosphorIcons[element.icon]}
<IconComponent size={18} class="pill-icon" />
{:else} {:else}
<svg class="pill-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="pill-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path <path
@ -1206,9 +1208,7 @@
min-height: 1rem; min-height: 1rem;
} }
.sidebar-container .toggle-pill { /* Note: .toggle-pill class may be applied dynamically */
margin-top: auto;
}
/* Segmented control */ /* Segmented control */
.segmented-control { .segmented-control {

View file

@ -84,6 +84,7 @@
</script> </script>
<Modal {visible} {onClose} {title} {icon} {maxWidth}> <Modal {visible} {onClose} {title} {icon} {maxWidth}>
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
<form onsubmit={handleSubmit} onkeydown={handleKeydown} class="space-y-4"> <form onsubmit={handleSubmit} onkeydown={handleKeydown} class="space-y-4">
<!-- Error message --> <!-- Error message -->
{#if error} {#if error}

View file

@ -256,6 +256,7 @@
export { resetZoom, zoomIn, zoomOut, focusOnSelectedNode }; export { resetZoom, zoomIn, zoomOut, focusOnSelectedNode };
</script> </script>
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
<div <div
bind:this={containerElement} bind:this={containerElement}
class="network-graph-container" class="network-graph-container"
@ -265,11 +266,14 @@
role="application" role="application"
aria-label="Network Graph" aria-label="Network Graph"
> >
<!-- svelte-ignore a11y_click_events_have_key_events -->
<svg <svg
bind:this={svgElement} bind:this={svgElement}
class="network-graph-svg" class="network-graph-svg"
style="width: 100%; height: 100%;" style="width: 100%; height: 100%;"
onclick={handleBackgroundClick} onclick={handleBackgroundClick}
role="img"
aria-label="Network graph visualization"
> >
<g transform="translate({transform.x}, {transform.y}) scale({transform.k})"> <g transform="translate({transform.x}, {transform.y}) scale({transform.k})">
<!-- Links --> <!-- Links -->
@ -280,6 +284,7 @@
{@const targetId = typeof link.target === 'string' ? link.target : link.target.id} {@const targetId = typeof link.target === 'string' ? link.target : link.target.id}
{@const isHighlighted = {@const isHighlighted =
selectedNodeId && (sourceId === selectedNodeId || targetId === selectedNodeId)} selectedNodeId && (sourceId === selectedNodeId || targetId === selectedNodeId)}
<!-- svelte-ignore a11y_no_static_element_interactions -->
<!-- Invisible wider line for easier hover --> <!-- Invisible wider line for easier hover -->
<line <line
x1={coords.x1} x1={coords.x1}

View file

@ -156,6 +156,7 @@
<!-- Modal --> <!-- Modal -->
{#if selectedAppIndex !== null} {#if selectedAppIndex !== null}
<!-- svelte-ignore a11y_click_events_have_key_events -->
<div class="modal-overlay" onclick={closeModal} role="dialog" aria-modal="true" tabindex="-1"> <div class="modal-overlay" onclick={closeModal} role="dialog" aria-modal="true" tabindex="-1">
<button onclick={closeModal} class="modal-close-btn" aria-label="Close modal"> <button onclick={closeModal} class="modal-close-btn" aria-label="Close modal">
<svg <svg
@ -383,6 +384,7 @@
margin: 0; margin: 0;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
} }

View file

@ -209,6 +209,7 @@
: 'bg-gray-200 dark:bg-gray-700'}" : 'bg-gray-200 dark:bg-gray-700'}"
onclick={() => onclick={() =>
handleSidebarChange(!userSettings.globalSettings.nav.sidebarCollapsed)} handleSidebarChange(!userSettings.globalSettings.nav.sidebarCollapsed)}
aria-label="Toggle sidebar collapsed state"
> >
<span <span
class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {userSettings class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {userSettings
@ -416,6 +417,7 @@
? 'bg-[hsl(var(--primary))]' ? 'bg-[hsl(var(--primary))]'
: 'bg-gray-200 dark:bg-gray-700'}" : 'bg-gray-200 dark:bg-gray-700'}"
onclick={() => handleSoundsChange(!(userSettings.general?.soundsEnabled ?? true))} onclick={() => handleSoundsChange(!(userSettings.general?.soundsEnabled ?? true))}
aria-label="Toggle sound effects"
> >
<span <span
class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {(userSettings class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {(userSettings