You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.0 KiB
1 lines
2.0 KiB
var c=Object.defineProperty;var p=(t,e,s)=>e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var n=(t,e,s)=>p(t,typeof e!="symbol"?e+"":e,s);import{C as b,V as m,f as v,e as u,M as g,_ as f,x as h,h as _,j as i,k as x,m as N,s as C,l as w}from"./index-BLqts8WY.js";var y=Object.defineProperty,k=Object.getOwnPropertyDescriptor,S=(t,e,s,o)=>{for(var a=o>1?void 0:o?k(e,s):e,r=t.length-1,l;r>=0;r--)(l=t[r])&&(a=(o?l(e,s,a):l(a))||a);return o&&a&&y(e,s,a),a};let d=class extends m{constructor(){super(...arguments);n(this,"$notify");n(this,"callback",()=>{});n(this,"givenName","");n(this,"visible",!1)}async open(s){this.callback=s||this.callback;const o=await v();this.givenName=o.firstName||"",this.visible=!0}async onClickSaveChanges(){await u.settings.update(g,{firstName:this.givenName}),this.visible=!1,this.callback(this.givenName)}onClickCancel(){this.visible=!1}};d=S([b],d);const $={key:0,class:"dialog-overlay"},D={class:"dialog"},T={class:"mt-8"},V={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"};function U(t,e,s,o,a,r){return t.visible?(h(),_("div",$,[i("div",D,[e[3]||(e[3]=i("h1",{class:"text-xl font-bold text-center mb-4"},"Set Your Name",-1)),e[4]||(e[4]=x(" This is not sent to servers. It is only shared with people when you send it to them. ")),N(i("input",{type:"text",placeholder:"Name",class:"block w-full rounded border border-slate-400 mb-4 px-3 py-2","onUpdate:modelValue":e[0]||(e[0]=l=>t.givenName=l)},null,512),[[C,t.givenName]]),i("div",T,[i("div",V,[i("button",{type:"button",class:"block w-full text-center text-lg font-bold uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[1]||(e[1]=l=>t.onClickSaveChanges())}," Save "),i("button",{type:"button",class:"block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md mb-2",onClick:e[2]||(e[2]=l=>t.onClickCancel())}," Cancel ")])])])])):w("",!0)}const j=f(d,[["render",U]]);export{j as U};
|
|
|