Validate sessions against the API, honor configurable base paths, and route unknown pages to 404. Keep development ports stable so user and admin apps cannot be confused. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 line
3.3 KiB
JavaScript
1 line
3.3 KiB
JavaScript
import{D as e,E as t,Et as n,J as r,Kt as i,M as a,N as o,O as s,P as c,T as l,Xt as u,Z as d,b as f,g as p,st as m,t as h,vt as g,w as _}from"./_plugin-vue_export-helper-Bo3WtfwJ.js";import{t as v}from"./BasicIcon-BXxbbWA_.js";import{u as y}from"./dist-nK9ByyUG.js";import{a as b,c as x,d as S,n as C}from"./index-BAQfYU-Q.js";import{t as w}from"./ProfileSubpageLayout-C-s-O95S.js";var T={class:`settings-page`},E={class:`settings-links`,"aria-label":`حساب کاربری`},D={class:`settings-link__icon`,"aria-hidden":`true`},O={class:`settings-link__icon`,"aria-hidden":`true`},k={class:`settings-link__label`},A={key:0},j={class:`display-fieldset`},M={class:`display-grid`,role:`radiogroup`,"aria-label":`حالت نمایش`},N=[`aria-checked`,`onClick`],P={class:`theme-card__icon`,"aria-hidden":`true`},F={class:`theme-card__body`},I={class:`theme-card__label`},L={class:`theme-card__desc`},R={class:`theme-card__check`,"aria-hidden":`true`},z={key:0,class:`display-saved`},B=h(c({__name:`ProfileDisplayView`,setup(c){let h=p(),B=x(),V=S(),H=b(),U=g(!1),{start:W}=y(()=>{U.value=!1},2e3),G=[{value:`light`,label:`روشن`,description:`پسزمینه روشن و کنتراست بالا`,icon:`vuesax-linear:sun-1`},{value:`dark`,label:`تاریک`,description:`مناسب استفاده در شب`,icon:`vuesax-linear:moon`},{value:`system`,label:`سیستم`,description:`همتراز با تنظیمات دستگاه`,icon:`vuesax-linear:mobile`}],K=_(()=>V.draftChecks.length);function q(){U.value=!0,W()}function J(){B.logout(),h.replace(`/welcome`)}return(c,p)=>(r(),t(w,{title:`تنظیمات`,subtitle:`نمایش، حساب کاربری و خروج`},{default:m(()=>[l(`div`,T,[l(`nav`,E,[l(`button`,{type:`button`,class:`settings-link`,onClick:p[0]||=e=>n(h).push(`/profile/edit`)},[l(`span`,D,[o(v,{icon:`vuesax-linear:profile-circle`,size:20,"stroke-width":1.5})]),p[2]||=l(`span`,{class:`settings-link__label`},`اطلاعات کاربری`,-1),o(v,{class:`settings-link__chevron`,icon:`vuesax-linear:arrow-left-1`,size:16,"stroke-width":1.5})]),l(`button`,{type:`button`,class:`settings-link`,onClick:p[1]||=e=>n(h).push(`/profile/checks`)},[l(`span`,O,[o(v,{icon:`vuesax-linear:card`,size:20,"stroke-width":1.5})]),l(`span`,k,[p[3]||=a(` لیست چکها `,-1),K.value?(r(),s(`em`,A,`(`+u(K.value)+`)`,1)):e(``,!0)]),o(v,{class:`settings-link__chevron`,icon:`vuesax-linear:arrow-left-1`,size:16,"stroke-width":1.5})])]),l(`fieldset`,j,[p[4]||=l(`legend`,{class:`display-fieldset__legend`},`حالت نمایش`,-1),l(`div`,M,[(r(),s(f,null,d(G,a=>l(`button`,{key:a.value,type:`button`,class:i([`theme-card`,{"theme-card--active":n(H).preference===a.value}]),role:`radio`,"aria-checked":n(H).preference===a.value,onClick:e=>n(H).preference=a.value},[l(`span`,P,[o(v,{icon:a.icon,size:26,"stroke-width":1.5},null,8,[`icon`])]),l(`span`,F,[l(`strong`,I,u(a.label),1),l(`span`,L,u(a.description),1)]),l(`span`,R,[n(H).preference===a.value?(r(),t(v,{key:0,icon:`vuesax-linear:tick-circle`,size:20,"stroke-width":1.75})):e(``,!0)])],10,N)),64))])]),o(C,{block:``,onClick:q},{default:m(()=>[...p[5]||=[a(`ذخیره تنظیمات`,-1)]]),_:1}),U.value?(r(),s(`p`,z,`تنظیمات نمایش ذخیره شد ✓`)):e(``,!0),l(`button`,{type:`button`,class:`settings-logout`,onClick:J},`خروج`)])]),_:1}))}}),[[`__scopeId`,`data-v-f16dc950`]]);export{B as default}; |