dist/ is gitignored by apps/admin-panel/.gitignore but is deliberately committed for Dokploy copy-only deploys (see root .gitignore's note), so it is force-added. The previous artifact was a pre-port prototype build; the previous commit removed its two stale assets without being able to add the new ones, leaving index.html pointing at files absent from git. This restores a self-consistent artifact built from current source. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 lines
766 B
JavaScript
2 lines
766 B
JavaScript
import{G as n,Q as o,R as s,b as a,x as i}from"./index-C4VtVyHl.js";const g=n("auth",{state:()=>({userPermission:[]}),getters:{token:()=>localStorage.getItem(o),user:()=>{const e=localStorage.getItem(s);if(!e)return null;try{return JSON.parse(e)}catch{return null}},isLoggedIn(){return!!this.token}},actions:{async login(e){const{data:r}=await i.post("admin-login",e);a().getRoles((r.roles??[]).map(l=>l.rid));const t={...r};return delete t.roles,delete t.ut,this.inject(t),t},inject(e){localStorage.setItem(o,e.api_token),localStorage.setItem("login","true"),localStorage.setItem(s,JSON.stringify(e))},logout(){localStorage.removeItem(o),localStorage.removeItem(s),localStorage.removeItem("login");const e=a();e.deleteRoles(),e.deleteUserInfo()}}});export{g as u};
|