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,c as l,l as C,m as y,a as t,t as s,u as r,i as o,F as p,n as f,h as L,p as T,q as A,r as g,o as i,j as h,x as v,y as I}from"./index-B1lw4PRH.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";const P={class:"row",style:{"align-items":"center"}},V={style:{margin:"0"}},z={class:"grid"},F={class:"row"},$={class:"muted"},j={class:"muted"},q={class:"muted",style:{"margin-top":"6px"}},D={class:"primary",style:{width:"100%"}},E={key:1,class:"muted",style:{"margin-top":"auto","font-size":"12px"}},M={__name:"Personas",setup(R){const d=L().params.gid,u=g([]),k=g(!0);async function b(){try{u.value=(await T.listPersonas(d)).personas}finally{k.value=!1}}function x(a){return u.value.filter(n=>n.tier===a)}function w(a){return o.t(a==="A"?"tierA":a==="B"?"tierB":"tierC")}function _(a){return a==="won"?o.t("won"):a==="lost"?o.t("lost"):o.t("notTried")}return B(b),(a,n)=>{const m=A("router-link");return i(),l("div",null,[C(m,{to:"/",class:"btn-back"},{default:y(()=>[h("← "+s(r(o).t("dashboard")),1)]),_:1}),t("div",P,[t("h2",V,s(r(o).t("personas")),1),n[0]||(n[0]=t("span",{class:"muted",style:{"margin-left":"auto"}},"Levels: choose one to practice (one-shot)",-1))]),(i(),l(p,null,f(["A","B","C"],c=>t("div",{key:c,style:{margin:"20px 0"}},[t("h4",null,s(w(c)),1),t("div",z,[(i(!0),l(p,null,f(x(c),e=>(i(),l("div",{key:e.id,class:"card pcard lift"},[t("div",F,[t("strong",null,s(e.name),1),t("span",{class:v(["badge",e.my_outcome])},s(_(e.my_outcome)),3)]),t("div",$,[h(s(e.profession)+" · "+s(e.age_group)+" · "+s(e.location),1),n[1]||(n[1]=t("br",null,null,-1)),t("span",{class:v(["badge",e.channel])},s(e.channel),3),t("span",j," · "+s(e.initiation_mode==="seller"?r(o).t("sellerInitiated"):r(o).t("customerInitiated")),1)]),t("div",q,s(e.product_context),1),e.my_outcome==="not_tried"?(i(),I(m,{key:0,to:`/groups/${r(d)}/chat/${e.id}`,style:{"margin-top":"auto"}},{default:y(()=>[t("button",D,s(r(o).t("chat")),1)]),_:1},8,["to"])):(i(),l("div",E,"✓ Trained ("+s(_(e.my_outcome))+")",1))]))),128))])])),64))])}}},J=N(M,[["__scopeId","data-v-88c74e17"]]);export{J as default};