PageSourceSearch

https://app.backstagebaton.com/app/assets/AccountCalendarFeedPage-OvWUzu5j.js

js backstagebaton.com collected 2026-10-07 08:51:08 UTC 8,506 bytes, 1 lines download raw bytes

1import{g as v,b as C,c as N,r as l,v as g,t as O,j as e,B as m,I as U,L as R}from"./index-_aijvlUq.js";import{P as h}from"./PageHeader-DCofr6qo.js";import{C as S}from"./ConfirmDialog-CODvETNM.js";function P(){const r=v(),{user:t}=C(),{showSuccess:i,showError:s}=N(),[d,x]=l.useState(!0),[c,b]=l.useState(!1),[f,p]=l.useState(!1),[a,u]=l.useState(null);l.useEffect(()=>{if(!t?.memberId){x(!1);return}g.get("/members/me/calendar-feed").then(u).catch(()=>s(O("calendar feed"))).finally(()=>x(!1))},[t?.memberId]);async function y(){b(!0);try{const n=await g.post("/members/me/calendar-feed/reset",{});u(n),i("Calendar feed link reset. Old subscriptions will stop working.")}catch(n){s(n.message||"Failed to reset calendar feed link.")}finally{b(!1),p(!1)}}function j(){a?.webcalUrl&&navigator.clipboard.writeText(a.webcalUrl).then(()=>i("Subscription link copied to clipboard.")).catch(()=>s("Could not copy. Long-press the link to copy manually."))}if(!t?.memberId)return e.jsx("div",{className:"px-4 pt-3 md:px-0 md:pt-0",children:e.jsxs("div",{className:"max-w-2xl",children:[!r&&e.jsx(h,{title:"Calendar Feed",breadcrumbs:[{label:"Home",to:"/"},{label:"Account"},{label:"Calendar Feed"}]}),e.jsx("p",{className:"text-sm text-gray-600 mt-4",children:"This page is only available to members linked to a band profile."})]})});if(d)return e.jsx("div",{className:"px-4 pt-3 md:px-0 md:pt-0",children:e.jsxs("div",{className:"max-w-2xl",children:[!r&&e.jsx(h,{title:"Calendar Feed",breadcrumbs:[{label:"Home",to:"/"},{label:"Account"},{label:"Calendar Feed"}]}),e.jsx("p",{className:"text-sm text-gray-500 mt-4",children:"Loading…"})]})});const w=a?.webcalUrl?`https://calendar.google.com/calendar/r?cid=${a.webcalUrl}`:"#",k=a?.httpsUrl?`https://outlook.live.com/calendar/0/addfromweb?url=${encodeURIComponent(a.httpsUrl)}&name=${encodeURIComponent("Backstage Baton")}`:"#";return e.jsx("div",{className:"px-4 pt-3 md:px-0 md:pt-0",children:e.jsxs("div",{className:"max-w-2xl",children:[!r&&e.jsx(h,{title:"Calendar Feed",subtitle:"Subscribe once and your performances + rehearsals stay in sync with your phone calendar."}),e.jsxs("div",{className:"bg-band-50 border border-band-200 rounded-xl p-4 mt-4 text-sm text-band-900",children:[e.jsx("p",{className:"font-semibold mb-1",children:"Updates take a few hours to appear"}),e.jsxs("p",{className:"text-band-800",children:["Once you subscribe, every published performance and rehearsal in your ensembles will appear in your calendar app and stay in sync. Calendar apps refresh on ",e.jsx("strong",{children:"their own schedule"}),", typically every few hours — edits to dates, times, and venues land at the next refresh, not instantly. For urgent same-week changes you'll still get an email or text. Cancellations drop out automatically once your calendar refreshes."]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 mt-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wide mb-3",children:"Your subscription link"}),e.jsxs("div",{className:"flex gap-2 items-stretch",children:[e.jsx("input",{readOnly:!0,value:a?.webcalUrl||"",onFocus:n=>n.target.select(),className:"flex-1 min-w-0 text-xs font-mono px-3 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-800"}),e.jsx(m,{onClick:j,variant:"ghost",children:"Copy"})]}),e.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Anyone with this link can read your performance schedule. Reset it below if you ever lose your phone or share it by mistake."})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 mt-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wide mb-3",children:"One-tap subscribe"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(o,{label:"iPhone or iPad",help:"Tap, then confirm Subscribe in the calendar prompt.",href:a?.webcalUrl,cta:"Open in iOS Calendar"}),e.jsx(o,{label:"Mac",help:"Opens Calendar.app and subscribes.",href:a?.webcalUrl,cta:"Open in macOS Calendar"}),e.jsx(o,{label:"Google Calendar",help:"Opens Google Calendar with the Add-from-URL prompt pre-filled.",href:w,cta:"Add to Google Calendar",external:!0}),e.jsx(o,{label:"Outlook",help:"Opens Outlook for the Web's add-by-URL prompt.",href:k,cta:"Add to Outlook",external:!0}),e.jsx(o,{label:"Android (other)",help:"Most Android calendar apps accept the link directly. Tap and pick your calendar app.",href:a?.webcalUrl,cta:"Open subscription link"})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 mt-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wide mb-2",children:"Prefer paper?"}),e.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Open the print-friendly schedule and hit Print. Same content as the calendar feed — all of your upcoming performances, rehearsals, and events."}),e.jsx("div",{className:"flex flex-wrap gap-2",children:e.jsxs(m,{variant:"primary",size:"md",disabled:!a?.printUrl,onClick:()=>U(a.printUrl,{isMobile:r}),children:[e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"})}),"Open printable schedule"]})})]}),e.jsxs("details",{className:"bg-white rounded-xl border border-gray-200 p-5 mt-4",children:[e.jsx("summary",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wide cursor-pointer",children:"Not working?"}),e.jsxs("ul",{className:"text-sm text-gray-600 list-disc pl-5 mt-3 space-y-2",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"iPhone / iPad:"}),' after tapping Subscribe, open the Calendar app and check the calendar list (tap "Calendars" at the bottom). Subscribed calendars often start hidden — tick the box next to "Backstage Baton" to show its events.']}),e.jsxs("li",{children:[e.jsx("strong",{children:"Google Calendar:"}),` if "Add to Google Calendar" doesn't open the prompt on first try, copy the link above and paste it into Google Calendar → Other calendars → "+" → "From URL".`]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Outlook (work email):"}
1),' some employer-managed Outlook accounts block external calendar subscriptions. If "Add to Outlook" fails, ask your IT admin to allow internet calendar subscriptions, or subscribe from a personal calendar app instead.']}),e.jsxs("li",{children:[e.jsx("strong",{children:"Don't see a recent edit yet?"})," Calendar apps refresh on their own clock — typically every few hours. Force a refresh by pulling down on the calendar list (iOS) or reloading Google Calendar."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Still stuck?"})," ",e.jsx(R,{to:"/help",className:"text-band-700 underline",children:"Visit the Help Center"})," ","for the full per-platform walkthrough, or contact your director."]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 mt-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-500 uppercase tracking-wide mb-2",children:"Reset link"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Generate a new link. Existing subscribed calendars will stop receiving updates and you'll need to re-subscribe with the new link."}),e.jsx(m,{variant:"ghost",onClick:()=>p(!0),disabled:c,isLoading:c,children:"Reset link"})]}),e.jsx(S,{isOpen:f,title:"Reset calendar feed link?",message:"Any device currently subscribed to your calendar will stop receiving updates. You'll need to re-subscribe with the new link.",confirmLabel:"Reset link",confirmVariant:"danger",isLoading:c,onConfirm:y,onClose:()=>p(!1)})]})})}function o({label:r,help:t,href:i,cta:s,external:d}){return e.jsxs("div",{className:"flex items-center justify-between gap-3 border border-gray-100 rounded-lg p-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium text-gray-900",children:r}),e.jsx("div",{className:"text-xs text-gray-500 mt-0.5",children:t})]}),e.jsx("a",{href:i||"#",target:d?"_blank":void 0,rel:d?"noopener noreferrer":void 0,className:"shrink-0 inline-flex items-center min-h-[44px] px-4 rounded-lg text-sm font-semibold bg-brand-primary text-white hover:opacity-90 transition-opacity",children:s})]})}export{P as AccountCalendarFeedPage};

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.