2 lines
8.4 KiB
JavaScript
2 lines
8.4 KiB
JavaScript
import{c as r,I as j,d as A,b as B,ab as y,n,F as T,e as D,h as u,f as x,w as p,G as F,r as v,o as _,z as H,a as I,ac as U,i as q,l as f,q as O,B as J,k as R,_ as W}from"./index-CJkJkMFX.js";import{_ as C}from"./montzar-icon-B0wdL36O.js";import{u as Q}from"./auth-SCFNR-pz.js";import{T as X,S as Y}from"./TeamOutlined-mPWKuAqx.js";import{S as Z}from"./SafetyCertificateOutlined-Dpqr0GGL.js";import{L as K}from"./LockOutlined-zb-PbzeE.js";var aa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"};function $(o){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},s=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(e).filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable}))),s.forEach(function(l){ta(o,l,e[l])})}return o}function ta(o,t,e){return t in o?Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[t]=e,o}var w=function(t,e){var s=$({},t,e.attrs);return r(j,$({},s,{icon:aa}),null)};w.displayName="LineChartOutlined";w.inheritAttrs=!1;var ea={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"mobile",theme:"outlined"};function G(o){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},s=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(e).filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable}))),s.forEach(function(l){oa(o,l,e[l])})}return o}function oa(o,t,e){return t in o?Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):o[t]=e,o}var S=function(t,e){var s=G({},t,e.attrs);return r(j,G({},s,{icon:ea}),null)};S.displayName="MobileOutlined";S.inheritAttrs=!1;const sa={id:"page-login"},la={class:"sparkles","aria-hidden":"true"},na={class:"login-layout"},ra={class:"hero","aria-hidden":"true"},ia={class:"chips"},da={class:"form-side"},ua={class:"glass-card"},pa={class:"secure-note"},ca=A({__name:"Login",setup(o){const t=R(),e=Q(),s=f(""),l=f(""),c=f(!1),P=f(!1),L=f(!1);function V(d){const a=d*37%100,h=d*53%100;return{left:`${a}%`,top:`${h}%`,animationDelay:`${d*.7%6}s`,transform:`scale(${.6+d*13%10/15})`}}const g=O(()=>P.value?s.value?s.value.length<8?"مقدار ورودی صحیح نیست":"":"وارد کردن موبایل الزامی است":""),m=O(()=>L.value?l.value?l.value.length<5?"مقدار ورودی صحیح نیست":"":"وارد کردن رمز عبور الزامی است":""),M=O(()=>!g.value&&!m.value&&s.value!==""&&l.value!=="");async function b(){if(!(!M.value||c.value)){c.value=!0;try{await e.login({phone:s.value,password:l.value}),await t.push("/dashboard/ecommerce")}catch(d){console.log(d),J.error("خطا در ورود")}finally{c.value=!1}}}return(d,a)=>{const h=v("a-input"),z=v("a-form-item"),k=v("a-input-password"),N=v("a-button"),E=v("a-form");return _(),B("div",sa,[a[11]||(a[11]=y('<div class="aurora" aria-hidden="true" data-v-d439a304><span class="blob blob--gold" data-v-d439a304></span><span class="blob blob--teal" data-v-d439a304></span><span class="blob blob--navy" data-v-d439a304></span></div><div class="grid-bg" aria-hidden="true" data-v-d439a304></div>',2)),n("div",la,[(_(),B(T,null,D(14,i=>n("i",{key:i,style:H(V(i))},null,4)),64))]),n("main",na,[n("section",ra,[a[7]||(a[7]=y('<div class="brand-row" data-v-d439a304><div class="logo-chip" data-v-d439a304><img src="'+C+'" alt="" data-v-d439a304></div><span class="brand-name" data-v-d439a304>Montzar</span></div><h2 class="hero-title" data-v-d439a304> مدیریت هوشمند <span class="gold-text" data-v-d439a304>کسبوکار طلا</span></h2><p class="hero-sub" data-v-d439a304>سفارشها، مشتریان، محصولات و حسابداری؛ همه در یک پنل.</p><div class="ingots" data-v-d439a304><div class="ingot-glow" data-v-d439a304></div><svg viewBox="0 0 400 240" class="ingot-svg" data-v-d439a304><defs data-v-d439a304><linearGradient id="ig-front" x1="0" y1="0" x2="0" y2="1" data-v-d439a304><stop offset="0" stop-color="#ffe7a3" data-v-d439a304></stop><stop offset="0.45" stop-color="#e9b949" data-v-d439a304></stop><stop offset="1" stop-color="#b07a1e" data-v-d439a304></stop></linearGradient><linearGradient id="ig-top" x1="0" y1="0" x2="1" y2="0" data-v-d439a304><stop offset="0" stop-color="#fff6d6" data-v-d439a304></stop><stop offset="1" stop-color="#f4cf6a" data-v-d439a304></stop></linearGradient><linearGradient id="ig-side" x1="0" y1="0" x2="0" y2="1" data-v-d439a304><stop offset="0" stop-color="#c58f2a" data-v-d439a304></stop><stop offset="1" stop-color="#7d5313" data-v-d439a304></stop></linearGradient><linearGradient id="ig-shine" x1="0" y1="0" x2="1" y2="0" data-v-d439a304><stop offset="0" stop-color="#fff" stop-opacity="0" data-v-d439a304></stop><stop offset="0.5" stop-color="#fff" stop-opacity="0.75" data-v-d439a304></stop><stop offset="1" stop-color="#fff" stop-opacity="0" data-v-d439a304></stop></linearGradient><clipPath id="ig-clip" data-v-d439a304><polygon points="0,64 176,64 156,20 20,20" data-v-d439a304></polygon></clipPath><g id="ingot" data-v-d439a304><polygon points="20,20 156,20 172,6 36,6" fill="url(#ig-top)" data-v-d439a304></polygon><polygon points="156,20 172,6 196,50 176,64" fill="url(#ig-side)" data-v-d439a304></polygon><polygon points="0,64 176,64 156,20 20,20" fill="url(#ig-front)" data-v-d439a304></polygon><g clip-path="url(#ig-clip)" data-v-d439a304><rect class="shine" x="-80" y="0" width="60" height="70" fill="url(#ig-shine)" data-v-d439a304></rect></g><text x="88" y="49" text-anchor="middle" class="ingot-label" data-v-d439a304>999.9</text></g></defs><use href="#ingot" x="0" y="160" data-v-d439a304></use><use href="#ingot" x="196" y="160" data-v-d439a304></use><use href="#ingot" x="98" y="104" data-v-d439a304></use></svg></div>',4)),n("ul",ia,[n("li",null,[r(u(w)),a[4]||(a[4]=x(" گزارش لحظهای",-1))]),n("li",null,[r(u(X)),a[5]||(a[5]=x(" مدیریت مشتریان",-1))]),n("li",null,[r(u(Y)),a[6]||(a[6]=x(" پیگیری سفارش",-1))])])]),n("section",da,[n("div",ua,[a[10]||(a[10]=y('<div class="card-head" data-v-d439a304><div class="logo-chip logo-chip--sm" data-v-d439a304><img src="'+C+'" alt="Montzar" data-v-d439a304></div><span class="eyebrow" data-v-d439a304><span class="dot" data-v-d439a304></span>پنل مدیریت</span></div><h1 class="title" data-v-d439a304>ورود به محیط مدیریت</h1><p class="subtitle" data-v-d439a304>لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.</p>',3)),r(E,{layout:"vertical",class:"login-form",onSubmit:F(b,["prevent"])},{default:p(()=>[r(z,{label:"موبایل","validate-status":g.value?"error":"",help:g.value},{default:p(()=>[r(h,{value:s.value,"onUpdate:value":a[0]||(a[0]=i=>s.value=i),autocomplete:"off",inputmode:"numeric",placeholder:"09xxxxxxxxx",class:"ltr-input",onBlur:a[1]||(a[1]=i=>P.value=!0)},{prefix:p(()=>[r(u(S),{class:"field-icon"})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),r(z,{label:"رمز عبور","validate-status":m.value?"error":"",help:m.value},{default:p(()=>[r(k,{value:l.value,"onUpdate:value":a[2]||(a[2]=i=>l.value=i),placeholder:"••••••",class:"ltr-input",onBlur:a[3]||(a[3]=i=>L.value=!0),onPressEnter:b},{prefix:p(()=>[r(u(K),{class:"field-icon"})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),r(N,{type:"primary",block:"",class:"submit-btn",disabled:!M.value,loading:c.value,onClick:b},{default:p(()=>[a[8]||(a[8]=n("span",null,"ورود",-1)),c.value?q("",!0):(_(),I(u(U),{key:0,class:"btn-arrow"}))]),_:1},8,["disabled","loading"])]),_:1}),n("p",pa,[r(u(Z)),a[9]||(a[9]=n("span",null,"اتصال شما رمزنگاری شده و امن است",-1))])])])]),a[12]||(a[12]=n("footer",{class:"page-footer"},"© Montzar",-1))])}}}),ya=W(ca,[["__scopeId","data-v-d439a304"]]);export{ya as default};
|