0d6c8c7989
CI / test (push) Failing after 13m11s
This is the complete fix for the missing /admin/ route and frontend serving: Backend: - internal/web/web.go: new package with go:embed for web/dist/ - internal/api/router.go: add routes for /admin/, /admin/*, /assets/* - internal/db/db.go: fix SQLite DSN parsing (sqlite:///path -> path) Build system: - Makefile: new 'embed-prep' target copies web/dist to internal/web/dist - make build now runs embed-prep -> frontend/build automatically Deployment: - deploy/llamalink.service: remove invalid --host/--port flags, add EnvironmentFile=/etc/llamalink/env Verified: - /health returns 200 - /admin/ serves Vue SPA HTML - /assets/* serves CSS and JS files from embedded FS - sqlite:///./llamalink.db works correctly
17 lines
2.9 KiB
JavaScript
17 lines
2.9 KiB
JavaScript
import{d as u,u as m,c as d,a as t,F as x,i as y,b as s,e as o,R as g,h as b,o as r,j as f,n as k,k as _,l as v,m as L,p as C,t as w}from"./index-r2SG-Kf3.js";import{c as n}from"./createLucideIcon-CUrbWv4G.js";import{K as I}from"./key-D7ygKuN6.js";import{C as M}from"./cpu-ed4VmMFm.js";/**
|
|
* @license lucide-vue-next v0.460.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const V=n("ChartColumnIcon",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
* @license lucide-vue-next v0.460.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const D=n("LayoutDashboardIcon",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
* @license lucide-vue-next v0.460.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const R=n("LogOutIcon",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),B={class:"min-h-screen bg-background"},z={class:"fixed left-0 top-0 h-full w-64 bg-surface border-r border-border flex flex-col"},A={class:"flex-1 p-4 space-y-1"},K={class:"p-4 border-t border-border"},S={class:"ml-64 min-h-screen p-8"},H=u({__name:"Layout",setup(F){const l=v(),i=b(),c=m(),h=[{name:"Dashboard",path:"/admin/",icon:D},{name:"API Keys",path:"/admin/keys",icon:I},{name:"Models",path:"/admin/models",icon:M},{name:"Usage",path:"/admin/usage",icon:V}];function p(){c.logout(),i.push("/admin/login")}return(N,a)=>(r(),d("div",B,[t("aside",z,[a[1]||(a[1]=t("div",{class:"p-6 border-b border-border"},[t("h1",{class:"text-xl font-bold text-primary"},"LlamaLink"),t("p",{class:"text-xs text-text-muted mt-1"},"Admin Panel")],-1)),t("nav",A,[(r(),d(x,null,y(h,e=>s(o(_),{key:e.path,to:e.path,class:k(["flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",o(l).path===e.path||e.path!=="/admin/"&&o(l).path.startsWith(e.path)?"bg-primary/10 text-primary":"text-text-muted hover:text-text hover:bg-border"])},{default:f(()=>[(r(),L(C(e.icon),{class:"w-5 h-5"})),t("span",null,w(e.name),1)]),_:2},1032,["to","class"])),64))]),t("div",K,[t("button",{onClick:p,class:"flex items-center gap-3 w-full px-4 py-3 rounded-lg text-text-muted hover:text-error hover:bg-error/10 transition-colors"},[s(o(R),{class:"w-5 h-5"}),a[0]||(a[0]=t("span",null,"Logout",-1))])])]),t("main",S,[s(o(g))])]))}});export{H as default};
|