refactor(apps): automated SVG-to-Phosphor migration across all apps

Script-based migration of inline SVG icons to Phosphor components.
Covers todo, manacore, mukke, chat, zitare, times, citycorners,
inventar, uload, playground, presi, picture, moodlit, storage, news,
wisekeep, clock, matrix, manadeck, skilltree, and photos.

~190 SVGs replaced across 115 files. Remaining SVGs are spinners,
brand logos, or decorative/chart SVGs that don't map to Phosphor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-31 12:35:17 +02:00
parent f58d58ff99
commit 504e7756a7
115 changed files with 781 additions and 3084 deletions

View file

@ -1,6 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { onMount } from 'svelte';
import { CaretLeft } from '@manacore/shared-icons';
import { useLiveQuery } from '@manacore/local-store/svelte';
import { linkCollection } from '$lib/data/local-store';
import { authStore } from '$lib/stores/auth.svelte';
@ -68,9 +69,7 @@
class="rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-700"
title="Zurück"
>
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
</svg>
<CaretLeft size={20} />
</a>
<div>
<h1 class="text-3xl font-bold">Analytics</h1>

View file

@ -3,6 +3,16 @@
import { linkCollection, tagCollection, folderCollection } from '$lib/data/local-store';
import type { LocalLink } from '$lib/data/local-store';
import { toast } from 'svelte-sonner';
import {
CaretRight,
ChartBar,
Copy,
QrCode,
PencilSimple,
Lightning,
Trash,
X,
} from '@manacore/shared-icons';
const QR_API = 'https://api.qrserver.com/v1/create-qr-code';
@ -296,19 +306,9 @@
onclick={() => (showAdvanced = !showAdvanced)}
class="mt-2 flex items-center gap-1 text-sm text-indigo-600 hover:text-indigo-700"
>
<svg
class="h-4 w-4 transition-transform {showAdvanced ? 'rotate-90' : ''}"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
<span class="transition-transform {showAdvanced ? 'rotate-90' : ''}"
><CaretRight size={16} /></span
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
Erweitert
</button>
{#if showAdvanced}
@ -357,19 +357,9 @@
onclick={() => (showUtm = !showUtm)}
class="mt-3 flex items-center gap-1 text-sm text-indigo-600 hover:text-indigo-700"
>
<svg
class="h-4 w-4 transition-transform {showUtm ? 'rotate-90' : ''}"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
<span class="transition-transform {showUtm ? 'rotate-90' : ''}"
><CaretRight size={16} /></span
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"
/>
</svg>
UTM-Parameter
</button>
{#if showUtm}
@ -559,14 +549,7 @@
class="flex items-center gap-1 rounded-lg px-2 py-1.5 text-sm font-medium opacity-60 transition-all hover:bg-gray-100 hover:opacity-100 dark:hover:bg-gray-700"
title="Analytics"
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"
/>
</svg>
<ChartBar size={16} />
{link.clickCount}
</a>
<button
@ -574,75 +557,35 @@
class="rounded-lg p-2 opacity-0 transition-all hover:bg-gray-100 group-hover:opacity-100 dark:hover:bg-gray-700"
title="Link kopieren"
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
/>
</svg>
<Copy size={16} />
</button>
<button
onclick={() => (qrLink = link)}
class="rounded-lg p-2 opacity-0 transition-all hover:bg-gray-100 group-hover:opacity-100 dark:hover:bg-gray-700"
title="QR-Code"
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z"
/>
</svg>
<QrCode size={16} />
</button>
<button
onclick={() => openEdit(link)}
class="rounded-lg p-2 opacity-0 transition-all hover:bg-gray-100 group-hover:opacity-100 dark:hover:bg-gray-700"
title="Bearbeiten"
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
/>
</svg>
<PencilSimple size={16} />
</button>
<button
onclick={() => toggleActive(link)}
class="rounded-lg p-2 opacity-0 transition-all hover:bg-gray-100 group-hover:opacity-100 dark:hover:bg-gray-700"
title={link.isActive ? 'Deaktivieren' : 'Aktivieren'}
>
<svg
class="h-4 w-4 {link.isActive ? 'text-green-500' : 'text-gray-400'}"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 10V3L4 14h7v7l9-11h-7z"
/>
</svg>
<Lightning size={16} class={link.isActive ? 'text-green-500' : 'text-gray-400'} />
</button>
<button
onclick={() => deleteLink(link)}
class="rounded-lg p-2 opacity-0 transition-all hover:bg-red-50 hover:text-red-600 group-hover:opacity-100 dark:hover:bg-red-900/20"
title="Löschen"
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
<Trash size={16} />
</button>
</div>
</div>
@ -669,14 +612,7 @@
onclick={() => (editingLink = null)}
class="rounded-lg p-1 hover:bg-gray-100 dark:hover:bg-gray-700"
>
<svg class="h-5 w-5" 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>
<X size={20} />
</button>
</div>
@ -786,14 +722,7 @@
onclick={() => (qrLink = null)}
class="rounded-lg p-1 hover:bg-gray-100 dark:hover:bg-gray-700"
>
<svg class="h-5 w-5" 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>
<X size={20} />
</button>
</div>

View file

@ -3,6 +3,7 @@
import { tagCollection, linkTagCollection } from '$lib/data/local-store';
import type { LocalTag } from '$lib/data/local-store';
import { toast } from 'svelte-sonner';
import { PencilSimple, Trash } from '@manacore/shared-icons';
const tags = useLiveQuery(() => tagCollection.getAll({}, { sortBy: 'name' }));
const linkTags = useLiveQuery(() => linkTagCollection.getAll());
@ -156,27 +157,13 @@
onclick={() => (editingTag = { ...tag })}
class="rounded p-1 opacity-0 transition-all hover:bg-gray-100 group-hover:opacity-100 dark:hover:bg-gray-700"
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
/>
</svg>
<PencilSimple size={16} />
</button>
<button
onclick={() => deleteTag(tag)}
class="rounded p-1 opacity-0 transition-all hover:bg-red-50 hover:text-red-600 group-hover:opacity-100 dark:hover:bg-red-900/20"
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
<Trash size={16} />
</button>
</div>
</div>