Bugfixes (Dark Mode, Dropdown-Kontrast, IP-Suche), Lesezeichen-Ausbau (Farbe, Beschreibung, Favicon), Zuletzt-besucht, Spaeter-lesen, kombinierter Import-Export, Scanner-Reconciliation, Admin-Ueberarbeitung

This commit is contained in:
2026-07-20 07:52:38 +02:00
parent dc91a9aba9
commit 96cf29fef4
37 changed files with 1988 additions and 494 deletions

View File

@@ -54,6 +54,8 @@ export interface Category {
id: string;
name: string;
order: number;
/** Hex-Farbe (z. B. "#3b82f6"), zeigt sich als Punkt in Suche/Favoriten. */
color: string | null;
}
export interface ScanLogEntry {
@@ -118,7 +120,8 @@ export type SearchResult =
* 3. Hostname beginnt mit Suchtext
* 4. Displayname enthält Suchtext
* 5. Alias enthält Suchtext
* 6. Beschreibung enthält Suchtext
* 6. Hostname enthält Suchtext (z. B. "47" findet "192.168.1.47")
* 7. Beschreibung enthält Suchtext
*
* Niedrigere Werte sind relevanter. `null` bedeutet: kein Treffer.
* Funktioniert generisch für alles, was die Rankable-Form erfüllt
@@ -138,7 +141,8 @@ export function rankService<T extends Rankable>(item: T, query: string): number
if (hostname.startsWith(q)) return 3;
if (displayName.includes(q)) return 4;
if (alias.some((a) => a.includes(q))) return 5;
if (description.includes(q)) return 6;
if (hostname.includes(q)) return 6;
if (description.includes(q)) return 7;
return null;
}

View File

@@ -62,6 +62,10 @@ export type ServiceReorderInput = z.infer<typeof ServiceReorderSchema>;
export const CategoryCreateSchema = z.object({
name: z.string().min(1, "name darf nicht leer sein"),
color: z
.string()
.regex(/^#[0-9a-fA-F]{6}$/, "Farbe muss ein Hex-Code sein, z. B. #3b82f6")
.optional(),
});
export type CategoryCreateInput = z.infer<typeof CategoryCreateSchema>;
@@ -87,6 +91,7 @@ export const BookmarkCreateSchema = z.object({
description: z.string().optional(),
category: z.string().optional(),
icon: z.string().optional(),
favicon: z.string().optional(),
favorite: z.boolean().optional(),
alias: z.array(z.string()).optional(),
order: z.number().optional(),