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:
1
frontend/dist/assets/Settings-D6D_gNDm.js
vendored
Normal file
1
frontend/dist/assets/Settings-D6D_gNDm.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{k as E,f as i,c as g,a as e,t,u as a,i as o,A as V,w as v,v as _,x as y,e as M,B as U,r as p,s as k,o as b,p as B}from"./index-B1lw4PRH.js";const T={class:"row",style:{margin:"0 0 20px"}},A={style:{margin:"0"}},j={class:"setting-grid"},q={class:"card settings-section"},F={class:"s-title"},G={class:"s-desc"},H={class:"form-grid"},I={for:"p-name"},J=["placeholder"],K={for:"p-email"},L=["placeholder"],O=["disabled"],Q={class:"card settings-section"},R={class:"s-title"},W={class:"s-desc"},X={class:"form-grid"},Y={for:"pw-current"},Z={for:"pw-new"},$={for:"pw-confirm"},ee=["disabled"],se={class:"card settings-section"},te={class:"s-title"},ae={class:"s-desc"},oe={class:"row",style:{gap:"10px","align-items":"center"}},ne={class:"avatar",style:{width:"44px",height:"44px","font-size":"18px"}},le={style:{"font-weight":"700"}},ie={class:"muted",style:{"font-size":"13px"}},ue={__name:"Settings",setup(re){const r=U({name:"",email:""}),l=U({current:"",newp:"",confirm:""}),w=p(!1),d=p(!1),m=p(""),h=p(!1),u=p(""),f=p(!1),C=k(()=>{var n,s;return(((n=i.user)==null?void 0:n.name)||((s=i.user)==null?void 0:s.username)||"?").slice(0,1).toUpperCase()}),D=k(()=>{var n,s;return((n=i.user)==null?void 0:n.name)||((s=i.user)==null?void 0:s.username)||""});E(()=>{var n,s;r.name=((n=i.user)==null?void 0:n.name)||"",r.email=((s=i.user)==null?void 0:s.email)||""});async function N(){w.value=!0,h.value=!1,m.value="";try{const n={};r.name.trim()&&(n.name=r.name.trim()),r.email.trim()&&(n.email=r.email.trim());const s=await B.updateProfile(n);i.user=s.user,m.value=o.t("profileSaved")}catch(n){h.value=!0,m.value=n.message}finally{w.value=!1}}async function z(){if(d.value=!0,f.value=!1,u.value="",l.newp.length<4){f.value=!0,u.value=o.t("passwordTooShort"),d.value=!1;return}if(l.newp!==l.confirm){f.value=!0,u.value=o.t("passwordMismatch"),d.value=!1;return}try{await B.changePassword({current_password:l.current,new_password:l.newp}),l.current="",l.newp="",l.confirm="",u.value=o.t("passwordChanged")}catch(n){f.value=!0,u.value=n.message}finally{d.value=!1}}return(n,s)=>{var x,P,S;return b(),g("div",null,[e("div",T,[e("h2",A,t(a(o).t("settingsTitle")),1)]),e("div",j,[e("section",q,[e("h3",F,t(a(o).t("settingsProfile")),1),e("p",G,t(a(o).t("settingsProfileDesc")),1),e("form",{onSubmit:V(N,["prevent"])},[e("div",H,[e("label",I,t(a(o).t("displayName")),1),v(e("input",{id:"p-name","onUpdate:modelValue":s[0]||(s[0]=c=>r.name=c),placeholder:((x=a(i).user)==null?void 0:x.name)||""},null,8,J),[[_,r.name]]),e("label",K,t(a(o).t("email")),1),v(e("input",{id:"p-email","onUpdate:modelValue":s[1]||(s[1]=c=>r.email=c),type:"email",placeholder:((P=a(i).user)==null?void 0:P.email)||""},null,8,L),[[_,r.email]]),e("button",{class:"primary",type:"submit",disabled:w.value,style:{"margin-top":"16px"}},t(w.value?"…":a(o).t("save")),9,O)])],32),m.value?(b(),g("p",{key:0,class:y(h.value?"error":""),style:{"margin-top":"10px"}},t(m.value),3)):M("",!0)]),e("section",Q,[e("h3",R,t(a(o).t("settingsSecurity")),1),e("p",W,t(a(o).t("settingsSecurityDesc")),1),e("form",{onSubmit:V(z,["prevent"])},[e("div",X,[e("label",Y,t(a(o).t("currentPassword")),1),v(e("input",{id:"pw-current","onUpdate:modelValue":s[2]||(s[2]=c=>l.current=c),type:"password",autocomplete:"current-password"},null,512),[[_,l.current]]),e("label",Z,t(a(o).t("newPassword")),1),v(e("input",{id:"pw-new","onUpdate:modelValue":s[3]||(s[3]=c=>l.newp=c),type:"password",autocomplete:"new-password"},null,512),[[_,l.newp]]),e("label",$,t(a(o).t("confirmPassword")),1),v(e("input",{id:"pw-confirm","onUpdate:modelValue":s[4]||(s[4]=c=>l.confirm=c),type:"password",autocomplete:"new-password"},null,512),[[_,l.confirm]]),e("button",{class:"primary",type:"submit",disabled:d.value,style:{"margin-top":"16px"}},t(d.value?"…":a(o).t("changePassword")),9,ee)])],32),u.value?(b(),g("p",{key:0,class:y(f.value?"error":""),style:{"margin-top":"10px"}},t(u.value),3)):M("",!0)]),e("section",se,[e("h3",te,t(a(o).t("account")),1),e("p",ae,t(a(o).t("role"))+" / "+t(a(o).t("status")),1),e("div",oe,[e("span",ne,t(C.value),1),e("div",null,[e("div",le,t(D.value),1),e("div",ie,t((S=a(i).user)==null?void 0:S.username),1)]),e("span",{class:y(["badge",a(i).role])},t(a(i).role),3)])])])])}}};export{ue as default};
|
||||
Reference in New Issue
Block a user