Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
6c524ba855
commit
49f3fb90a9
@ -83,6 +83,11 @@ struct HistoryView: View {
|
||||
var body: some View {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(alignment: .leading, spacing: Design.Spacing.large) {
|
||||
if horizontalSizeClass == .regular {
|
||||
Text(String(localized: "History")).styled(.heroBold)
|
||||
.padding(.bottom, Design.Spacing.small)
|
||||
}
|
||||
|
||||
// Ritual filter picker
|
||||
ritualPicker
|
||||
|
||||
@ -106,6 +111,7 @@ struct HistoryView: View {
|
||||
.id(refreshToken)
|
||||
}
|
||||
.padding(Design.Spacing.large)
|
||||
.adaptiveContentWidth()
|
||||
}
|
||||
.background(LinearGradient(
|
||||
colors: [AppSurface.primary, AppSurface.secondary],
|
||||
@ -113,7 +119,7 @@ struct HistoryView: View {
|
||||
endPoint: .bottomTrailing
|
||||
))
|
||||
.navigationTitle(String(localized: "History"))
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.navigationBarTitleDisplayMode(horizontalSizeClass == .regular ? .inline : .large)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
if hasMoreHistory || monthsToShow > baseMonthsToShow {
|
||||
|
||||
@ -4,6 +4,7 @@ import UniformTypeIdentifiers
|
||||
|
||||
struct InsightsView: View {
|
||||
@Bindable var store: RitualStore
|
||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
||||
@State private var refreshToken = UUID()
|
||||
@State private var isEditing = false
|
||||
@State private var draggingCard: InsightCardType?
|
||||
@ -29,6 +30,11 @@ struct InsightsView: View {
|
||||
NavigationStack {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(alignment: .leading, spacing: Design.Spacing.large) {
|
||||
if horizontalSizeClass == .regular {
|
||||
Text(String(localized: "Insights")).styled(.heroBold)
|
||||
.padding(.bottom, Design.Spacing.small)
|
||||
}
|
||||
|
||||
// Grid with drag-and-drop support in edit mode
|
||||
LazyVGrid(columns: columns, spacing: Design.Spacing.medium) {
|
||||
ForEach(orderedCards) { card in
|
||||
@ -44,6 +50,7 @@ struct InsightsView: View {
|
||||
}
|
||||
}
|
||||
.padding(Design.Spacing.large)
|
||||
.adaptiveContentWidth()
|
||||
}
|
||||
.background(LinearGradient(
|
||||
colors: [AppSurface.primary, AppSurface.secondary],
|
||||
@ -51,7 +58,7 @@ struct InsightsView: View {
|
||||
endPoint: .bottomTrailing
|
||||
))
|
||||
.navigationTitle(String(localized: "Insights"))
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.navigationBarTitleDisplayMode(horizontalSizeClass == .regular ? .inline : .large)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
Button {
|
||||
|
||||
@ -37,6 +37,11 @@ struct RitualsView: View {
|
||||
var body: some View {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(alignment: .leading, spacing: Design.Spacing.large) {
|
||||
if horizontalSizeClass == .regular {
|
||||
Text(String(localized: "Rituals")).styled(.heroBold)
|
||||
.padding(.bottom, Design.Spacing.small)
|
||||
}
|
||||
|
||||
// Segmented picker
|
||||
Picker(String(localized: "View"), selection: $selectedTab) {
|
||||
ForEach(RitualsTab.allCases, id: \.self) { tab in
|
||||
@ -63,7 +68,7 @@ struct RitualsView: View {
|
||||
endPoint: .bottomTrailing
|
||||
))
|
||||
.navigationTitle(String(localized: "Rituals"))
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.navigationBarTitleDisplayMode(horizontalSizeClass == .regular ? .inline : .large)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
Menu {
|
||||
|
||||
@ -3,6 +3,7 @@ import Bedrock
|
||||
|
||||
struct SettingsView: View {
|
||||
@Bindable var store: SettingsStore
|
||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
||||
var ritualStore: RitualStore?
|
||||
var categoryStore: CategoryStore?
|
||||
|
||||
@ -168,8 +169,8 @@ struct SettingsView: View {
|
||||
|
||||
Spacer(minLength: Design.Spacing.xxxLarge)
|
||||
}
|
||||
.padding(.horizontal, Design.Spacing.large)
|
||||
.adaptiveContentWidth(maxWidth: Design.Size.maxContentWidthPortrait)
|
||||
.padding(Design.Spacing.large)
|
||||
.adaptiveContentWidth()
|
||||
}
|
||||
.onAppear {
|
||||
store.refresh()
|
||||
@ -180,7 +181,7 @@ struct SettingsView: View {
|
||||
}
|
||||
.background(AppSurface.primary)
|
||||
.navigationTitle(String(localized: "Settings"))
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.navigationBarTitleDisplayMode(horizontalSizeClass == .regular ? .inline : .large)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,6 +39,11 @@ struct TodayView: View {
|
||||
var body: some View {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
VStack(alignment: .leading, spacing: Design.Spacing.large) {
|
||||
if horizontalSizeClass == .regular {
|
||||
TodayHeaderView(dateText: store.todayDisplayString)
|
||||
.padding(.bottom, Design.Spacing.small)
|
||||
}
|
||||
|
||||
if todayRituals.isEmpty {
|
||||
if hasRitualsButNotNow {
|
||||
// Has active rituals but none for current time of day
|
||||
@ -75,7 +80,7 @@ struct TodayView: View {
|
||||
endPoint: .bottomTrailing
|
||||
))
|
||||
.navigationTitle(String(localized: "Today"))
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.navigationBarTitleDisplayMode(horizontalSizeClass == .regular ? .inline : .large)
|
||||
.sheet(isPresented: .init(
|
||||
get: { showRenewalSheet },
|
||||
set: { if !$0 { store.dismissRenewalPrompt() } }
|
||||
|
||||
@ -33,7 +33,6 @@ struct LargeWidgetView: View {
|
||||
.background(AppTextColors.primary.opacity(0.2))
|
||||
|
||||
if entry.nextHabits.isEmpty {
|
||||
Spacer()
|
||||
WidgetEmptyStateView(
|
||||
iconSize: .section,
|
||||
title: String(localized: "No rituals scheduled for \(entry.currentTimeOfDay.lowercased())."),
|
||||
@ -43,7 +42,6 @@ struct LargeWidgetView: View {
|
||||
nextRitual: entry.nextRitualInfo,
|
||||
isCompact: false
|
||||
)
|
||||
Spacer()
|
||||
} else {
|
||||
Text(String(localized: "Habits"))
|
||||
.styled(.captionEmphasis, emphasis: .custom(AppTextColors.secondary))
|
||||
Loading…
Reference in New Issue
Block a user