PageSourceSearch

https://zergcalendar.com/_nuxt/BcbfUTS3.js

js zergcalendar.com collected 2026-10-09 22:07:00 UTC 4,309 bytes, 1 lines download raw bytes

1import{d as E,a as I,A as M,b as O,o as S,B as L,e as l,f as o,t as p,g as s,i as a,w as n,F as j,C as q,D as b,r as u,_ as A,c as r,j as x,H as G,E as K,h as y,G as P,l as W,v as H}from"./CaX9imB3.js";import{_ as R}from"./DOx5U1lb.js";import{_ as J}from"./D7195TBM.js";import{_ as Q}from"./BB-Ro_Ej.js";import{_ as X}from"./B4nLBy3o.js";import{_ as Y}from"./ORpqMCC5.js";import{u as ee}from"./Cg2v1fQN.js";const te={class:"mx-auto max-w-5xl px-4 py-8",style:{color:"var(--skin-text)"}},oe={class:"mb-8 flex items-center justify-between"},se={class:"mt-1 text-sm",style:{color:"var(--skin-muted)"}},ae={key:0,class:"rounded-lg border p-8 text-center",style:{"border-color":"var(--skin-border)",background:"var(--skin-panel)"}},ne={key:1,class:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"},re={class:"flex items-center gap-2"},le={class:"truncate text-base font-semibold"},ie={key:0,class:"mt-1 line-clamp-2 text-sm",style:{color:"var(--skin-muted)"}},de={class:"mt-2 flex items-center gap-2 text-xs",style:{color:"var(--skin-muted)"}},ue={key:0,class:"rounded px-1.5 py-0.5 font-semibold",style:{background:"var(--skin-accent)",color:"#fff"}},ce={key:1,class:"rounded px-1.5 py-0.5 font-semibold",style:{background:"color-mix(in srgb, var(--skin-accent) 20%, transparent)"}},me={class:"flex flex-col gap-3"},ye=E({__name:"index",setup(pe){const{user:h,fetchSession:z}=I(),{currentOrgId:c,currentOrg:B}=ee(),{calendars:C,loadCalendars:$,createCalendar:D}=M();O();const i=u(!1),d=u(""),f=u("#4f46e5"),m=u(""),_=u(!1),v=u("");async function w(){c.value&&await $(c.value)}S(async()=>{h.value||await z(),await w()}),L(c,w);async function V(){if(!c.value||!d.value.trim()){v.value="Name is required";return}_.value=!0,v.value="";
1try{await D({organizationId:c.value,name:d.value.trim(),description:m.value||void 0,color:f.value}),i.value=!1,d.value="",m.value=""}catch(N){const e=N;v.value=e?.statusMessage||e?.message||"Failed to create calendar"}finally{_.value=!1}}return(N,e)=>{const k=A,F=R,T=J,g=Q,U=X,Z=Y;return r(),l("div",te,[o("header",oe,[o("div",null,[e[6]||(e[6]=o("h1",{class:"text-2xl font-semibold tracking-tight"},"Calendars",-1)),o("p",se," Workspace: "+p(s(B)?.name||"—"),1)]),a(k,{variant:"primary",size:"md",onClick:e[0]||(e[0]=t=>i.value=!0)},{default:n(()=>[...e[7]||(e[7]=[x("+ New calendar",-1)])]),_:1})]),s(C).length?(r(),l("div",ne,[(r(!0),l(j,null,q(s(C),t=>(r(),G(F,{key:t.id,to:`/app/calendars/${t.id}`,class:"block rounded-lg border p-4 transition-colors hover:border-[color:var(--skin-accent)]",style:{"border-color":"var(--skin-border)",background:"var(--skin-panel)"}},{default:n(()=>[o("div",re,[o("span",{class:"inline-block h-3 w-3 rounded-full",style:K({background:t.color})},null,4),o("p",le,p(t.name),1)]),t.description?(r(),l("p",ie,p(t.description),1)):y("",!0),o("div",de,[o("span",null,p(t.timezone),1),t.owner_kind==="agent"?(r(),l("span",ue,"AGENT")):y("",!0),t.public_token?(r(),l("span",ce,"PUBLIC")):y("",!0)])]),_:2},1032,["to"]))),128))])):(r(),l("div",ae,[...e[8]||(e[8]=[o("p",{class:"text-base font-semibold"},"No calendars yet",-1),o("p",{class:"mt-1 text-sm",style:{color:"var(--skin-muted)"}},"Create your first calendar to start scheduling events.",-1)])])),a(Z,{modelValue:s(i),"onUpdate:modelValue":e[5]||(e[5]=t=>b(i)?i.value=t:null),title:"New calendar"},{footer:n(()=>[a(k,{variant:"quiet",size:"sm",onClick:e[4]||(e[4]=t=>i.value=!1)},{default:n(()=>[...e[9]||(e[9]=[x("Cancel",-1)])]),_:1}),a(k,{variant:"primary",size:"sm",disabled:s(_),onClick:V},{default:n(()=>[x(p(s(_)?"Creating…":"Create"),1)]),_:1},8,["disabled"])]),default:n(()=>[o("div",me,[a(g,{label:"Name",error:s(v)},{default:n(()=>[a(T,{modelValue:s(d),"onUpdate:modelValue":e[1]||(e[1]=t=>b(d)?d.value=t:null),placeholder:"Work, Personal, Team meetings…",autofocus:"",onKeydown:P(V,["enter"])},null,8,["modelValue"])]),_:1},8,["error"]),a(g,{label:"Description (optional)"},{default:n(()=>[a(U,{modelValue:s(m),"onUpdate:modelValue":e[2]||(e[2]=t=>b(m)?m.value=t:null),rows:2},null,8,["modelValue"])]),_:1}),a(g,{label:"Color"},{default:n(()=>[W(o("input",{"onUpdate:modelValue":e[3]||(e[3]=t=>b(f)?f.value=t:null),type:"color",class:"h-8 w-16 cursor-pointer rounded border-0 p-0"},null,512),[[H,s(f)]])]),_:1})])]),_:1},8,["modelValue"])])}}});export{ye as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.