mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 07:19:39 +02:00
## New Features ### Network Graph Visualization (Contacts, Calendar, Todo) - D3.js force simulation for physics-based layout - Zoom & pan with mouse/touchpad - Keyboard shortcuts: +/- zoom, 0 reset, Esc deselect, / search, F focus - Filtering by tags, company/location/project, connection strength - Shared components in @manacore/shared-ui ### Central Tags API (mana-core-auth) - CRUD endpoints for tags - Schema: tags table with userId, name, color, app - Shared tag components in @manacore/shared-ui ### Custom Themes System - Theme editor with live preview and color picker - Community theme gallery - Theme sharing (public, unlisted, private) - Backend API in mana-core-auth ### Todo App Extensions - Glass-pill design for task input and items - Settings page with 20+ preferences - Task edit modal with inline editing - Statistics page with visualizations - PWA support with offline capabilities - Multiple kanban boards ### Contacts App Features - Duplicate detection - Photo upload - Batch operations - Enhanced favorites page with multiple view modes - Alphabet view improvements - Search modal ### Help System - @manacore/shared-help-content - @manacore/shared-help-ui - @manacore/shared-help-types ### Other Features - Themes page for all apps - Referral system frontend - CommandBar (global search) - Skeleton loaders - Settings page improvements ## Bug Fixes - Network graph simulation initialization - Database schema TEXT for user_id columns (Better Auth compatibility) - Various styling fixes ## Documentation - Daily report for 2025-12-10 - CI/CD deployment guide 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
161 lines
4.2 KiB
Svelte
161 lines
4.2 KiB
Svelte
<script lang="ts">
|
|
import type { Snippet } from 'svelte';
|
|
|
|
interface Props {
|
|
/** Row label */
|
|
label: string;
|
|
/** Optional description */
|
|
description?: string;
|
|
/** Optional icon (Snippet for flexibility) */
|
|
icon?: Snippet;
|
|
/** Make the entire row clickable */
|
|
href?: string;
|
|
/** Click handler (alternative to href) */
|
|
onclick?: () => void;
|
|
/** Show border at bottom */
|
|
border?: boolean;
|
|
/** Disabled state */
|
|
disabled?: boolean;
|
|
/** Additional CSS classes */
|
|
class?: string;
|
|
/** Control element (Toggle, Button, etc.) */
|
|
children?: Snippet;
|
|
}
|
|
|
|
let {
|
|
label,
|
|
description,
|
|
icon,
|
|
href,
|
|
onclick,
|
|
border = true,
|
|
disabled = false,
|
|
class: className = '',
|
|
children,
|
|
}: Props = $props();
|
|
|
|
const isClickable = $derived(!!href || !!onclick);
|
|
|
|
// Tailwind classes
|
|
const baseRowClasses =
|
|
'flex items-center justify-between gap-4 px-5 py-4 bg-transparent w-full text-left no-underline transition-all duration-200';
|
|
|
|
const borderClasses = 'border-b border-black/[0.08] dark:border-white/10 last:border-b-0';
|
|
|
|
const clickableClasses = 'cursor-pointer hover:bg-black/[0.04] dark:hover:bg-white/[0.06]';
|
|
|
|
const disabledClasses = 'opacity-50 cursor-not-allowed pointer-events-none';
|
|
|
|
const iconClasses =
|
|
'flex items-center justify-center flex-shrink-0 w-9 h-9 rounded-[0.625rem] bg-black/[0.04] dark:bg-white/[0.08] text-primary';
|
|
|
|
function getRowClasses(isBordered: boolean, isClick: boolean, isDisabled: boolean): string {
|
|
let classes = baseRowClasses;
|
|
if (isBordered) classes += ' ' + borderClasses;
|
|
if (isClick) classes += ' ' + clickableClasses;
|
|
if (isDisabled) classes += ' ' + disabledClasses;
|
|
return classes;
|
|
}
|
|
</script>
|
|
|
|
{#if href}
|
|
<a {href} class="{getRowClasses(border, true, disabled)} {className}">
|
|
<div class="flex items-center gap-3 flex-1 min-w-0">
|
|
{#if icon}
|
|
<span class={iconClasses}>
|
|
{@render icon()}
|
|
</span>
|
|
{/if}
|
|
<div class="flex flex-col gap-0.5 min-w-0">
|
|
<span class="text-[0.9375rem] font-medium text-gray-700 dark:text-gray-100">{label}</span>
|
|
{#if description}
|
|
<span class="text-[0.8125rem] text-gray-500 dark:text-gray-400 leading-snug"
|
|
>{description}</span
|
|
>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center flex-shrink-0">
|
|
{#if children}
|
|
{@render children()}
|
|
{:else}
|
|
<svg
|
|
class="w-5 h-5 text-gray-400 dark:text-gray-500"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
viewBox="0 0 24 24"
|
|
>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
|
|
</svg>
|
|
{/if}
|
|
</div>
|
|
</a>
|
|
{:else if onclick}
|
|
<button
|
|
type="button"
|
|
{onclick}
|
|
class="{getRowClasses(border, true, disabled)} {className}"
|
|
{disabled}
|
|
>
|
|
<div class="flex items-center gap-3 flex-1 min-w-0">
|
|
{#if icon}
|
|
<span class={iconClasses}>
|
|
{@render icon()}
|
|
</span>
|
|
{/if}
|
|
<div class="flex flex-col gap-0.5 min-w-0">
|
|
<span class="text-[0.9375rem] font-medium text-gray-700 dark:text-gray-100">{label}</span>
|
|
{#if description}
|
|
<span class="text-[0.8125rem] text-gray-500 dark:text-gray-400 leading-snug"
|
|
>{description}</span
|
|
>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center flex-shrink-0">
|
|
{#if children}
|
|
{@render children()}
|
|
{:else}
|
|
<svg
|
|
class="w-5 h-5 text-gray-400 dark:text-gray-500"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
viewBox="0 0 24 24"
|
|
>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
|
|
</svg>
|
|
{/if}
|
|
</div>
|
|
</button>
|
|
{:else}
|
|
<div class="{getRowClasses(border, false, disabled)} {className}">
|
|
<div class="flex items-center gap-3 flex-1 min-w-0">
|
|
{#if icon}
|
|
<span class={iconClasses}>
|
|
{@render icon()}
|
|
</span>
|
|
{/if}
|
|
<div class="flex flex-col gap-0.5 min-w-0">
|
|
<span class="text-[0.9375rem] font-medium text-gray-700 dark:text-gray-100">{label}</span>
|
|
{#if description}
|
|
<span class="text-[0.8125rem] text-gray-500 dark:text-gray-400 leading-snug"
|
|
>{description}</span
|
|
>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{#if children}
|
|
<div class="flex items-center flex-shrink-0">
|
|
{@render children()}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
|
|
<style>
|
|
/* Keep SVG sizing for icons passed via snippet */
|
|
:global(svg) {
|
|
width: 1.125rem;
|
|
height: 1.125rem;
|
|
}
|
|
</style>
|