mirror of
https://github.com/anotherhadi/default-creds.git
synced 2026-04-02 11:32:11 +02:00
Improvement, Fixes
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -2,8 +2,13 @@
|
||||
import { Menu } from "lucide-svelte";
|
||||
import type { NavItem } from "../types/nav";
|
||||
|
||||
export let title: string = "";
|
||||
export let navLinks: NavItem[] = [];
|
||||
let {
|
||||
title = "",
|
||||
navLinks = [],
|
||||
}: {
|
||||
title?: string;
|
||||
navLinks?: NavItem[];
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<div class="bg-base-200">
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { User, Lock, Check, MessageCircle } from "lucide-svelte";
|
||||
|
||||
export interface Result {
|
||||
manufacturer: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
tags: string[];
|
||||
version: string;
|
||||
comment: string;
|
||||
user: string;
|
||||
pass: string;
|
||||
}
|
||||
import type { Result } from "src/types/nav";
|
||||
|
||||
let { result }: { result: Result} = $props();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import type { Result as ResultType } from "./Result.svelte";
|
||||
import Result from "./Result.svelte";
|
||||
import type { Result as ResultType } from "src/types/nav";
|
||||
import { Search } from "lucide-svelte";
|
||||
import DefaultView from "./DefaultView.svelte";
|
||||
import NotFoundView from "./NotFoundView.svelte";
|
||||
|
||||
@@ -110,7 +110,11 @@ export const GET: APIRoute = async ({ url, request }) => {
|
||||
);
|
||||
}
|
||||
|
||||
// Server-side tracking for search queries, respecting DNT/GPC
|
||||
// NOTE: Server-side tracking is intentionally only triggered when DNT/GPC is active.
|
||||
// When DNT is off, the client handles tracking via Umami's JS snippet.
|
||||
// When DNT is on, the JS snippet is suppressed, so we fall back to server-side tracking
|
||||
// to log search queries (query string + result count only, no user data) in order to
|
||||
// identify missing manufacturers/products and improve the dataset.
|
||||
if (query && dnt) {
|
||||
await trackSearchServerSide(query, filtered.length);
|
||||
}
|
||||
|
||||
@@ -4,3 +4,14 @@ export interface NavItem {
|
||||
icon?: any;
|
||||
children?: NavItem[];
|
||||
}
|
||||
|
||||
export interface Result {
|
||||
manufacturer: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
tags: string[];
|
||||
version: string;
|
||||
comment: string;
|
||||
user: string;
|
||||
pass: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user