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:
Scarriffle
2026-05-31 18:45:49 +02:00
parent fd7f7ddfe0
commit b0f1497bc8
6 changed files with 23 additions and 11 deletions

View File

@@ -593,10 +593,10 @@ a { color: var(--primary); text-decoration: none; }
}
.month-col.first-of-month {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0;
padding-top: 8px;
flex-direction: row; /* "1 JUN" inline — keeps the header height uniform */
align-items: center;
gap: 6px;
padding-top: 4px;
}
/* Dividers via pseudo-elements so they render above events (z-index 2) */
.month-col.month-divider-left::before {
@@ -647,8 +647,8 @@ a { color: var(--primary); text-decoration: none; }
letter-spacing: .5px;
color: var(--month-label-color, #7090c0);
line-height: 1;
padding: 0 2px;
margin: 0 0 2px 4px;
padding: 0;
margin: 0;
position: relative;
z-index: 3; /* above events overlay (z-index 2) */
}
@@ -657,10 +657,10 @@ a { color: var(--primary); text-decoration: none; }
position: relative;
z-index: 3;
}
/* Push events overlay down when row contains a first-of-month cell so the
day "1" (which sits below the month marker) isn't hidden by event bars */
/* Month marker now sits inline next to the day number, so the header height is
uniform and the events overlay needs no extra offset for month-start weeks. */
.month-row.has-month-marker .month-events-overlay {
top: 56px;
top: 30px;
}
/* Events overlay — pointer-events:none so clicks pass to columns */
.month-events-overlay {

View File

@@ -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 });

View File

@@ -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',

View File

@@ -1,2 +1,2 @@
// Increment APP_VERSION with every code change
export const APP_VERSION = 'v35';
export const APP_VERSION = 'v36';

View File

@@ -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>`;
});