fix(Docker): ship prebuilt frontend/dist, drop npm from image (removes 'vite not found')

The Vue SPA is now built locally and its frontend/dist/ committed (force-added).
Dockerfile is a single-stage runtime: copy prebuilt dist + python:3.11 + Flask.
No node/npm inside the image -> deterministic, no npm/esbuild postinstall flakiness.
To update UI: edit src, npm run build, commit frontend/dist/.
This commit is contained in:
Macky
2026-08-07 19:46:20 +07:00
parent 4827481da3
commit c19b23d44d
30 changed files with 80 additions and 13 deletions

View File

@@ -0,0 +1 @@
import{k as B,p as x,c as n,a as t,t as s,u as l,i as e,F as y,n as v,e as b,r as u,s as f,o as i,x as z}from"./index-B1lw4PRH.js";const D={style:{"margin-bottom":"4px"}},L={class:"muted",style:{margin:"0 0 20px","font-size":"13px"}},A={class:"stat-grid",style:{"margin-bottom":"20px"}},S={class:"stat-card"},C={class:"stat-label"},M={class:"stat-value",style:{color:"var(--ink)"}},j={class:"stat-card"},F={class:"stat-label"},N={class:"stat-value",style:{color:"var(--green)"}},T={class:"stat-card"},V={class:"stat-label"},E={class:"stat-value",style:{color:"var(--red)"}},G={class:"stat-card"},q={class:"stat-label"},H={class:"stat-value",style:{color:"var(--accent)"}},I={style:{margin:"20px 0 12px"}},J={key:0,class:"card",style:{"min-height":"60px"}},K={key:1,class:"card",style:{"margin-bottom":"12px"}},O={style:{"font-weight":"700","font-size":"14px","margin-bottom":"6px"}},P={class:"muted",style:{"font-size":"13px"}},Q={class:"badge lost"},R={key:0,class:"muted",style:{"font-size":"12px"}},U={key:2,class:"card empty-state",style:{"margin-bottom":"8px"}},W={style:{margin:"20px 0 12px"}},X={key:3,class:"card",style:{"min-height":"80px"}},Y={key:4,class:"card",style:{padding:"4px 20px"}},Z={class:"muted",style:{"font-size":"12px"}},$={key:0,class:"muted",style:{padding:"16px 0","text-align":"center"}},et={__name:"MyBoard",setup(tt){const p=u([]),d=u({}),h=u(!0),m=u(!0),k=f(()=>{var a;return(a=d.value.top_loss_personas)!=null&&a.length,""}),g=f(()=>{var o,c,_;const a=d.value,r=[];return(o=a.by_tier)!=null&&o.length&&r.push({title:"By tier · losses",items:a.by_tier}),(c=a.by_initiation)!=null&&c.length&&r.push({title:"By initiation · losses",items:a.by_initiation}),(_=a.by_channel)!=null&&_.length&&r.push({title:"By channel · losses",items:a.by_channel}),r});function w(a){return a==="won"?e.t("won"):a==="lost"?e.t("lost"):e.t("notTried")}return B(async()=>{try{p.value=(await x.myBoard()).board}catch{}finally{h.value=!1}try{d.value=(await x.weakAreas()).insight||{}}catch{}finally{m.value=!1}}),(a,r)=>(i(),n("div",null,[t("h2",D,s(l(e).t("tabMyDash")),1),t("p",L,s(l(e).t("weakAreas"))+" · "+s(l(e).t("mySessions")),1),t("div",A,[t("div",S,[t("div",C,s(l(e).t("mySessions")),1),t("div",M,s(d.value.total_sessions||0),1)]),t("div",j,[t("div",F,s(l(e).t("won")),1),t("div",N,s(d.value.wins||0),1)]),t("div",T,[t("div",V,s(l(e).t("lost")),1),t("div",E,s(d.value.losses||0),1)]),t("div",G,[t("div",q,s(l(e).t("score")),1),t("div",H,s(k.value)+s(d.value.total_sessions?"%":""),1)])]),t("h3",I,s(l(e).t("weakAreas")),1),m.value?(i(),n("div",J,[...r[0]||(r[0]=[t("div",{class:"skeleton",style:{height:"40px"}},null,-1)])])):g.value.length?(i(),n("div",K,[(i(!0),n(y,null,v(g.value,o=>(i(),n("div",{key:o.title,style:{padding:"10px 0","border-bottom":"1px solid var(--border)"}},[t("div",O,s(o.title),1),(i(!0),n(y,null,v(o.items,(c,_)=>(i(),n("div",{key:_,class:"row",style:{"justify-content":"space-between",padding:"2px 0","align-items":"center"}},[t("span",P,s(c.value),1),t("span",Q,s(c.losses)+" "+s(l(e).t("lost").toLowerCase()),1)]))),128)),o.items.length?b("",!0):(i(),n("div",R,s(l(e).t("noData")),1))]))),128))])):(i(),n("div",U,[t("strong",null,s(l(e).t("noData")),1),t("span",null,s(l(e).t("weakAreas")),1)])),t("h3",W,s(l(e).t("myTraining")),1),h.value?(i(),n("div",X,[...r[1]||(r[1]=[t("div",{class:"skeleton",style:{height:"60px"}},null,-1)])])):(i(),n("div",Y,[(i(!0),n(y,null,v(p.value,o=>(i(),n("div",{key:o.group_id+o.persona_id,class:"row",style:{"justify-content":"space-between",padding:"9px 0","border-bottom":"1px solid var(--border)"}},[t("div",null,[t("strong",null,s(o.persona_name),1),t("span",Z," — "+s(o.group_title)+" · "+s(o.tier),1)]),t("span",{class:z(["badge",o.my_outcome])},s(w(o.my_outcome)),3)]))),128)),p.value.length===0?(i(),n("div",$,s(l(e).t("noData")),1)):b("",!0)]))]))}};export{et as default};