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
32 changes: 26 additions & 6 deletions ios/OpenNOWiOS/OpenNOWiOS/BrowseView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct BrowseView: View {
}
}
.navigationTitle("Browse")
.toolbarBackground(.ultraThinMaterial, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.searchable(
text: $store.searchText,
placement: .navigationBarDrawer(displayMode: .automatic),
Expand Down Expand Up @@ -107,12 +109,30 @@ private struct FilterChip: View {

var body: some View {
Button(action: action) {
Text(label)
.font(.caption.weight(.semibold))
.padding(.horizontal, 14)
.padding(.vertical, 7)
.foregroundStyle(isSelected ? .white : .primary)
.background(isSelected ? brandAccent : Color(.systemFill), in: Capsule())
if #available(iOS 26, *) {
Text(label)
.font(.caption.weight(.semibold))
.padding(.horizontal, 14)
.padding(.vertical, 7)
.foregroundStyle(isSelected ? brandAccent : .primary)
.background {
if isSelected {
Capsule()
.fill(.regularMaterial)
.glassEffect(in: Capsule())
.overlay(Capsule().stroke(brandAccent.opacity(0.5), lineWidth: 1))
} else {
Capsule().fill(Color(.systemFill))
}
}
} else {
Text(label)
.font(.caption.weight(.semibold))
.padding(.horizontal, 14)
.padding(.vertical, 7)
.foregroundStyle(isSelected ? .white : .primary)
.background(Capsule().fill(isSelected ? brandAccent : Color(.systemFill)))
}
}
.buttonStyle(.plain)
.animation(.easeOut(duration: 0.15), value: isSelected)
Expand Down
11 changes: 11 additions & 0 deletions ios/OpenNOWiOS/OpenNOWiOS/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ struct MainTabView: View {
.tabItem { Label("Settings", systemImage: "slider.horizontal.3") }
}
.tint(brandAccent)
.toolbarBackground(.ultraThinMaterial, for: .tabBar)
.toolbarBackground(.visible, for: .tabBar)
.fullScreenCover(isPresented: $store.queueOverlayVisible.transaction({
var t = Transaction()
t.animation = t.animation?.delay(0.15)
Expand Down Expand Up @@ -200,6 +202,15 @@ let brandGradient = LinearGradient(
var appBackground: some View {
ZStack {
Color(.systemBackground)
LinearGradient(
colors: [
Color(red: 0.46, green: 0.72, blue: 0.0).opacity(0.04),
Color.clear,
Color(red: 0.0, green: 0.72, blue: 0.55).opacity(0.03)
],
startPoint: .topLeading,
endPoint: .bottomTrailing
)
}
.ignoresSafeArea()
}
Expand Down
4 changes: 3 additions & 1 deletion ios/OpenNOWiOS/OpenNOWiOS/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ struct HomeView: View {
}
.refreshable { await store.refreshCatalog() }
.navigationTitle("OpenNOW")
.toolbarBackground(.ultraThinMaterial, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
if store.isLoadingGames {
Expand Down Expand Up @@ -379,7 +381,7 @@ struct GlassCardModifier: ViewModifier {
} else {
content
.background(.regularMaterial, in: RoundedRectangle(cornerRadius: 16))
.shadow(color: .black.opacity(0.08), radius: 4, y: 2)
.shadow(color: .black.opacity(0.07), radius: 8, y: 2)
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions ios/OpenNOWiOS/OpenNOWiOS/LibraryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ struct LibraryView: View {
}
}
.navigationTitle("Library")
.toolbarBackground(.ultraThinMaterial, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
}
.printedWasteLaunchSheet(pendingGame: $pendingLaunchGame)
}
Expand Down
5 changes: 4 additions & 1 deletion ios/OpenNOWiOS/OpenNOWiOS/OpenNOWStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,9 @@ final class OpenNOWStore: ObservableObject {

func dismissStreamer() {
streamSession = nil
if activeSession != nil {
startSessionTasks()
}
}

func reopenStreamer() {
Expand Down Expand Up @@ -1734,7 +1737,7 @@ final class OpenNOWStore: ObservableObject {
}
}

private func startSessionTasks() {
fileprivate func startSessionTasks() {
telemetryTask?.cancel()
sessionPollTask?.cancel()
endSessionPollBackgroundTask()
Expand Down
16 changes: 14 additions & 2 deletions ios/OpenNOWiOS/OpenNOWiOS/SessionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ struct SessionView: View {
.padding(.vertical, 8)
}
.navigationTitle("Session")
.toolbarBackground(.ultraThinMaterial, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button {
Expand Down Expand Up @@ -202,9 +204,19 @@ struct SessionView: View {
.frame(maxWidth: .infinity)
.padding(.vertical, 14)
.font(.headline)
.foregroundStyle(.white)
}
.buttonStyle(.plain)
.background {
if #available(iOS 26, *) {
RoundedRectangle(cornerRadius: 14)
.fill(.red.opacity(0.7))
.glassEffect(in: RoundedRectangle(cornerRadius: 14))
} else {
RoundedRectangle(cornerRadius: 14)
.fill(.red.opacity(0.85))
}
}
.buttonStyle(.bordered)
.tint(.red)
}

private var noSessionState: some View {
Expand Down
26 changes: 25 additions & 1 deletion ios/OpenNOWiOS/OpenNOWiOS/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ struct SettingsView: View {
Spacer()
Toggle("", isOn: $store.settings.keepMicEnabled)
}
.listRowBackground(glassListRowBackground)
HStack {
Label("Stats Overlay", systemImage: "chart.bar.fill")
Spacer()
Toggle("", isOn: $store.settings.showStatsOverlay)
}
.listRowBackground(glassListRowBackground)
} header: {
Label("Experience", systemImage: "star.fill")
}
Expand All @@ -66,41 +68,51 @@ struct SettingsView: View {
Label("Reload Catalog", systemImage: "arrow.clockwise")
}
.disabled(store.isLoadingGames)
.listRowBackground(glassListRowBackground)
} header: {
Label("Data", systemImage: "internaldrive.fill")
}

if let user = store.user {
Section {
LabeledContent("Account", value: user.displayName)
.listRowBackground(glassListRowBackground)
if let email = user.email {
LabeledContent("Email", value: email)
.listRowBackground(glassListRowBackground)
}
LabeledContent("Tier", value: user.membershipTier)
.listRowBackground(glassListRowBackground)

Button(role: .destructive) {
store.signOut()
} label: {
Label("Sign Out", systemImage: "rectangle.portrait.and.arrow.right")
}
.listRowBackground(glassListRowBackground)
} header: {
Label("Account", systemImage: "person.crop.circle")
}
}

Section {
LabeledContent("Version", value: "1.0")
.listRowBackground(glassListRowBackground)
LabeledContent("Platform", value: "iOS")
.listRowBackground(glassListRowBackground)
Link(destination: URL(string: "https://github.com/OpenCloudGaming/OpenNOW")!) {
Label("GitHub Repository", systemImage: "link")
}
.listRowBackground(glassListRowBackground)
} header: {
Label("About", systemImage: "info.circle")
}
}
.navigationTitle("Settings")
.scrollContentBackground(.hidden)
.background(appBackground)
.toolbarBackground(.ultraThinMaterial, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.onChange(of: store.settings) { _, _ in
store.persistSettings()
}
Expand All @@ -126,6 +138,18 @@ struct SettingsView: View {
.pickerStyle(.menu)
.tint(.primary)
}
.listRowBackground(Color(.secondarySystemGroupedBackground).opacity(0.75))
.listRowBackground(glassListRowBackground)
}

private var glassListRowBackground: some View {
Group {
if #available(iOS 26, *) {
RoundedRectangle(cornerRadius: 10)
.fill(.regularMaterial)
.glassEffect(in: RoundedRectangle(cornerRadius: 10))
} else {
Color(.secondarySystemGroupedBackground).opacity(0.75)
}
}
}
}
Loading