2 lines
8.3 KiB
JavaScript
2 lines
8.3 KiB
JavaScript
import{c as r,I as N,d as H,b as $,am as j,p as a,F as T,e as F,t as B,h as i,j as _,f as g,w as p,H as I,r as f,o as x,A as U,a as J,an as R,i as W,m as v,s as O,G as q,l as Q,_ as X}from"./index-CplMEwlM.js";import{_ as E}from"./brand-icon-BUm6Bt4N.js";import{u as Y}from"./auth-_brZEiBz.js";import{T as Z,S as K}from"./TeamOutlined-t4H-9e_-.js";import{S as tt}from"./SafetyCertificateOutlined-B2nFkTrH.js";import{L as at}from"./LockOutlined-CPO5sCTm.js";var et={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 G(s){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?Object(arguments[e]):{},l=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(o).filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable}))),l.forEach(function(n){ot(s,n,o[n])})}return s}function ot(s,e,o){return e in s?Object.defineProperty(s,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[e]=o,s}var w=function(e,o){var l=G({},e,o.attrs);return r(N,G({},l,{icon:et}),null)};w.displayName="LineChartOutlined";w.inheritAttrs=!1;var st={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 V(s){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?Object(arguments[e]):{},l=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(o).filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable}))),l.forEach(function(n){lt(s,n,o[n])})}return s}function lt(s,e,o){return e in s?Object.defineProperty(s,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[e]=o,s}var S=function(e,o){var l=V({},e,o.attrs);return r(N,V({},l,{icon:st}),null)};S.displayName="MobileOutlined";S.inheritAttrs=!1;const nt={id:"page-login"},rt={class:"sparkles","aria-hidden":"true"},it={class:"login-layout"},dt={class:"hero","aria-hidden":"true"},ut={class:"brand-row"},pt={class:"brand-name"},ct={class:"chips"},ft={class:"form-side"},vt={class:"glass-card"},gt={class:"card-head"},mt={class:"logo-chip logo-chip--sm"},bt=["alt"],ht={class:"secure-note"},yt={class:"page-footer"},_t=H({__name:"Login",setup(s){const e=Q(),o=Y(),l=v(""),n=v(""),c=v(!1),P=v(!1),L=v(!1);function k(u){const t=u*37%100,y=u*53%100;return{left:`${t}%`,top:`${y}%`,animationDelay:`${u*.7%6}s`,transform:`scale(${.6+u*13%10/15})`}}const m=O(()=>P.value?l.value?l.value.length<8?"مقدار ورودی صحیح نیست":"":"وارد کردن موبایل الزامی است":""),b=O(()=>L.value?n.value?n.value.length<5?"مقدار ورودی صحیح نیست":"":"وارد کردن رمز عبور الزامی است":""),C=O(()=>!m.value&&!b.value&&l.value!==""&&n.value!=="");async function h(){if(!(!C.value||c.value)){c.value=!0;try{await o.login({phone:l.value,password:n.value}),await e.push("/dashboard/ecommerce")}catch(u){console.log(u),q.error("خطا در ورود")}finally{c.value=!1}}}return(u,t)=>{const y=f("a-input"),M=f("a-form-item"),z=f("a-input-password"),A=f("a-button"),D=f("a-form");return x(),$("div",nt,[t[14]||(t[14]=j('<div class="aurora" aria-hidden="true" data-v-59990315><span class="blob blob--gold" data-v-59990315></span><span class="blob blob--teal" data-v-59990315></span><span class="blob blob--navy" data-v-59990315></span></div><div class="grid-bg" aria-hidden="true" data-v-59990315></div>',2)),a("div",rt,[(x(),$(T,null,F(14,d=>a("i",{key:d,style:U(k(d))},null,4)),64))]),a("main",it,[a("section",dt,[a("div",ut,[t[4]||(t[4]=a("div",{class:"logo-chip"},[a("img",{src:E,alt:""})],-1)),a("span",pt,B(i(_).nameEn),1)]),t[8]||(t[8]=j('<h2 class="hero-title" data-v-59990315> مدیریت هوشمند <span class="gold-text" data-v-59990315>کسبوکار طلا</span></h2><p class="hero-sub" data-v-59990315>سفارشها، مشتریان، محصولات و حسابداری؛ همه در یک پنل.</p><div class="ingots" data-v-59990315><div class="ingot-glow" data-v-59990315></div><svg viewBox="0 0 400 240" class="ingot-svg" data-v-59990315><defs data-v-59990315><linearGradient id="ig-front" x1="0" y1="0" x2="0" y2="1" data-v-59990315><stop offset="0" stop-color="#ffe7a3" data-v-59990315></stop><stop offset="0.45" stop-color="#e9b949" data-v-59990315></stop><stop offset="1" stop-color="#b07a1e" data-v-59990315></stop></linearGradient><linearGradient id="ig-top" x1="0" y1="0" x2="1" y2="0" data-v-59990315><stop offset="0" stop-color="#fff6d6" data-v-59990315></stop><stop offset="1" stop-color="#f4cf6a" data-v-59990315></stop></linearGradient><linearGradient id="ig-side" x1="0" y1="0" x2="0" y2="1" data-v-59990315><stop offset="0" stop-color="#c58f2a" data-v-59990315></stop><stop offset="1" stop-color="#7d5313" data-v-59990315></stop></linearGradient><linearGradient id="ig-shine" x1="0" y1="0" x2="1" y2="0" data-v-59990315><stop offset="0" stop-color="#fff" stop-opacity="0" data-v-59990315></stop><stop offset="0.5" stop-color="#fff" stop-opacity="0.75" data-v-59990315></stop><stop offset="1" stop-color="#fff" stop-opacity="0" data-v-59990315></stop></linearGradient><clipPath id="ig-clip" data-v-59990315><polygon points="0,64 176,64 156,20 20,20" data-v-59990315></polygon></clipPath><g id="ingot" data-v-59990315><polygon points="20,20 156,20 172,6 36,6" fill="url(#ig-top)" data-v-59990315></polygon><polygon points="156,20 172,6 196,50 176,64" fill="url(#ig-side)" data-v-59990315></polygon><polygon points="0,64 176,64 156,20 20,20" fill="url(#ig-front)" data-v-59990315></polygon><g clip-path="url(#ig-clip)" data-v-59990315><rect class="shine" x="-80" y="0" width="60" height="70" fill="url(#ig-shine)" data-v-59990315></rect></g><text x="88" y="49" text-anchor="middle" class="ingot-label" data-v-59990315>999.9</text></g></defs><use href="#ingot" x="0" y="160" data-v-59990315></use><use href="#ingot" x="196" y="160" data-v-59990315></use><use href="#ingot" x="98" y="104" data-v-59990315></use></svg></div>',3)),a("ul",ct,[a("li",null,[r(i(w)),t[5]||(t[5]=g(" گزارش لحظهای",-1))]),a("li",null,[r(i(Z)),t[6]||(t[6]=g(" مدیریت مشتریان",-1))]),a("li",null,[r(i(K)),t[7]||(t[7]=g(" پیگیری سفارش",-1))])])]),a("section",ft,[a("div",vt,[a("div",gt,[a("div",mt,[a("img",{src:E,alt:i(_).nameEn},null,8,bt)]),t[9]||(t[9]=a("span",{class:"eyebrow"},[a("span",{class:"dot"}),g("پنل مدیریت")],-1))]),t[12]||(t[12]=a("h1",{class:"title"},"ورود به محیط مدیریت",-1)),t[13]||(t[13]=a("p",{class:"subtitle"},"لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.",-1)),r(D,{layout:"vertical",class:"login-form",onSubmit:I(h,["prevent"])},{default:p(()=>[r(M,{label:"موبایل","validate-status":m.value?"error":"",help:m.value},{default:p(()=>[r(y,{value:l.value,"onUpdate:value":t[0]||(t[0]=d=>l.value=d),autocomplete:"off",inputmode:"numeric",placeholder:"09xxxxxxxxx",class:"ltr-input",onBlur:t[1]||(t[1]=d=>P.value=!0)},{prefix:p(()=>[r(i(S),{class:"field-icon"})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),r(M,{label:"رمز عبور","validate-status":b.value?"error":"",help:b.value},{default:p(()=>[r(z,{value:n.value,"onUpdate:value":t[2]||(t[2]=d=>n.value=d),placeholder:"••••••",class:"ltr-input",onBlur:t[3]||(t[3]=d=>L.value=!0),onPressEnter:h},{prefix:p(()=>[r(i(at),{class:"field-icon"})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),r(A,{type:"primary",block:"",class:"submit-btn",disabled:!C.value,loading:c.value,onClick:h},{default:p(()=>[t[10]||(t[10]=a("span",null,"ورود",-1)),c.value?W("",!0):(x(),J(i(R),{key:0,class:"btn-arrow"}))]),_:1},8,["disabled","loading"])]),_:1}),a("p",ht,[r(i(tt)),t[11]||(t[11]=a("span",null,"اتصال شما رمزنگاری شده و امن است",-1))])])])]),a("footer",yt,"© "+B(i(_).nameEn),1)])}}}),Ct=X(_t,[["__scopeId","data-v-59990315"]]);export{Ct as default};
|