Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions App/ProSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ struct ProSection: View {
} footer: {
Text(footer)
}
.sheet(isPresented: $showingTrial) { TrialSheet(store: store) }
.sheet(isPresented: $showingPaywall) { PaywallSheet(store: store, moment: nil) }
.sheet(isPresented: $showingTrial) { TrialSheet(store: store).modifier(AppearanceRoot(mode: model.appearance)) }
.sheet(isPresented: $showingPaywall) { PaywallSheet(store: store, moment: nil).modifier(AppearanceRoot(mode: model.appearance)) }
}

private var priceText: String {
Expand Down
14 changes: 9 additions & 5 deletions App/RecordScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ struct RecordScreen: View {
#if os(macOS)
.frame(minWidth: 440, minHeight: 360)
#endif
.modifier(AppearanceRoot(mode: model.appearance))
}
.alert(
"Name channel \(namingChannel ?? 0)",
Expand All @@ -70,11 +71,13 @@ struct RecordScreen: View {
} message: {
Text("The files take the name when the Take ends. Leave it empty to take the name off.")
}
.sheet(isPresented: $showingNewShow) { NewShowSheet(model: model) }
.sheet(isPresented: $showingShowList) { ShowListView(model: model) }
.sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model) }
.sheet(isPresented: $showingTrialOffer) { TrialSheet(store: model.pro) }
.sheet(item: $model.paywall) { request in PaywallSheet(store: model.pro, moment: request.moment) }
// Each sheet applies the Appearance itself: iOS presents a sheet on its own, and one that only inherits the
// window's look keeps the old one until it is shown again.
.sheet(isPresented: $showingNewShow) { NewShowSheet(model: model).modifier(AppearanceRoot(mode: model.appearance)) }
.sheet(isPresented: $showingShowList) { ShowListView(model: model).modifier(AppearanceRoot(mode: model.appearance)) }
.sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model).modifier(AppearanceRoot(mode: model.appearance)) }
.sheet(isPresented: $showingTrialOffer) { TrialSheet(store: model.pro).modifier(AppearanceRoot(mode: model.appearance)) }
.sheet(item: $model.paywall) { request in PaywallSheet(store: model.pro, moment: request.moment).modifier(AppearanceRoot(mode: model.appearance)) }
// The first-launch Trial offer: once, when the Pro price has loaded, and never during a Take.
.onChange(of: model.pro.proProduct?.displayPrice, initial: true) { _, price in
guard ProSection.isOffered, TrialOffer.shouldOffer(
Expand Down Expand Up @@ -121,6 +124,7 @@ struct RecordScreen: View {
}
}
.presentationDetents([.large])
.modifier(AppearanceRoot(mode: model.appearance))
}
#endif
.confirmationDialog("Stop recording?", isPresented: $model.confirmingStop, titleVisibility: .visible) {
Expand Down
2 changes: 1 addition & 1 deletion App/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ struct SettingsView: View {
if ProSection.isOffered, !locked(.pro) { ProSection(model: model) }
}
.formStyle(.grouped)
.sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model) }
.sheet(isPresented: $showingChannelNames) { ChannelNamesView(model: model).modifier(AppearanceRoot(mode: model.appearance)) }
.fileImporter(isPresented: $choosing, allowedContentTypes: [.folder]) { result in
if case .success(let url) = result { model.drive.choose(url) }
}
Expand Down
2 changes: 2 additions & 0 deletions App/ShowDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ struct ShowDetailView: View {
.task { await reload() }
.sheet(item: Binding(get: { deletingFile.map { FileID(take: $0.take, channel: $0.channel) } }, set: { deletingFile = $0.map { ($0.take, $0.channel) } })) { id in
DeleteShowSheet(model: model, show: show, take: id.take, channel: id.channel) { Task { await reload() } }
.modifier(AppearanceRoot(mode: model.appearance))
}
.sheet(item: Binding(get: { deletingTake.map { TakeID(number: $0) } }, set: { deletingTake = $0?.number })) { id in
DeleteShowSheet(model: model, show: show, take: id.number) { Task { await reload() } }
.modifier(AppearanceRoot(mode: model.appearance))
}
.alert("Save as Template", isPresented: $savingTemplate) {
TextField("Template name", text: $templateName)
Expand Down
1 change: 1 addition & 0 deletions App/ShowListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct ShowListView: View {
}
.sheet(item: $deleting) { show in
DeleteShowSheet(model: model, show: show) { Task { await reload() } }
.modifier(AppearanceRoot(mode: model.appearance))
}
#if os(macOS)
.frame(minWidth: 460, minHeight: 360)
Expand Down
Loading