Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

2 righe
3.0 KiB

  1. import{j as k,k as o,z as S,C,s as j,c as d,a as e,F as g,u as I,i as z,t as F,d as N,p as $,q as B,e as L,o as r,_ as R}from"./index-5dca7a6a.js";import{g as V,a as T}from"./api-2fe5baa7.js";const b=s=>($("data-v-dbeec960"),s=s(),B(),s),q={class:"page-wrapper",id:"app","data-layout":"horizontal","data-navbarbg":"skin6","data-sidebartype":"full","data-sidebar-position":"fixed","data-header-position":"fixed"},A=N('<header class="app-header" data-v-dbeec960><nav class="navbar navbar-expand-lg navbar-light container-fluid px-0" data-v-dbeec960><ul class="navbar-nav" data-v-dbeec960><li class="nav-item d-block d-lg-none" data-v-dbeec960><a class="nav-link sidebartoggler ms-n3" id="sidebarCollapse" href="javascript:void(0)" data-v-dbeec960><i class="ti ti-menu-2" data-v-dbeec960></i></a></li><li class="nav-item d-none d-lg-block" data-v-dbeec960><a href="index.html" class="text-nowrap nav-link" data-v-dbeec960><img src="'+L+'" class="light-logo" width="180" alt="" data-v-dbeec960></a></li></ul></nav></header>',1),D={class:"body-wrapper overflow-hidden"},E={class:"position-relative overflow-hidden min-vh-100 d-flex align-items-center justify-content-center drawise-auth-bg"},J={class:"d-flex align-items-center justify-content-center w-100"},M={class:"row justify-content-center w-100"},O={class:"col-md-8 col-lg-8 col-xxl-8"},P={class:"card mb-0"},G={class:"card-body"},H=b(()=>e("h1",{class:"display-6 fs-7 mb-4 text-center"}," Pick a logo to customize ",-1)),K={class:"col-12 pb-5 text-center"},Q=["onChange","id"],U=["for"],W=["src"],X=["disabled"],Y=b(()=>e("i",{class:"ti ti-chevron-right fs-4 me-2"},null,-1)),Z=k({__name:"logo",setup(s){const c=o([]),t=o(!1),l=o("Continue"),n=o(),m=S(),f=C(),u=m.params.company,v=o(),_=o(),p=o(!1);j(()=>{c.value=JSON.parse(localStorage.getItem("logos")).icons,console.log(c.value),y()});async function y(){t.value=!0;try{(await V)(`/create_site/company/${u}/`).then(a=>{console.log(a.data),v.value=a.data.name,_.value=a.data.slogon,t.value=!1}).catch(()=>{t.value=!1,l.value="Failed. Refresh the page"})}catch(a){console.error(a)}}function x(a){n.value=a,n.value&&(p.value=!0)}const w=async()=>{t.value=!0,l.value="loading",(await T)(`/create_site/company/${u}/`,{name:v.value,slogon:_.value,logo_path:n.value}).then(a=>{a.data&&(console.log(a.data),f.push("chooseLayout"),t.value=!1)}).catch(()=>{t.value=!1,l.value="Failed. Try Again"}),console.log("alert")};return(a,ee)=>(r(),d("div",q,[A,e("div",D,[e("div",E,[e("div",J,[e("div",M,[e("div",O,[e("div",P,[e("div",G,[e("div",null,[H,e("div",K,[(r(!0),d(g,null,I(c.value,(h,i)=>(r(),d(g,{key:i},[e("input",{class:"checkbox-tools",type:"radio",name:"tools",onChange:ae=>x(h),id:"logo-"+i},null,40,Q),e("label",{class:"for-checkbox-tools",for:"logo-"+i},[e("img",{src:`https://api.drawise.net${h}`,alt:"",style:{"max-width":"100px"}},null,8,W)],8,U)],64))),128))]),e("button",{onClick:w,disabled:t.value||!p.value,class:"btn btn-success w-100 py-8 mb-4 rounded-2"},[z(F(l.value)+" ",1),Y],8,X)])])])])])])])])]))}});const se=R(Z,[["__scopeId","data-v-dbeec960"]]);export{se as default};