feat(domains): Favicons laden und im Filter anzeigen
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m16s
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m16s
Für jede Whitelist-Domain wird das Favicon jetzt einmalig geladen und im image-Verzeichnis abgelegt. SearchFilter zeigt das Icon neben dem Domain-Namen im Filter-Dropdown. - Migration 009: allowed_domain.favicon_path (NULL = noch nicht geladen). - Neues Modul $lib/server/domains/favicons.ts: fetchAndStoreFavicon(domain, imageDir) + ensureFavicons(db, imageDir) für Bulk-Nachzug; 8 parallele Worker mit 3s-Timeout. - Reihenfolge: erst /favicon.ico der Domain, Fallback Google-Service. - GET /api/domains zieht fehlende Favicons auf Abruf nach; POST /api/domains lädt direkt im selben Call. - .ico + .svg jetzt in der /images/[filename]-Route erlaubt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,11 @@
|
||||
<span class="box" class:on={isOn}>
|
||||
{#if isOn}<Check size={14} strokeWidth={3} />{/if}
|
||||
</span>
|
||||
{#if d.favicon_path}
|
||||
<img class="favicon" src={`/images/${d.favicon_path}`} alt="" loading="lazy" />
|
||||
{:else}
|
||||
<span class="favicon fallback" aria-hidden="true"></span>
|
||||
{/if}
|
||||
<span class="dom">{d.display_name ?? d.domain}</span>
|
||||
</button>
|
||||
</li>
|
||||
@@ -218,6 +223,17 @@
|
||||
background: #2b6a3d;
|
||||
border-color: #2b6a3d;
|
||||
}
|
||||
.favicon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 3px;
|
||||
object-fit: contain;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.favicon.fallback {
|
||||
background: #eef3ef;
|
||||
display: inline-block;
|
||||
}
|
||||
.dom {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user