0
0
mirror of https://git.743378673.xyz/MeloNX/MeloNX.git synced 2025-04-24 08:25:14 +00:00

Refactor settings to include update check option and adjust API URLs

This commit is contained in:
Bella 2025-04-18 15:25:23 +12:00
parent 61fca7892f
commit c5c79c26ea
No known key found for this signature in database
GPG Key ID: 3FEB4D8FC145E886
4 changed files with 12 additions and 19 deletions

View File

@ -1,15 +0,0 @@
{
"originHash" : "fedf09a893a63378a2e53f631cd833ae83a0c9ee7338eb8d153b04fd34aaf805",
"pins" : [
{
"identity" : "swiftsvg",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mchoe/SwiftSVG",
"state" : {
"branch" : "master",
"revision" : "88b9ee086b29019e35f6f49c8e30e5552eb8fa9d"
}
}
],
"version" : 3
}

View File

@ -836,7 +836,7 @@ struct GameListRow: View {
}
.padding(.horizontal, 10)
.padding(.vertical, 4)
.frame(width: .infinity, height: .infinity)
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
.contentShape(Rectangle())
.contextMenu {
@ -1129,7 +1129,7 @@ func pullGameCompatibility(completion: @escaping (Result<[GameRequirements], Err
return
}
guard let url = URL(string: "https://melonx.org/api/game_entries") else {
guard let url = URL(string: "https://melonx.net/api/game_entries") else {
completion(.failure(NSError(domain: "Invalid URL", code: 0, userInfo: nil)))
return
}

View File

@ -56,6 +56,8 @@ struct SettingsView: View {
@AppStorage("HideButtons") var hideButtonsJoy = false
@AppStorage("checkForUpdate") var checkForUpdate: Bool = true
@State private var showResolutionInfo = false
@State private var showAnisotropicInfo = false
@State private var showControllerInfo = false
@ -887,6 +889,9 @@ struct SettingsView: View {
}
}
Divider()
SettingsToggle(isOn: $checkForUpdate, icon: "square.and.arrow.down", label: "Check for Updates")
if ryujinx.firmwareversion != "0" {
Divider()

View File

@ -32,13 +32,16 @@ struct MeloNXApp: App {
@AppStorage("hasbeenfinished") var finishedStorage: Bool = false
@AppStorage("location-enabled") var locationenabled: Bool = false
@AppStorage("checkForUpdate") var checkForUpdate: Bool = true
var body: some Scene {
WindowGroup {
if finishedStorage {
ContentView()
.onAppear {
checkLatestVersion()
if checkForUpdate {
checkLatestVersion()
}
}
.sheet(isPresented: Binding(
get: { showOutOfDateSheet && updateInfo != nil },
@ -73,7 +76,7 @@ struct MeloNXApp: App {
#if DEBUG
let urlString = "http://192.168.178.116:8000/api/latest_release"
#else
let urlString = "https://melonx.org/api/latest_release"
let urlString = "https://melonx.net/api/latest_release"
#endif
guard let url = URL(string: urlString) else {