Android calendar: add manual URL copy with step-by-step 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

Auto-subscribe link often fails on Android. Now shows both:
- Direct Google Calendar link (try first)
- Copy button + step-by-step Polish instructions for manual add
  via calendar.google.com → "Z adresu URL"

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

View File

@ -578,20 +578,33 @@
<span style="font-size:22px;">📅</span>
<span>Subskrybuj kalendarz</span>
</a>
<a href="https://calendar.google.com/calendar/r?cid=webcal://nordabiznes.pl/kalendarz/ical" target="_blank" id="subscribeGoogle" style="display:none; align-items:center; gap:10px; padding:12px 16px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:var(--radius); text-decoration:none; color:#1e40af; font-size:15px; font-weight:600;">
<span style="font-size:22px;">📅</span>
<span>Subskrybuj w Google Calendar</span>
</a>
<p id="subscribeGoogleNote" style="display:none; font-size:12px; color:#64748b; margin:4px 0 0 0; line-height:1.5;">
Otworzy Google Calendar w przeglądarce. Po dodaniu subskrypcji wydarzenia będą automatycznie synchronizowane z telefonem.
</p>
<div id="subscribeAndroid" style="display:none;">
<a href="https://calendar.google.com/calendar/r?cid=webcal://nordabiznes.pl/kalendarz/ical" target="_blank" style="display:flex; align-items:center; gap:10px; padding:12px 16px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:var(--radius); text-decoration:none; color:#1e40af; font-size:15px; font-weight:600; margin-bottom:8px;">
<span style="font-size:22px;">📅</span>
<span>Subskrybuj w Google Calendar</span>
</a>
<p style="font-size:12px; color:#64748b; margin:0 0 10px 0; line-height:1.5;">
Jeśli powyższy przycisk nie działa, skopiuj link i dodaj ręcznie:
</p>
<div style="display:flex; gap:8px; margin-bottom:8px;">
<input id="icalUrlAndroid" readonly value="https://nordabiznes.pl/kalendarz/ical" style="flex:1; padding:10px 12px; border:1px solid #d1d5db; border-radius:var(--radius); font-size:13px; background:#f9fafb;">
<button onclick="var i=document.getElementById('icalUrlAndroid');i.select();document.execCommand('copy');this.textContent='OK!';var b=this;setTimeout(function(){b.textContent='Kopiuj'},2000)" style="padding:10px 16px; background:#1d4ed8; color:white; border:none; border-radius:var(--radius); font-size:13px; cursor:pointer; font-weight:600; white-space:nowrap;">Kopiuj</button>
</div>
<div style="font-size:12px; color:#64748b; line-height:1.6; background:#f9fafb; padding:10px 12px; border-radius:var(--radius);">
<strong>Jak dodać na Androidzie:</strong><br>
1. Otwórz <strong>calendar.google.com</strong> w przeglądarce<br>
2. Kliknij <strong>+</strong> obok "Inne kalendarze"<br>
3. Wybierz <strong>"Z adresu URL"</strong><br>
4. Wklej skopiowany link i kliknij "Dodaj kalendarz"<br>
5. Wydarzenia pojawią się na telefonie automatycznie
</div>
</div>
<script>
var isIOS = /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent);
if (isIOS) {
document.getElementById('subscribeApple').style.display = 'flex';
} else {
document.getElementById('subscribeGoogle').style.display = 'flex';
document.getElementById('subscribeGoogleNote').style.display = 'block';
document.getElementById('subscribeAndroid').style.display = 'block';
}
</script>
</div>