fix: Monatsansicht-Layout bei Monatswechsel + Gruppenkalender in Sidebar
- Monatsmarker ("JUN") sitzt jetzt inline neben der Tageszahl ("1 JUN") statt
darüber -> einheitliche Zeilenhöhe; Termine der Woche rutschen nicht mehr
nach unten und überlappen nicht mehr mit "+X weitere".
- Gruppenkalender erscheint in "Meine Kalender" (mit 👥-Markierung) und kann
aus-/eingeblendet werden; Besitzer kann ihn umfärben. Recolor fremder
Kalender abgefangen (nur Besitzer). Version v36.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -672,6 +672,13 @@ function renderCalendarList() {
|
||||
name: cal.name, color: cal.color, enabled: cal.enabled,
|
||||
sourceLabel: `${t('shared_with_me')} · ${cal.shared_by || ''}`, remove: null });
|
||||
});
|
||||
// Group calendars (owned by the creator or reached via membership) — shown so
|
||||
// they can be toggled/recoloured; marked with the group emoji.
|
||||
state.localCalendars.filter(c => c.group).forEach(cal => {
|
||||
entries.push({ key: `local:${cal.id}`, source: 'local', dataId: `data-cal-id="${cal.id}"`,
|
||||
name: cal.name, color: cal.color, enabled: cal.enabled,
|
||||
sourceLabel: `${t('groups_title')} · ${cal.shared_by || ''}`, isGroupCal: true, remove: null });
|
||||
});
|
||||
state.icalSubscriptions.forEach(sub => {
|
||||
entries.push({ key: `ical:${sub.id}`, source: 'ical', dataId: `data-sub-id="${sub.id}"`,
|
||||
name: sub.name, color: sub.color, enabled: sub.enabled,
|
||||
@@ -714,6 +721,7 @@ function renderCalendarList() {
|
||||
<input type="checkbox" ${e.enabled ? 'checked' : ''} data-source="${e.source}" ${e.dataId} />
|
||||
<div class="cal-item-dot" style="background:${e.color}" data-source="${e.source}" ${e.dataId} title="${t('change_color')}"></div>
|
||||
<span class="cal-item-name" data-source="${e.source}">${escHtml(e.name)}</span>
|
||||
${e.isGroupCal ? `<span class="cal-shared-flag" title="${escHtml(e.sourceLabel)}">👥</span>` : ''}
|
||||
${e.groupVisible ? `<span class="cal-shared-flag" title="${t('group_visible_flag')}">👥</span>` : ''}
|
||||
${e.remove ? `<button class="icon-btn mini-btn cal-item-remove" data-source="${e.source}" ${e.dataId} title="${e.remove.title}">${e.remove.icon}</button>` : ''}
|
||||
</div>`
|
||||
@@ -794,6 +802,7 @@ function renderCalendarList() {
|
||||
} else if (source === 'local') {
|
||||
const calId = parseInt(dot.dataset.calId);
|
||||
const cal = state.localCalendars.find(c => c.id === calId);
|
||||
if (cal && cal.owned === false) { showToast(t('only_owner_color'), true); return; }
|
||||
const picked = await openColorPicker(dot, cal?.color || '#34a853');
|
||||
if (picked) {
|
||||
await api.put(`/local/calendars/${calId}`, { color: picked });
|
||||
|
||||
@@ -124,6 +124,7 @@ const translations = {
|
||||
group_icon: 'Icon',
|
||||
group_visible_flag: 'Für deine Gruppen sichtbar',
|
||||
group_new_event: '+ Gruppentermin',
|
||||
only_owner_color: 'Nur der Besitzer kann die Farbe ändern',
|
||||
upload_too_large: 'Datei zu groß (Server-Limit). Bitte Upload-Limit erhöhen.',
|
||||
shared_with_me: 'Mit dir geteilt',
|
||||
settings_calendars: 'Kalender',
|
||||
@@ -391,6 +392,7 @@ const translations = {
|
||||
group_icon: 'Icon',
|
||||
group_visible_flag: 'Visible to your groups',
|
||||
group_new_event: '+ Group event',
|
||||
only_owner_color: 'Only the owner can change the colour',
|
||||
upload_too_large: 'File too large (server limit). Please raise the upload limit.',
|
||||
shared_with_me: 'Shared with me',
|
||||
settings_calendars: 'Calendars',
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// Increment APP_VERSION with every code change
|
||||
export const APP_VERSION = 'v35';
|
||||
export const APP_VERSION = 'v36';
|
||||
|
||||
@@ -152,8 +152,8 @@ export function renderMonth(container, currentDate, events, onDayClick, onEventC
|
||||
? `<div class="month-marker">${monthsShort[cell.getMonth()]}</div>`
|
||||
: '';
|
||||
colsHtml += `<div class="month-col ${todayCls} ${otherCls} ${selectedCls} ${firstCls} ${dividerCls}" data-date="${key}">
|
||||
${monthLabel}
|
||||
<div class="cell-day ${numCls}">${cell.getDate()}</div>
|
||||
${monthLabel}
|
||||
</div>`;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user