104 lines
4.6 KiB
JavaScript
104 lines
4.6 KiB
JavaScript
|
|
import { c as create_ssr_component, b as subscribe, d as add_attribute, e as each, f as escape, v as validate_component } from "../../chunks/ssr.js";
|
||
|
|
import { p as page } from "../../chunks/stores.js";
|
||
|
|
const Sidebar = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||
|
|
let currentPath;
|
||
|
|
let $page, $$unsubscribe_page;
|
||
|
|
$$unsubscribe_page = subscribe(page, (value) => $page = value);
|
||
|
|
let collapsed = false;
|
||
|
|
if (typeof window !== "undefined") {
|
||
|
|
const saved = localStorage.getItem("sidebar-collapsed");
|
||
|
|
collapsed = saved === "true";
|
||
|
|
}
|
||
|
|
const tools = [
|
||
|
|
{
|
||
|
|
name: "Dashboard",
|
||
|
|
path: "/",
|
||
|
|
icon: "📊"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Model Drift Monitor",
|
||
|
|
path: "/drift-monitor",
|
||
|
|
icon: "📈"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Vendor Cost Tracker",
|
||
|
|
path: "/cost-tracker",
|
||
|
|
icon: "💰"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Security Tester",
|
||
|
|
path: "/security-tester",
|
||
|
|
icon: "🔒"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Data History Log",
|
||
|
|
path: "/data-history",
|
||
|
|
icon: "📜"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Model Comparator",
|
||
|
|
path: "/model-comparator",
|
||
|
|
icon: "🔄"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Privacy Scanner",
|
||
|
|
path: "/privacy-scanner",
|
||
|
|
icon: "🕵️"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Label Quality Scorer",
|
||
|
|
path: "/label-quality",
|
||
|
|
icon: "✅"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Inference Estimator",
|
||
|
|
path: "/inference-estimator",
|
||
|
|
icon: "💵"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Data Integrity Audit",
|
||
|
|
path: "/data-audit",
|
||
|
|
icon: "🧹"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Content Performance",
|
||
|
|
path: "/content-performance",
|
||
|
|
icon: "📺"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Safety/Bias Checks",
|
||
|
|
path: "/bias-checks",
|
||
|
|
icon: "⚖️"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Profitability Analysis",
|
||
|
|
path: "/profitability",
|
||
|
|
icon: "💹"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Emergency Control",
|
||
|
|
path: "/emergency-control",
|
||
|
|
icon: "🚨"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: "Reports",
|
||
|
|
path: "/reports",
|
||
|
|
icon: "📝"
|
||
|
|
}
|
||
|
|
];
|
||
|
|
currentPath = $page.url.pathname;
|
||
|
|
$$unsubscribe_page();
|
||
|
|
return `<aside class="${"flex flex-col h-full border-r border-primary-100 transition-all duration-300 ease-in-out " + escape(collapsed ? "w-16" : "w-64", true)}" style="background: linear-gradient(180deg, #f8f6ff 0%, #f3f0ff 100%);"> <div class="${"p-4 border-b border-primary-100/60 flex items-center " + escape(collapsed ? "justify-center" : "justify-between", true)}">${!collapsed ? `<div data-svelte-h="svelte-1572qjr"><h1 class="text-xl font-bold bg-gradient-to-r from-primary-700 to-accent-600 bg-clip-text text-transparent">AI Tools Suite</h1> <p class="text-xs text-surface-500 mt-1">v0.1.0</p></div>` : ``} <button class="p-2 rounded-lg hover:bg-white/70 text-surface-600 hover:text-primary-700 transition-all duration-200"${add_attribute("title", collapsed ? "Expand sidebar" : "Collapse sidebar", 0)}><svg xmlns="http://www.w3.org/2000/svg" class="${"h-5 w-5 transition-transform duration-300 " + escape(collapsed ? "rotate-180" : "", true)}" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M11 19l-7-7 7-7m8 14l-7-7 7-7"></path></svg></button></div> <nav class="flex-1 overflow-y-auto py-4"><ul class="space-y-1 px-2">${each(tools, (tool) => {
|
||
|
|
return `<li><a${add_attribute("href", tool.path, 0)} class="${"flex items-center gap-3 px-3 py-2 rounded-lg transition-all duration-200 " + escape(
|
||
|
|
currentPath === tool.path ? "bg-gradient-to-r from-primary-500 to-primary-600 text-white shadow-soft" : "text-surface-600 hover:bg-white/70 hover:text-primary-700",
|
||
|
|
true
|
||
|
|
) + " " + escape(collapsed ? "justify-center" : "", true)}"${add_attribute("title", collapsed ? tool.name : "", 0)}><span class="text-lg flex-shrink-0">${escape(tool.icon)}</span> ${!collapsed ? `<span class="text-sm font-medium truncate">${escape(tool.name)}</span>` : ``}</a> </li>`;
|
||
|
|
})}</ul></nav> <div class="p-4 border-t border-primary-100/60"><div class="${"flex items-center gap-2 text-xs text-surface-500 " + escape(collapsed ? "justify-center" : "", true)}"><span class="w-2 h-2 bg-green-500 rounded-full animate-pulse flex-shrink-0"></span> ${!collapsed ? `<span data-svelte-h="svelte-i7oxkb">API Connected</span>` : ``}</div></div></aside>`;
|
||
|
|
});
|
||
|
|
const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||
|
|
return `<div class="flex h-screen" style="background: #fdf8f3;">${validate_component(Sidebar, "Sidebar").$$render($$result, {}, {}, {})} <main class="flex-1 overflow-auto p-6 transition-all duration-300"><div class="max-w-7xl mx-auto">${slots.default ? slots.default({}) : ``}</div></main></div>`;
|
||
|
|
});
|
||
|
|
export {
|
||
|
|
Layout as default
|
||
|
|
};
|