mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
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:
parent
b92dc296a1
commit
0b28eba3f2
26 changed files with 167 additions and 198 deletions
|
|
@ -6,7 +6,7 @@ pnpm docker:up:all
|
|||
|
||||
pnpm docker:down
|
||||
|
||||
pnpm dev:calendar:app
|
||||
pnpm dev:calendar:full
|
||||
pnpm dev:todo:full
|
||||
pnpm dev:contacts:full
|
||||
pnpm dev:clock:full
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@
|
|||
|
||||
<svelte:window onkeydown={handleKeydown} />
|
||||
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
|
||||
<div class="modal-backdrop" onclick={handleBackdropClick}>
|
||||
<!-- 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} role="button" tabindex="-1">
|
||||
<div class="modal-container" role="dialog" aria-modal="true" aria-labelledby="modal-title">
|
||||
{#if loading}
|
||||
<EventDetailSkeleton />
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@
|
|||
<!-- Tags -->
|
||||
{#if availableTags.length > 0 || eventTagsStore.loading}
|
||||
<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
|
||||
tags={availableTags}
|
||||
{selectedTags}
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@
|
|||
></div>
|
||||
</div>
|
||||
<div class="row-content">
|
||||
<label class="field-label">Kalender</label>
|
||||
<span class="field-label">Kalender</span>
|
||||
{#if calendarsStore.calendars.length > 0}
|
||||
<select class="field-select" value={calendarId} onchange={handleCalendarChange}>
|
||||
{#each calendarsStore.calendars as cal}
|
||||
|
|
@ -565,7 +565,8 @@
|
|||
</div>
|
||||
|
||||
<!-- 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">
|
||||
<svg class="icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path
|
||||
|
|
@ -593,7 +594,7 @@
|
|||
<div class="form-row sub-row">
|
||||
<div class="row-icon"></div>
|
||||
<div class="row-content">
|
||||
<label class="field-label">Anzeigeart</label>
|
||||
<span class="field-label">Anzeigeart</span>
|
||||
<select class="field-select" bind:value={allDayDisplayMode}>
|
||||
<option value="default">Standard (aus Einstellungen)</option>
|
||||
<option value="header">In Kopfzeile</option>
|
||||
|
|
@ -617,7 +618,7 @@
|
|||
</div>
|
||||
<div class="row-content datetime-row">
|
||||
<div class="datetime-field">
|
||||
<label class="field-label">Beginn</label>
|
||||
<span class="field-label">Beginn</span>
|
||||
<input
|
||||
type="date"
|
||||
class="field-input"
|
||||
|
|
@ -627,7 +628,7 @@
|
|||
</div>
|
||||
{#if !isAllDay}
|
||||
<div class="datetime-field time-field">
|
||||
<label class="field-label">Uhrzeit</label>
|
||||
<span class="field-label">Uhrzeit</span>
|
||||
<input
|
||||
type="time"
|
||||
class="field-input"
|
||||
|
|
@ -653,7 +654,7 @@
|
|||
</div>
|
||||
<div class="row-content datetime-row">
|
||||
<div class="datetime-field">
|
||||
<label class="field-label">Ende</label>
|
||||
<span class="field-label">Ende</span>
|
||||
<input
|
||||
type="date"
|
||||
class="field-input"
|
||||
|
|
@ -663,7 +664,7 @@
|
|||
</div>
|
||||
{#if !isAllDay}
|
||||
<div class="datetime-field time-field">
|
||||
<label class="field-label">Uhrzeit</label>
|
||||
<span class="field-label">Uhrzeit</span>
|
||||
<input
|
||||
type="time"
|
||||
class="field-input"
|
||||
|
|
@ -731,7 +732,7 @@
|
|||
<div class="row-icon"></div>
|
||||
<div class="row-content address-details-form">
|
||||
<div class="address-field">
|
||||
<label class="field-label">Straße</label>
|
||||
<span class="field-label">Straße</span>
|
||||
<input
|
||||
type="text"
|
||||
class="field-input"
|
||||
|
|
@ -741,7 +742,7 @@
|
|||
</div>
|
||||
<div class="address-row">
|
||||
<div class="address-field postal">
|
||||
<label class="field-label">PLZ</label>
|
||||
<span class="field-label">PLZ</span>
|
||||
<input
|
||||
type="text"
|
||||
class="field-input"
|
||||
|
|
@ -750,7 +751,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="address-field city">
|
||||
<label class="field-label">Stadt</label>
|
||||
<span class="field-label">Stadt</span>
|
||||
<input
|
||||
type="text"
|
||||
class="field-input"
|
||||
|
|
@ -760,7 +761,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="address-field">
|
||||
<label class="field-label">Land</label>
|
||||
<span class="field-label">Land</span>
|
||||
<input
|
||||
type="text"
|
||||
class="field-input"
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@
|
|||
</button>
|
||||
{:else}
|
||||
<form class="quick-add-form" onsubmit={handleSubmit}>
|
||||
<!-- svelte-ignore a11y_autofocus -->
|
||||
<input
|
||||
bind:this={inputRef}
|
||||
bind:value={title}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,21 @@
|
|||
let isDeleting = $state(false);
|
||||
let isToggling = $state(false);
|
||||
|
||||
// Form state
|
||||
let title = $state(task.title);
|
||||
let description = $state(task.description || '');
|
||||
let dueDate = $state(task.dueDate ? formatDateForInput(task.dueDate) : '');
|
||||
let dueTime = $state(task.dueTime || '');
|
||||
let priority = $state<TaskPriority>(task.priority);
|
||||
// Form state - initialized with derived values
|
||||
let title = $state(initialTask.title);
|
||||
let description = $state(initialTask.description || '');
|
||||
let dueDate = $state(initialTask.dueDate ? formatDateForInput(initialTask.dueDate) : '');
|
||||
let dueTime = $state(initialTask.dueTime || '');
|
||||
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 {
|
||||
if (!date) return '';
|
||||
|
|
@ -132,8 +141,8 @@
|
|||
|
||||
<svelte:window onkeydown={handleKeydown} />
|
||||
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
|
||||
<div class="modal-backdrop" onclick={handleBackdropClick}>
|
||||
<!-- 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} role="button" tabindex="-1">
|
||||
<div class="modal" role="dialog" aria-labelledby="modal-title" aria-modal="true">
|
||||
<!-- Header -->
|
||||
<div class="modal-header">
|
||||
|
|
@ -168,14 +177,7 @@
|
|||
>
|
||||
<div class="form-group">
|
||||
<label for="title">Titel</label>
|
||||
<input
|
||||
id="title"
|
||||
type="text"
|
||||
bind:value={title}
|
||||
placeholder="Aufgabentitel"
|
||||
required
|
||||
autofocus
|
||||
/>
|
||||
<input id="title" type="text" bind:value={title} placeholder="Aufgabentitel" required />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -201,7 +203,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Priorität</label>
|
||||
<span class="label-text">Priorität</span>
|
||||
<div class="priority-options">
|
||||
{#each Object.entries(PRIORITY_LABELS) as [key, label]}
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
||||
<div
|
||||
class="todo-item"
|
||||
class:completed={task.isCompleted}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
import { NetworkGraph, NetworkControls } from '@manacore/shared-ui';
|
||||
import '$lib/i18n';
|
||||
|
||||
let graphComponent: NetworkGraph;
|
||||
let graphComponent = $state<NetworkGraph | null>(null);
|
||||
let controlsComponent: NetworkControls;
|
||||
let graphContainer: HTMLDivElement;
|
||||
|
||||
|
|
@ -172,7 +172,11 @@
|
|||
<div class="info-panel">
|
||||
<div class="info-header">
|
||||
<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">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
|
|
|
|||
|
|
@ -516,105 +516,6 @@
|
|||
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 {
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -439,12 +439,16 @@ export class TaskService {
|
|||
const endDate = new Date(today);
|
||||
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({
|
||||
where: and(
|
||||
eq(tasks.userId, userId),
|
||||
eq(tasks.isCompleted, false),
|
||||
gte(tasks.dueDate, today),
|
||||
lte(tasks.dueDate, endDate)
|
||||
gte(tasks.dueDate, todayStr),
|
||||
lte(tasks.dueDate, endDateStr)
|
||||
),
|
||||
orderBy: [asc(tasks.dueDate), asc(tasks.order)],
|
||||
});
|
||||
|
|
@ -526,9 +530,16 @@ export class TaskService {
|
|||
const taskIds = taskList.map((t) => t.id);
|
||||
|
||||
// Single query to get all task-label relationships
|
||||
const allTaskLabels = await this.db.query.taskLabels.findMany({
|
||||
where: or(...taskIds.map((id) => eq(taskLabels.taskId, id))),
|
||||
});
|
||||
// Use inArray for better performance with multiple IDs
|
||||
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) {
|
||||
// No labels for any task - return tasks with empty labels array
|
||||
|
|
@ -538,10 +549,16 @@ export class TaskService {
|
|||
// Get unique label IDs
|
||||
const uniqueLabelIds = [...new Set(allTaskLabels.map((tl) => tl.labelId))];
|
||||
|
||||
// Single query to get all labels
|
||||
const allLabels = await this.db.query.labels.findMany({
|
||||
where: or(...uniqueLabelIds.map((id) => eq(labels.id, id))),
|
||||
});
|
||||
// Single query to get all labels using IN clause
|
||||
const allLabels = await this.db
|
||||
.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
|
||||
const labelMap = new Map(allLabels.map((l) => [l.id, l]));
|
||||
|
|
|
|||
|
|
@ -110,8 +110,6 @@
|
|||
color: hsl(var(--color-foreground, 0 0% 17%));
|
||||
}
|
||||
|
||||
.feedback-form__input,
|
||||
.feedback-form__select,
|
||||
.feedback-form__textarea {
|
||||
padding: 0.75rem;
|
||||
border: 1px solid hsl(var(--color-border, 0 0% 90%));
|
||||
|
|
@ -126,8 +124,6 @@
|
|||
color: hsl(var(--color-muted-foreground, 0 0% 40%));
|
||||
}
|
||||
|
||||
.feedback-form__input:focus,
|
||||
.feedback-form__select:focus,
|
||||
.feedback-form__textarea:focus {
|
||||
outline: none;
|
||||
border-color: hsl(var(--color-primary, 47 95% 58%));
|
||||
|
|
|
|||
|
|
@ -164,10 +164,7 @@
|
|||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
.card__body {
|
||||
/* Padding applied via variant classes above */
|
||||
}
|
||||
/* Body - padding applied via variant classes above */
|
||||
|
||||
/* Footer */
|
||||
.card__footer {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
* Shared Types for Chart Components
|
||||
*/
|
||||
|
||||
import type { Component } from 'svelte';
|
||||
|
||||
// Stat card variant colors
|
||||
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
|
||||
|
||||
export interface StatItem {
|
||||
id: string;
|
||||
label: string;
|
||||
value: number | string;
|
||||
icon: Component;
|
||||
/** Svelte component to render as icon (e.g., lucide-svelte icon) */
|
||||
icon: any;
|
||||
variant: StatVariant;
|
||||
/** Optional: only show this stat if condition is true */
|
||||
showCondition?: boolean;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
let creating = $state(false);
|
||||
let selectedIndex = $state(0);
|
||||
let searchTimeout: ReturnType<typeof setTimeout>;
|
||||
let inputElement: HTMLInputElement;
|
||||
let inputElement = $state<HTMLInputElement | null>(null);
|
||||
|
||||
// Computed create preview
|
||||
let createPreview = $derived(
|
||||
|
|
@ -260,6 +260,7 @@
|
|||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="Suchen"
|
||||
tabindex="-1"
|
||||
onclick={handleBackdropClick}
|
||||
onkeydown={handleKeydown}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@
|
|||
const isClickable = $derived(interactive || !!onclick);
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
||||
<div
|
||||
class="data-card rounded-xl p-4 transition-colors {variantClasses[variant]} {isClickable
|
||||
? 'cursor-pointer hover:bg-menu-hover'
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
.line-clamp-2 {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
value: string;
|
||||
oninput?: (value: string) => void;
|
||||
onchange?: (value: string) => void;
|
||||
onkeydown?: (e: KeyboardEvent) => void;
|
||||
label?: string;
|
||||
placeholder?: string;
|
||||
type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
value = $bindable(),
|
||||
oninput,
|
||||
onchange,
|
||||
onkeydown,
|
||||
label,
|
||||
placeholder,
|
||||
type = 'text',
|
||||
|
|
@ -66,6 +68,7 @@
|
|||
autocomplete={autocomplete as HTMLInputAttributes['autocomplete']}
|
||||
oninput={handleInput}
|
||||
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
|
||||
? 'border-red-500 focus:ring-red-500/50'
|
||||
: 'border-theme'}"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
/** Alternative name field (for compatibility) */
|
||||
text?: string;
|
||||
/** Tag color (hex) */
|
||||
color?: string;
|
||||
color?: string | null;
|
||||
/** Nested style object with color */
|
||||
style?: { color?: string };
|
||||
}
|
||||
|
|
@ -55,16 +55,15 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<span
|
||||
class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium transition-all"
|
||||
class:cursor-pointer={clickable}
|
||||
class:hover:scale-105={clickable}
|
||||
{#if clickable}
|
||||
<span
|
||||
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"
|
||||
style="background-color: {tagColor}20; color: {tagColor}"
|
||||
onclick={handleClick}
|
||||
onkeydown={handleKeyDown}
|
||||
role={clickable ? 'button' : undefined}
|
||||
tabindex={clickable ? 0 : undefined}
|
||||
>
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<!-- Color indicator dot -->
|
||||
<div class="h-2 w-2 rounded-full" style="background-color: {tagColor}"></div>
|
||||
|
||||
|
|
@ -87,4 +86,33 @@
|
|||
</svg>
|
||||
</button>
|
||||
{/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}
|
||||
|
|
|
|||
|
|
@ -79,22 +79,22 @@
|
|||
<div class="space-y-6">
|
||||
<!-- Name Input -->
|
||||
<div>
|
||||
<Input bind:value={name} placeholder={namePlaceholder} onkeydown={handleKeyDown} autofocus />
|
||||
<Input bind:value={name} placeholder={namePlaceholder} onkeydown={handleKeyDown} />
|
||||
</div>
|
||||
|
||||
<!-- Color Picker -->
|
||||
<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}
|
||||
</label>
|
||||
</span>
|
||||
<TagColorPicker selectedColor={color} onColorChange={(c) => (color = c)} />
|
||||
</div>
|
||||
|
||||
<!-- Preview -->
|
||||
<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}
|
||||
</label>
|
||||
</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<TagBadge tag={previewTag} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@
|
|||
<div class={layout === 'grid' ? gridClasses : listClasses}>
|
||||
{#each tags as tag (tag.id)}
|
||||
{@const color = getTagColor(tag)}
|
||||
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
||||
<div
|
||||
class="
|
||||
group relative flex items-center gap-3 p-4
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export interface Tag {
|
|||
export interface TagData {
|
||||
name?: string;
|
||||
text?: string;
|
||||
color?: string;
|
||||
color?: string | null;
|
||||
style?: { color?: string };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,11 @@
|
|||
|
||||
{#if open}
|
||||
<!-- 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>
|
||||
|
||||
<!-- Dropdown items -->
|
||||
|
|
|
|||
|
|
@ -467,7 +467,8 @@
|
|||
{:else if item.iconSvg}
|
||||
{@html item.iconSvg}
|
||||
{: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}
|
||||
<svg class="pill-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path
|
||||
|
|
@ -500,7 +501,8 @@
|
|||
<a href={element.href} class="pill glass-pill" class:active={isActive(element.href)}>
|
||||
{#if 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}
|
||||
<svg class="pill-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path
|
||||
|
|
@ -1206,9 +1208,7 @@
|
|||
min-height: 1rem;
|
||||
}
|
||||
|
||||
.sidebar-container .toggle-pill {
|
||||
margin-top: auto;
|
||||
}
|
||||
/* Note: .toggle-pill class may be applied dynamically */
|
||||
|
||||
/* Segmented control */
|
||||
.segmented-control {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
</script>
|
||||
|
||||
<Modal {visible} {onClose} {title} {icon} {maxWidth}>
|
||||
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
||||
<form onsubmit={handleSubmit} onkeydown={handleKeydown} class="space-y-4">
|
||||
<!-- Error message -->
|
||||
{#if error}
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@
|
|||
export { resetZoom, zoomIn, zoomOut, focusOnSelectedNode };
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
||||
<div
|
||||
bind:this={containerElement}
|
||||
class="network-graph-container"
|
||||
|
|
@ -265,11 +266,14 @@
|
|||
role="application"
|
||||
aria-label="Network Graph"
|
||||
>
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<svg
|
||||
bind:this={svgElement}
|
||||
class="network-graph-svg"
|
||||
style="width: 100%; height: 100%;"
|
||||
onclick={handleBackgroundClick}
|
||||
role="img"
|
||||
aria-label="Network graph visualization"
|
||||
>
|
||||
<g transform="translate({transform.x}, {transform.y}) scale({transform.k})">
|
||||
<!-- Links -->
|
||||
|
|
@ -280,6 +284,7 @@
|
|||
{@const targetId = typeof link.target === 'string' ? link.target : link.target.id}
|
||||
{@const isHighlighted =
|
||||
selectedNodeId && (sourceId === selectedNodeId || targetId === selectedNodeId)}
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<!-- Invisible wider line for easier hover -->
|
||||
<line
|
||||
x1={coords.x1}
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@
|
|||
|
||||
<!-- Modal -->
|
||||
{#if selectedAppIndex !== null}
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<div class="modal-overlay" onclick={closeModal} role="dialog" aria-modal="true" tabindex="-1">
|
||||
<button onclick={closeModal} class="modal-close-btn" aria-label="Close modal">
|
||||
<svg
|
||||
|
|
@ -383,6 +384,7 @@
|
|||
margin: 0;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@
|
|||
: 'bg-gray-200 dark:bg-gray-700'}"
|
||||
onclick={() =>
|
||||
handleSidebarChange(!userSettings.globalSettings.nav.sidebarCollapsed)}
|
||||
aria-label="Toggle sidebar collapsed state"
|
||||
>
|
||||
<span
|
||||
class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {userSettings
|
||||
|
|
@ -416,6 +417,7 @@
|
|||
? 'bg-[hsl(var(--primary))]'
|
||||
: 'bg-gray-200 dark:bg-gray-700'}"
|
||||
onclick={() => handleSoundsChange(!(userSettings.general?.soundsEnabled ?? true))}
|
||||
aria-label="Toggle sound effects"
|
||||
>
|
||||
<span
|
||||
class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {(userSettings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue