From 8521a285202eb1f79eebc9db810f64932d43d482 Mon Sep 17 00:00:00 2001 From: Scarriffle Date: Mon, 1 Jun 2026 17:22:02 +0200 Subject: [PATCH] fix: visible Liquid Glass again, group icon on group events, week today colour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Liquid Glass: the calendar content now scrolls underneath a translucent safeAreaInset bar (real glass look restored) while the inline title stays reliable — toggling Liquid Glass is visibly different again. - Group events are prefixed with the group's own emoji icon (from group settings) instead of a generic people glyph, so they're recognisable. - Week view: today's column header now uses the configured "today" colour instead of the accent colour (matches the current-time line). Co-Authored-By: Claude Opus 4.8 --- Calendarr iOS/Models/CalendarStore.swift | 7 +++-- .../Views/Calendar/CalendarHostView.swift | 28 +++++++++++-------- Calendarr iOS/Views/Calendar/WeekView.swift | 2 +- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Calendarr iOS/Models/CalendarStore.swift b/Calendarr iOS/Models/CalendarStore.swift index 725cfd4..5647875 100644 --- a/Calendarr iOS/Models/CalendarStore.swift +++ b/Calendarr iOS/Models/CalendarStore.swift @@ -280,10 +280,13 @@ class CalendarStore { private func decorateGroupEvent(_ ev: CalEvent) -> CalEvent { var e = ev let me = UserDefaults.standard.integer(forKey: "userId") + // Use the group's own icon (set in group settings) so group events are + // recognisable; fall back to a generic people glyph. + let groupIcon = activeGroup?.icon ?? "👥" func first(_ s: String) -> String { s.split(separator: " ").first.map(String.init) ?? s } if ev.isGroupEvent { - if let c = ev.creator, c.id != me { e.title = "👥 \(first(c.displayName)): \(ev.title)" } - else { e.title = "👥 \(ev.title)" } + if let c = ev.creator, c.id != me { e.title = "\(groupIcon) \(first(c.displayName)): \(ev.title)" } + else { e.title = "\(groupIcon) \(ev.title)" } } else if let o = ev.owner, o.id != me { e.title = "\(first(o.displayName)): \(ev.title)" } diff --git a/Calendarr iOS/Views/Calendar/CalendarHostView.swift b/Calendarr iOS/Views/Calendar/CalendarHostView.swift index cb5f435..18ce9f1 100644 --- a/Calendarr iOS/Views/Calendar/CalendarHostView.swift +++ b/Calendarr iOS/Views/Calendar/CalendarHostView.swift @@ -101,18 +101,24 @@ struct CalendarHostView: View { // MARK: – Liquid Glass variant private var glassVariant: some View { - VStack(spacing: 0) { - glassTopBar - groupBanner - errorBanner - calendarContent - .frame(maxWidth: .infinity, maxHeight: .infinity) - .background(Color(hex: bgHex)) - .overlay(alignment: .top) { - loadingIndicator.padding(.top, 12) + // Floating glass bar via safeAreaInset: the calendar content scrolls + // *underneath* the translucent bar (the actual Liquid Glass look), while + // the title is a plain inline Text in the bar — which, unlike the + // NavigationStack toolbar title, refreshes reliably on month change. + calendarContent + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(Color(hex: bgHex)) + .overlay(alignment: .top) { + loadingIndicator.padding(.top, 12) + } + .animation(.easeInOut(duration: 0.2), value: store.isLoading || store.isCachingBackground) + .safeAreaInset(edge: .top, spacing: 0) { + VStack(spacing: 0) { + glassTopBar + groupBanner + errorBanner } - .animation(.easeInOut(duration: 0.2), value: store.isLoading || store.isCachingBackground) - } + } .overlay(alignment: .bottomTrailing) { glassFAB } .modifier(calendarSheets) .task { await startup() } diff --git a/Calendarr iOS/Views/Calendar/WeekView.swift b/Calendarr iOS/Views/Calendar/WeekView.swift index 55128f9..19c53e5 100644 --- a/Calendarr iOS/Views/Calendar/WeekView.swift +++ b/Calendarr iOS/Views/Calendar/WeekView.swift @@ -61,7 +61,7 @@ struct WeekView: View { ForEach(weekDays, id: \.self) { day in Text(headerFmt.string(from: day).uppercased()) .font(.system(size: 10, weight: .semibold)) - .foregroundStyle(cal.isDateInToday(day) ? Color.accentColor : Color(hex: textHex).opacity(secondaryTextOpacity(textContrast))) + .foregroundStyle(cal.isDateInToday(day) ? Color(hex: todayHex) : Color(hex: textHex).opacity(secondaryTextOpacity(textContrast))) .frame(maxWidth: .infinity, minHeight: 36) .overlay(alignment: .trailing) { Rectangle().fill(Color(hex: lineHex).opacity(gridLineOpacity(lineContrast))).frame(width: 0.5)