Calendar subscribe: clickable buttons instead of copy-paste instructions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

- Apple Calendar: webcal:// link opens native iOS/macOS calendar directly
- Google Calendar: direct link to calendar.google.com/render?cid=
- Outlook: direct link to outlook.live.com/addfromweb
- Manual copy-paste link kept as fallback at bottom

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-25 16:16:00 +01:00
parent d5b95dff48
commit 355e2a152e

View File

@ -571,18 +571,28 @@
<button onclick="document.getElementById('subscribeModal').style.display='none'" style="position:absolute; top:12px; right:16px; background:none; border:none; font-size:20px; cursor:pointer; color:#64748b;">&times;</button>
<h3 style="margin:0 0 8px 0; font-size:18px;">Dodaj wydarzenia do kalendarza</h3>
<p style="color:#64748b; font-size:13px; line-height:1.5; margin-bottom:16px;">
Skopiuj poniższy link i dodaj go jako subskrypcję w swoim kalendarzu.
Wydarzenia Izby będą się automatycznie synchronizować.
Kliknij przycisk odpowiedni dla Twojego kalendarza. Wydarzenia Izby będą się automatycznie synchronizować.
</p>
<div style="display:flex; gap:8px; margin-bottom:16px;">
<input id="icalUrl" readonly value="https://nordabiznes.pl/kalendarz/ical" style="flex:1; padding:8px 12px; border:1px solid #d1d5db; border-radius:var(--radius); font-size:13px; background:#f9fafb; font-family:monospace;">
<button onclick="copyIcalUrl()" id="copyBtn" style="padding:8px 16px; background:#1d4ed8; color:white; border:none; border-radius:var(--radius); font-size:13px; cursor:pointer; font-weight:500; white-space:nowrap;">Kopiuj</button>
<div style="display:flex; flex-direction:column; gap:10px; margin-bottom:16px;">
<a href="webcal://nordabiznes.pl/kalendarz/ical" style="display:flex; align-items:center; gap:10px; padding:12px 16px; background:#f9fafb; border:1px solid #e5e7eb; border-radius:var(--radius); text-decoration:none; color:#1f2937; font-size:14px; font-weight:500;">
<span style="font-size:22px;">🍎</span>
<span>iPhone / Mac — Kalendarz Apple</span>
</a>
<a href="https://calendar.google.com/calendar/render?cid=webcal%3A%2F%2Fnordabiznes.pl%2Fkalendarz%2Fical" target="_blank" style="display:flex; align-items:center; gap:10px; padding:12px 16px; background:#f9fafb; border:1px solid #e5e7eb; border-radius:var(--radius); text-decoration:none; color:#1f2937; font-size:14px; font-weight:500;">
<span style="font-size:22px;">📅</span>
<span>Google Calendar</span>
</a>
<a href="https://outlook.live.com/calendar/0/addfromweb?url=https%3A%2F%2Fnordabiznes.pl%2Fkalendarz%2Fical&name=Norda%20Biznes" target="_blank" style="display:flex; align-items:center; gap:10px; padding:12px 16px; background:#f9fafb; border:1px solid #e5e7eb; border-radius:var(--radius); text-decoration:none; color:#1f2937; font-size:14px; font-weight:500;">
<span style="font-size:22px;">📧</span>
<span>Outlook</span>
</a>
</div>
<div style="font-size:12px; color:#64748b; line-height:1.6;">
<strong>Jak dodać:</strong><br>
<strong>iPhone/Mac:</strong> Ustawienia → Konta → Dodaj konto → Inne → Subskrypcja kalendarza → wklej link<br>
<strong>Google Calendar:</strong> Inne kalendarze (+) → Z adresu URL → wklej link<br>
<strong>Outlook:</strong> Dodaj kalendarz → Subskrybuj z internetu → wklej link
<div style="border-top:1px solid #e5e7eb; padding-top:12px;">
<p style="color:#94a3b8; font-size:12px; margin:0 0 6px 0;">Lub skopiuj link ręcznie:</p>
<div style="display:flex; gap:8px;">
<input id="icalUrl" readonly value="https://nordabiznes.pl/kalendarz/ical" style="flex:1; padding:8px 12px; border:1px solid #d1d5db; border-radius:var(--radius); font-size:12px; background:#f9fafb; font-family:monospace;">
<button onclick="copyIcalUrl()" id="copyBtn" style="padding:8px 14px; background:#64748b; color:white; border:none; border-radius:var(--radius); font-size:12px; cursor:pointer; font-weight:500; white-space:nowrap;">Kopiuj</button>
</div>
</div>
</div>
</div>