feat: Gruppentermin-Button in der Gruppenansicht + Banner in Akzentfarbe

- "+ Gruppentermin"-Button im Gruppenansicht-Banner: oeffnet den Editor mit
  dem Gruppenkalender vorausgewaehlt -> jeder kann direkt eintragen.
- Banner + aktive Gruppe nutzen jetzt die Akzentfarbe (color-mix, Fallback)
  statt Blau. Version v35.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-05-31 18:38:35 +02:00
parent 7429a309c3
commit fd7f7ddfe0
5 changed files with 22 additions and 4 deletions

View File

@@ -2293,6 +2293,16 @@ function renderGroupList() {
});
}
// Open the new-event editor preselected to the active group's shared calendar.
function openGroupEventModal() {
const g = state.groups.find(x => x.id === state.activeGroupId);
if (!g || !g.group_calendar_id) { showToast(t('groups_none'), true); return; }
openNewEventModal(state.selectedDate || state.currentDate);
const sel = document.getElementById('ev-calendar');
sel.value = `local-${g.group_calendar_id}`;
updatePrivateRow(false);
}
function enterGroupView(groupId) {
state.activeGroupId = groupId;
const g = state.groups.find(x => x.id === groupId);
@@ -2387,6 +2397,8 @@ function bindGroupUI() {
if (addBtn) addBtn.onclick = () => openGroupModal(null);
const exitBtn = document.getElementById('group-view-exit');
if (exitBtn) exitBtn.onclick = exitGroupView;
const newEvtBtn = document.getElementById('group-view-new-event');
if (newEvtBtn) newEvtBtn.onclick = openGroupEventModal;
document.getElementById('group-save').onclick = async () => {
const modal = document.getElementById('modal-group');