diff --git a/web/src/lib/components/DiscordProfileModal.svelte b/web/src/lib/components/DiscordProfileModal.svelte new file mode 100644 index 0000000..1193cea --- /dev/null +++ b/web/src/lib/components/DiscordProfileModal.svelte @@ -0,0 +1,166 @@ + + +{#if open} +
e.key === "Escape" && handleClose()} + role="presentation" + tabindex="-1" + transition:fade={{ duration: 200 }} + > + + +
+{/if} diff --git a/web/src/lib/components/PgpKeyModal.svelte b/web/src/lib/components/PgpKeyModal.svelte deleted file mode 100644 index 9b051c9..0000000 --- a/web/src/lib/components/PgpKeyModal.svelte +++ /dev/null @@ -1,175 +0,0 @@ - - -{#if open} -
e.key === "Escape" && handleClose()} - role="presentation" - tabindex="-1" - transition:fade={{ duration: 200 }} - > - -
-{/if} diff --git a/web/src/lib/components/admin/Table.svelte b/web/src/lib/components/admin/Table.svelte index c998e21..5c66404 100644 --- a/web/src/lib/components/admin/Table.svelte +++ b/web/src/lib/components/admin/Table.svelte @@ -10,7 +10,10 @@
{@render children?.()} diff --git a/web/src/lib/server/icons.ts b/web/src/lib/server/icons.ts index 0491bd7..ddc3296 100644 --- a/web/src/lib/server/icons.ts +++ b/web/src/lib/server/icons.ts @@ -1,7 +1,11 @@ import type { IconifyJSON } from "@iconify/types"; import { getIconData, iconToSVG, replaceIDs } from "@iconify/utils"; import { getLogger } from "@logtape/logtape"; -import type { IconCollection, IconIdentifier, IconRenderOptions } from "$lib/types/icons"; +import type { + IconCollection, + IconIdentifier, + IconRenderOptions, +} from "$lib/types/icons"; const logger = getLogger(["server", "icons"]); @@ -39,7 +43,9 @@ function parseIdentifier( /** * Load icon collection from disk via dynamic import (internal - no caching logic) */ -async function loadCollectionFromDisk(collection: string): Promise { +async function loadCollectionFromDisk( + collection: string, +): Promise { try { // Dynamic import - Bun resolves the package path automatically const module = await import(`@iconify/json/json/${collection}.json`); @@ -137,7 +143,9 @@ function renderIconData( /** * Render the default fallback icon (internal helper) */ -async function renderFallbackIcon(options: IconRenderOptions): Promise { +async function renderFallbackIcon( + options: IconRenderOptions, +): Promise { const parsed = parseIdentifier(DEFAULT_FALLBACK_ICON); if (!parsed) return null; @@ -169,7 +177,10 @@ export async function renderIconsBatch( } // Parse and group by collection - const byCollection = new Map(); + const byCollection = new Map< + string, + { identifier: string; name: string }[] + >(); const invalidIdentifiers: string[] = []; for (const identifier of identifiers) { @@ -185,7 +196,9 @@ export async function renderIconsBatch( } if (invalidIdentifiers.length > 0) { - logger.warn("Invalid icon identifiers in batch", { identifiers: invalidIdentifiers }); + logger.warn("Invalid icon identifiers in batch", { + identifiers: invalidIdentifiers, + }); } // Load all needed collections in parallel @@ -256,9 +269,12 @@ export async function renderIconsBatch( /** * Get single icon data (for API endpoint use only) */ -export async function getIconForApi( - identifier: string, -): Promise<{ identifier: string; collection: string; name: string; svg: string } | null> { +export async function getIconForApi(identifier: string): Promise<{ + identifier: string; + collection: string; + name: string; + svg: string; +} | null> { const parsed = parseIdentifier(identifier); if (!parsed) { logger.warn(`Invalid icon identifier: ${identifier}`); @@ -318,7 +334,8 @@ export async function searchIcons( query: string, limit: number = 50, ): Promise<{ identifier: string; collection: string; name: string }[]> { - const results: { identifier: string; collection: string; name: string }[] = []; + const results: { identifier: string; collection: string; name: string }[] = + []; // Parse query for collection prefix (e.g., "lucide:home" or "lucide:") const colonIndex = query.indexOf(":"); diff --git a/web/src/routes/+page.server.ts b/web/src/routes/+page.server.ts index ae4b09d..f4bafaa 100644 --- a/web/src/routes/+page.server.ts +++ b/web/src/routes/+page.server.ts @@ -46,7 +46,7 @@ export const load: PageServerLoad = async ({ fetch, parent }) => { ...project, tags: project.tags.map((tag) => ({ ...tag, - iconSvg: tag.icon ? smallIcons.get(tag.icon) ?? "" : "", + iconSvg: tag.icon ? (smallIcons.get(tag.icon) ?? "") : "", })), clockIconSvg: smallIcons.get(CLOCK_ICON) ?? "", })); diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index 545c67f..f8784c2 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -1,7 +1,7 @@ @@ -67,7 +62,7 @@ @@ -79,11 +74,14 @@ > {:else if link.platform === "discord"} - + + @@ -139,4 +136,4 @@ - + diff --git a/web/src/routes/admin/tags/+page.svelte b/web/src/routes/admin/tags/+page.svelte index 158ea77..e388cd1 100644 --- a/web/src/routes/admin/tags/+page.svelte +++ b/web/src/routes/admin/tags/+page.svelte @@ -297,7 +297,9 @@ {#if editIcon}
- {editIcon} + {editIcon}
{:else} @@ -354,7 +356,9 @@ {#if tag.icon}
- {tag.icon} + {tag.icon}
{:else}