From 47edaacae7d85483340645a9023709f5e6cc947d Mon Sep 17 00:00:00 2001 From: beroth Date: Sat, 16 May 2026 01:23:03 -0600 Subject: [PATCH] feat(dash) very complete --- dashboard.html | 148 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 103 insertions(+), 45 deletions(-) diff --git a/dashboard.html b/dashboard.html index 8b26dd9..6d17d46 100644 --- a/dashboard.html +++ b/dashboard.html @@ -149,17 +149,28 @@ + class="w-full bg-zinc-950 border border-zinc-800 rounded-xl p-3 outline-none mb-3 focus:ring-2 focus:ring-indigo-500"/> + class="w-full bg-zinc-950 border border-zinc-800 rounded-xl p-3 outline-none mb-4 focus:ring-2 focus:ring-indigo-500"/> - +
File Source
+ + + +
+
+ OR +
+
+ +
@@ -167,7 +178,7 @@

Media List

-
+
@@ -234,6 +245,7 @@ let allCampaigns = []; let showInactive = false; + let campaignsWithMedia = new Set(); // ============================= // UI HELPERS @@ -335,10 +347,16 @@ .order("created_at", { ascending: false }); if (error) { - list.innerHTML = `
Error loading campaigns: ${error.message}
`; + document.getElementById("campaignList").innerHTML = `
Error loading campaigns: ${error.message}
`; return; } + const { data: mediaData } = await supabaseClient + .from("media") + .select("campaign_id"); + + campaignsWithMedia = new Set(mediaData?.map(m => m.campaign_id) || []); + allCampaigns = data || []; // Populate filters @@ -361,6 +379,7 @@ }); renderCampaigns(); + await loadMedia(); } function renderCampaigns() { @@ -391,6 +410,11 @@
+ ${campaignsWithMedia.has(c.id) ? ` + + Gallery + ` : ''}