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.
2 lines
3.6 KiB
2 lines
3.6 KiB
2 weeks ago
|
var y=Object.defineProperty;var v=(o,t,e)=>t in o?y(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var i=(o,t,e)=>v(o,typeof t!="symbol"?t+"":t,e);import{V as C,f as D,e as k,C as $,_ as j,g as p,h as u,i as a,j as s,w as I,k as _,F as g,z as G,x as f,t as V}from"./index-BLqts8WY.js";import{G as E}from"./GiftedDialog-CFmou4Be.js";import{Q as N}from"./QuickNav-DgCyvgDx.js";import{E as P}from"./EntityIcon-CF1RwQI5.js";import{_ as S}from"./blank-square-D9dGgMJw.js";import"./index-MyY_xqVN.js";import"./index-CsfPLOYu.js";var B=Object.defineProperty,O=Object.getOwnPropertyDescriptor,Q=(o,t,e,r)=>{for(var n=r>1?void 0:r?O(t,e):t,c=o.length-1,l;c>=0;c--)(l=o[c])&&(n=(r?l(t,e,n):l(n))||n);return r&&n&&B(t,e,n),n};let b=class extends C{constructor(){super(...arguments);i(this,"$notify");i(this,"activeDid","");i(this,"allContacts",[]);i(this,"apiServer","");i(this,"description","");i(this,"projectId","");i(this,"prompt","")}async created(){try{const e=await D();this.apiServer=e.apiServer||"",this.activeDid=e.activeDid||"";const r=await k.contacts.toArray();this.allContacts=r.sort((n,c)=>(n.name||"").localeCompare(c.name||"")),this.projectId=this.$route.query.projectId||"",this.prompt=this.$route.query.prompt??this.prompt}catch(e){console.error("Error retrieving settings & contacts:",e),this.$notify({group:"alert",type:"danger",title:"Error",text:e.message||"There was an error retrieving your settings or contacts."},5e3)}}openDialog(e){const r=this.projectId?void 0:{did:this.activeDid,name:"you"};this.$refs.customDialog.open(e,r,void 0,"Given by "+((e==null?void 0:e.name)||"someone not named"),this.prompt)}};b=Q([$({components:{GiftedDialog:E,QuickNav:N,EntityIcon:P}})],b);const A={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},F={id:"ViewBreadcrumb",class:"mb-8"},q={class:"text-lg text-center font-light relative px-7"},z={class:"border-t border-slate-300"},T={class:"border-b border-slate-300 py-3"},U={class:"text-base flex gap-4 items-center"},H={class:"text-right"},L={class:"text-base flex gap-4 items-center"},J={class:"grow font-semibold"},K={class:"text-right"},M=["onClick"];function R(o,t,e,r,n,c){const l=p("QuickNav"),m=p("fa"),h=p("router-link"),x=p("EntityIcon"),w=p("GiftedDialog");return f(),u(g,null,[a(l,{selected:"Home"}),s("section",A,[s("div",F,[s("h1",q,[a(h,{to:{name:"home"},class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1"},{default:I(()=>[a(m,{icon:"chevron-left",class:"fa-fw"})]),_:1}),t[1]||(t[1]=_(" Given by... "))])]),s("ul",z,[s("li",T,[s("h2",U,[t[2]||(t[2]=s("span",{class:"grow"},[s("img",{src:S,width:"32",class:"inline-block align-middle border border-slate-300 rounded-md mr-1"}),_(" Unnamed/Unknown ")],-1)),s("span",H,[s("button",{type:"button",onClick:t[0]||(t[0]=d=>o.openDialog()),class:"block w-full text-center text-sm 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-3 py-1.5 rounded-md"},[a(m,{icon:"gift",class:"fa-fw"})])])])]),(f(!0),u(g,null,G(o.allContacts,d=>(f(),u("li",{key:d.did,class:"border-b border-slate-300 py-3"},[s("h2",L,[s("span",J,[a(x,{contact:d,iconSize:32,class:"inline-block align-middle border border-slate-300 rounded-md mr-1"},null,8,["contact"]),_(" "+V(d.name||"(no name)"),1)]),s("span",K,[s("button",{type:"button",onClick:W=>o.openDialog(d),class:"block w-full text-center text-sm 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-3 py-1.5 rounded-md"},[a(m,{icon:"gift",class:"fa-fw"})],8,M)])])]))),128))]),a(w,{ref:"customDialog",toProjectId:o.projectId},null,8,["toProjectId"])])],64)}const it=j(b,[["render",R]]);export{it as default};
|