Give share recipients a bell in the web UI
Calendars reached through a share or a group showed a dash instead of a reminder toggle, in both the sidebar and the settings table, because the calendar-wide PUT refused a recipient. They now use the dedicated reminders endpoint, which stores the recipient's own choice, so the toggle is theirs to make. The comment claiming member-reached group calendars "can't (no PUT)" was true and is no longer. The settings table also had its tooltips and the Notifications column header wired in German while the sidebar next to it went through t(). Moved to a translation key, added for all ten languages. The remaining headers in that table are still hardcoded — untouched here, it is a separate job. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
2bdf134d9c
commit
93297319a3
+17
-8
@@ -830,16 +830,18 @@ function renderCalendarList() {
|
|||||||
entries.push({ key: `local:${cal.id}`, source: 'local', dataId: `data-cal-id="${cal.id}"`,
|
entries.push({ key: `local:${cal.id}`, source: 'local', dataId: `data-cal-id="${cal.id}"`,
|
||||||
name: cal.shared_by || cal.name, color: cal.color, enabled: !hiddenLocal.has(cal.id), readOnly,
|
name: cal.shared_by || cal.name, color: cal.color, enabled: !hiddenLocal.has(cal.id), readOnly,
|
||||||
sourceLabel: `${t('shared_with_me')} · ${cal.name}${readOnly ? ' · ' + t('perm_read') : ''}`,
|
sourceLabel: `${t('shared_with_me')} · ${cal.name}${readOnly ? ' · ' + t('perm_read') : ''}`,
|
||||||
|
reminders: true, remindersEnabled: cal.reminders_enabled !== false,
|
||||||
remove: { icon: EYE_OFF, title: t('hide_cal') } });
|
remove: { icon: EYE_OFF, title: t('hide_cal') } });
|
||||||
});
|
});
|
||||||
// Group calendars (owned by the creator or reached via membership) — shown so
|
// Group calendars (owned by the creator or reached via membership) — shown so
|
||||||
// they can be toggled/recoloured. Owned group calendars can also be muted
|
// they can be toggled, recoloured and muted. Muting is per user: the creator
|
||||||
// (reminders), which the server then syncs; member-reached ones can't (no PUT).
|
// owns the calendar, and silencing it for themselves must not silence the
|
||||||
|
// whole group.
|
||||||
state.localCalendars.filter(c => c.group).forEach(cal => {
|
state.localCalendars.filter(c => c.group).forEach(cal => {
|
||||||
entries.push({ key: `local:${cal.id}`, source: 'local', dataId: `data-cal-id="${cal.id}"`,
|
entries.push({ key: `local:${cal.id}`, source: 'local', dataId: `data-cal-id="${cal.id}"`,
|
||||||
name: cal.name, color: cal.color,
|
name: cal.name, color: cal.color,
|
||||||
enabled: cal.owned !== false ? cal.enabled : !hiddenLocal.has(cal.id),
|
enabled: cal.owned !== false ? cal.enabled : !hiddenLocal.has(cal.id),
|
||||||
reminders: cal.owned !== false, remindersEnabled: cal.reminders_enabled !== false,
|
reminders: true, remindersEnabled: cal.reminders_enabled !== false,
|
||||||
sourceLabel: `${t('groups_title')} · ${cal.shared_by || ''}`,
|
sourceLabel: `${t('groups_title')} · ${cal.shared_by || ''}`,
|
||||||
isGroupCal: true, groupIcon: groupIconForLocalCal(cal.id), remove: null });
|
isGroupCal: true, groupIcon: groupIconForLocalCal(cal.id), remove: null });
|
||||||
});
|
});
|
||||||
@@ -984,7 +986,11 @@ function renderCalendarList() {
|
|||||||
}
|
}
|
||||||
if (!cal) return;
|
if (!cal) return;
|
||||||
const newVal = cal.reminders_enabled === false; // toggle
|
const newVal = cal.reminders_enabled === false; // toggle
|
||||||
const path = source === 'ical'
|
// local has a dedicated endpoint so share recipients can mute for
|
||||||
|
// themselves; the others still take the calendar-wide PUT.
|
||||||
|
const path = source === 'local'
|
||||||
|
? `/local/calendars/${id}/reminders`
|
||||||
|
: source === 'ical'
|
||||||
? `/ical/subscriptions/${id}`
|
? `/ical/subscriptions/${id}`
|
||||||
: `/${source}/calendars/${id}`;
|
: `/${source}/calendars/${id}`;
|
||||||
try {
|
try {
|
||||||
@@ -4432,7 +4438,7 @@ function renderCalendarTable() {
|
|||||||
const hid = (src, id, isVisible) =>
|
const hid = (src, id, isVisible) =>
|
||||||
`<button class="icon-btn mini-btn ct-eye" data-ct-hid="${src}" data-ct-id="${id}" data-ct-visible="${isVisible ? '1' : '0'}" title="${isVisible ? 'Ausblenden' : 'Anzeigen'}">${isVisible ? EYE_ON : EYE_OFF}</button>`;
|
`<button class="icon-btn mini-btn ct-eye" data-ct-hid="${src}" data-ct-id="${id}" data-ct-visible="${isVisible ? '1' : '0'}" title="${isVisible ? 'Ausblenden' : 'Anzeigen'}">${isVisible ? EYE_ON : EYE_OFF}</button>`;
|
||||||
const rem = (src, id, on) =>
|
const rem = (src, id, on) =>
|
||||||
`<button class="icon-btn mini-btn ct-bell" data-ct-rem="${src}" data-ct-id="${id}" data-ct-on="${on ? '1' : '0'}" title="${on ? 'Benachrichtigungen aus' : 'Benachrichtigungen an'}">${on ? BELL_ON : BELL_OFF}</button>`;
|
`<button class="icon-btn mini-btn ct-bell" data-ct-rem="${src}" data-ct-id="${id}" data-ct-on="${on ? '1' : '0'}" title="${on ? t('calendar_reminders_on') : t('calendar_reminders_off')}">${on ? BELL_ON : BELL_OFF}</button>`;
|
||||||
const dot = (color, fb) =>
|
const dot = (color, fb) =>
|
||||||
`<span class="ct-dot" style="background:${color || fb}"></span>`;
|
`<span class="ct-dot" style="background:${color || fb}"></span>`;
|
||||||
|
|
||||||
@@ -4565,7 +4571,8 @@ function renderCalendarTable() {
|
|||||||
rows += `<tr>
|
rows += `<tr>
|
||||||
<td>${dot(cal.color, '#34a853')}${escHtml(cal.shared_by || cal.name)}</td>
|
<td>${dot(cal.color, '#34a853')}${escHtml(cal.shared_by || cal.name)}</td>
|
||||||
<td class="ct-src">${escHtml(cal.name)} <span class="cal-badge">${readOnly ? t('perm_read') : t('perm_read_write')}</span></td>
|
<td class="ct-src">${escHtml(cal.name)} <span class="cal-badge">${readOnly ? t('perm_read') : t('perm_read_write')}</span></td>
|
||||||
<td>${hid('shared', cal.id, !sharedHidden.has(cal.id))}</td><td>—</td><td>—</td><td>—</td><td>—</td>
|
<td>${hid('shared', cal.id, !sharedHidden.has(cal.id))}</td>
|
||||||
|
<td>${rem('local', cal.id, cal.reminders_enabled !== false)}</td><td>—</td><td>—</td><td>—</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
rowCount++;
|
rowCount++;
|
||||||
}
|
}
|
||||||
@@ -4577,7 +4584,7 @@ function renderCalendarTable() {
|
|||||||
|
|
||||||
container.innerHTML = `<table class="cal-manage-table">
|
container.innerHTML = `<table class="cal-manage-table">
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<th>Name</th><th>Herkunft</th><th>Sichtbar</th><th>Benachrichtigungen</th><th>Export / Import</th><th>Sync</th><th></th>
|
<th>Name</th><th>Herkunft</th><th>Sichtbar</th><th>${t('calendar_reminders_col')}</th><th>Export / Import</th><th>Sync</th><th></th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>${rows}</tbody>
|
<tbody>${rows}</tbody>
|
||||||
</table>`;
|
</table>`;
|
||||||
@@ -4622,7 +4629,9 @@ function renderCalendarTable() {
|
|||||||
btn.addEventListener('click', async () => {
|
btn.addEventListener('click', async () => {
|
||||||
const src = btn.dataset.ctRem, id = parseInt(btn.dataset.ctId);
|
const src = btn.dataset.ctRem, id = parseInt(btn.dataset.ctId);
|
||||||
const enabled = btn.dataset.ctOn !== '1'; // currently on → turn off, currently off → turn on
|
const enabled = btn.dataset.ctOn !== '1'; // currently on → turn off, currently off → turn on
|
||||||
const path = src === 'ical' ? `/ical/subscriptions/${id}` : `/${src === 'ha' ? 'homeassistant' : src}/calendars/${id}`;
|
const path = src === 'local' ? `/local/calendars/${id}/reminders`
|
||||||
|
: src === 'ical' ? `/ical/subscriptions/${id}`
|
||||||
|
: `/${src === 'ha' ? 'homeassistant' : src}/calendars/${id}`;
|
||||||
try {
|
try {
|
||||||
await api.put(path, { reminders_enabled: enabled });
|
await api.put(path, { reminders_enabled: enabled });
|
||||||
if (src === 'local') { const c = state.localCalendars.find(c => c.id === id); if (c) c.reminders_enabled = enabled; }
|
if (src === 'local') { const c = state.localCalendars.find(c => c.id === id); if (c) c.reminders_enabled = enabled; }
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Für diesen Kalender sind Benachrichtigungen deaktiviert – Erinnerungen werden nicht ausgeführt.',
|
reminders_calendar_off: 'Für diesen Kalender sind Benachrichtigungen deaktiviert – Erinnerungen werden nicht ausgeführt.',
|
||||||
calendar_reminders_on: 'Benachrichtigungen aktiviert',
|
calendar_reminders_on: 'Benachrichtigungen aktiviert',
|
||||||
calendar_reminders_off: 'Benachrichtigungen deaktiviert',
|
calendar_reminders_off: 'Benachrichtigungen deaktiviert',
|
||||||
|
calendar_reminders_col: 'Benachrichtigungen',
|
||||||
copy: 'Kopieren',
|
copy: 'Kopieren',
|
||||||
caldav_publish: 'CalDAV veröffentlichen',
|
caldav_publish: 'CalDAV veröffentlichen',
|
||||||
caldav_unpublish: 'CalDAV deaktivieren',
|
caldav_unpublish: 'CalDAV deaktivieren',
|
||||||
@@ -596,6 +597,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Für dä Kalender sind Benachrichtigunge deaktiviert – Erinnerige werded nöd usgfüert.',
|
reminders_calendar_off: 'Für dä Kalender sind Benachrichtigunge deaktiviert – Erinnerige werded nöd usgfüert.',
|
||||||
calendar_reminders_on: 'Benachrichtigunge aktiviert',
|
calendar_reminders_on: 'Benachrichtigunge aktiviert',
|
||||||
calendar_reminders_off: 'Benachrichtigunge deaktiviert',
|
calendar_reminders_off: 'Benachrichtigunge deaktiviert',
|
||||||
|
calendar_reminders_col: 'Benachrichtigunge',
|
||||||
copy: 'Kopierä',
|
copy: 'Kopierä',
|
||||||
caldav_publish: 'CalDAV veröffentlichä',
|
caldav_publish: 'CalDAV veröffentlichä',
|
||||||
caldav_unpublish: 'CalDAV deaktivierä',
|
caldav_unpublish: 'CalDAV deaktivierä',
|
||||||
@@ -1028,6 +1030,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Reminders are disabled for this calendar – they will not fire.',
|
reminders_calendar_off: 'Reminders are disabled for this calendar – they will not fire.',
|
||||||
calendar_reminders_on: 'Reminders enabled',
|
calendar_reminders_on: 'Reminders enabled',
|
||||||
calendar_reminders_off: 'Reminders disabled',
|
calendar_reminders_off: 'Reminders disabled',
|
||||||
|
calendar_reminders_col: 'Notifications',
|
||||||
copy: 'Copy',
|
copy: 'Copy',
|
||||||
caldav_publish: 'Publish via CalDAV',
|
caldav_publish: 'Publish via CalDAV',
|
||||||
caldav_unpublish: 'Unpublish CalDAV',
|
caldav_unpublish: 'Unpublish CalDAV',
|
||||||
@@ -1422,6 +1425,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Les rappels sont désactivés pour cet agenda – ils ne se déclencheront pas.',
|
reminders_calendar_off: 'Les rappels sont désactivés pour cet agenda – ils ne se déclencheront pas.',
|
||||||
calendar_reminders_on: 'Rappels activés',
|
calendar_reminders_on: 'Rappels activés',
|
||||||
calendar_reminders_off: 'Rappels désactivés',
|
calendar_reminders_off: 'Rappels désactivés',
|
||||||
|
calendar_reminders_col: 'Notifications',
|
||||||
copy: 'Copier',
|
copy: 'Copier',
|
||||||
caldav_publish: 'Publier via CalDAV',
|
caldav_publish: 'Publier via CalDAV',
|
||||||
caldav_unpublish: 'Dépublier CalDAV',
|
caldav_unpublish: 'Dépublier CalDAV',
|
||||||
@@ -1816,6 +1820,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'I promemoria sono disattivati per questo calendario – non verranno attivati.',
|
reminders_calendar_off: 'I promemoria sono disattivati per questo calendario – non verranno attivati.',
|
||||||
calendar_reminders_on: 'Promemoria attivati',
|
calendar_reminders_on: 'Promemoria attivati',
|
||||||
calendar_reminders_off: 'Promemoria disattivati',
|
calendar_reminders_off: 'Promemoria disattivati',
|
||||||
|
calendar_reminders_col: 'Notifiche',
|
||||||
copy: 'Copia',
|
copy: 'Copia',
|
||||||
caldav_publish: 'Pubblica via CalDAV',
|
caldav_publish: 'Pubblica via CalDAV',
|
||||||
caldav_unpublish: 'Annulla pubblicazione CalDAV',
|
caldav_unpublish: 'Annulla pubblicazione CalDAV',
|
||||||
@@ -2210,6 +2215,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Herinneringen zijn uitgeschakeld voor deze agenda – ze worden niet geactiveerd.',
|
reminders_calendar_off: 'Herinneringen zijn uitgeschakeld voor deze agenda – ze worden niet geactiveerd.',
|
||||||
calendar_reminders_on: 'Herinneringen ingeschakeld',
|
calendar_reminders_on: 'Herinneringen ingeschakeld',
|
||||||
calendar_reminders_off: 'Herinneringen uitgeschakeld',
|
calendar_reminders_off: 'Herinneringen uitgeschakeld',
|
||||||
|
calendar_reminders_col: 'Meldingen',
|
||||||
copy: 'Kopiëren',
|
copy: 'Kopiëren',
|
||||||
caldav_publish: 'Publiceren via CalDAV',
|
caldav_publish: 'Publiceren via CalDAV',
|
||||||
caldav_unpublish: 'CalDAV-publicatie stoppen',
|
caldav_unpublish: 'CalDAV-publicatie stoppen',
|
||||||
@@ -2604,6 +2610,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Påmindelser er slået fra for denne kalender – de bliver ikke udløst.',
|
reminders_calendar_off: 'Påmindelser er slået fra for denne kalender – de bliver ikke udløst.',
|
||||||
calendar_reminders_on: 'Påmindelser slået til',
|
calendar_reminders_on: 'Påmindelser slået til',
|
||||||
calendar_reminders_off: 'Påmindelser slået fra',
|
calendar_reminders_off: 'Påmindelser slået fra',
|
||||||
|
calendar_reminders_col: 'Notifikationer',
|
||||||
copy: 'Kopiér',
|
copy: 'Kopiér',
|
||||||
caldav_publish: 'Udgiv via CalDAV',
|
caldav_publish: 'Udgiv via CalDAV',
|
||||||
caldav_unpublish: 'Stop CalDAV-udgivelse',
|
caldav_unpublish: 'Stop CalDAV-udgivelse',
|
||||||
@@ -2998,6 +3005,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Påminnelser er slått av for denne kalenderen – de blir ikke utløst.',
|
reminders_calendar_off: 'Påminnelser er slått av for denne kalenderen – de blir ikke utløst.',
|
||||||
calendar_reminders_on: 'Påminnelser slått på',
|
calendar_reminders_on: 'Påminnelser slått på',
|
||||||
calendar_reminders_off: 'Påminnelser slått av',
|
calendar_reminders_off: 'Påminnelser slått av',
|
||||||
|
calendar_reminders_col: 'Varsler',
|
||||||
copy: 'Kopier',
|
copy: 'Kopier',
|
||||||
caldav_publish: 'Publiser via CalDAV',
|
caldav_publish: 'Publiser via CalDAV',
|
||||||
caldav_unpublish: 'Stopp CalDAV-publisering',
|
caldav_unpublish: 'Stopp CalDAV-publisering',
|
||||||
@@ -3392,6 +3400,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Påminnelser är avstängda för den här kalendern – de kommer inte att utlösas.',
|
reminders_calendar_off: 'Påminnelser är avstängda för den här kalendern – de kommer inte att utlösas.',
|
||||||
calendar_reminders_on: 'Påminnelser aktiverade',
|
calendar_reminders_on: 'Påminnelser aktiverade',
|
||||||
calendar_reminders_off: 'Påminnelser avstängda',
|
calendar_reminders_off: 'Påminnelser avstängda',
|
||||||
|
calendar_reminders_col: 'Aviseringar',
|
||||||
copy: 'Kopiera',
|
copy: 'Kopiera',
|
||||||
caldav_publish: 'Publicera via CalDAV',
|
caldav_publish: 'Publicera via CalDAV',
|
||||||
caldav_unpublish: 'Sluta publicera via CalDAV',
|
caldav_unpublish: 'Sluta publicera via CalDAV',
|
||||||
@@ -3786,6 +3795,7 @@ const translations = {
|
|||||||
reminders_calendar_off: 'Muistutukset on poistettu käytöstä tässä kalenterissa – niitä ei laukaista.',
|
reminders_calendar_off: 'Muistutukset on poistettu käytöstä tässä kalenterissa – niitä ei laukaista.',
|
||||||
calendar_reminders_on: 'Muistutukset käytössä',
|
calendar_reminders_on: 'Muistutukset käytössä',
|
||||||
calendar_reminders_off: 'Muistutukset pois käytöstä',
|
calendar_reminders_off: 'Muistutukset pois käytöstä',
|
||||||
|
calendar_reminders_col: 'Ilmoitukset',
|
||||||
copy: 'Kopioi',
|
copy: 'Kopioi',
|
||||||
caldav_publish: 'Julkaise CalDAV:n kautta',
|
caldav_publish: 'Julkaise CalDAV:n kautta',
|
||||||
caldav_unpublish: 'Lopeta CalDAV-julkaisu',
|
caldav_unpublish: 'Lopeta CalDAV-julkaisu',
|
||||||
|
|||||||
Reference in New Issue
Block a user