Add Show MeloNX folder

This commit is contained in:
Stossy11 2024-12-18 19:24:43 +11:00
parent 63427eb744
commit 1662bcbc96
3 changed files with 15 additions and 7 deletions

View File

@ -14,8 +14,8 @@
filePath = "MeloNX/Views/GamesList/GameListView.swift" filePath = "MeloNX/Views/GamesList/GameListView.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "256" startingLineNumber = "264"
endingLineNumber = "256" endingLineNumber = "264"
landmarkName = "loadGames()" landmarkName = "loadGames()"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>

View File

@ -116,11 +116,8 @@ struct GameLibraryView: View {
ToolbarItem(placement: .topBarLeading) { ToolbarItem(placement: .topBarLeading) {
Menu { Menu {
Button { Text("Firmware Version: \(firmwareversion)")
} label: { .tint(.white)
Text("Firmware Version: \(firmwareversion)")
.tint(.white)
}
if firmwareversion == "0" { if firmwareversion == "0" {
Button { Button {
@ -138,6 +135,17 @@ struct GameLibraryView: View {
Text("Remove Firmware") Text("Remove Firmware")
} }
} }
Button {
let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
let sharedurl = documentsUrl.absoluteString.replacingOccurrences(of: "file://", with: "shareddocuments://")
let furl = URL(string: sharedurl)!
if UIApplication.shared.canOpenURL(furl) {
UIApplication.shared.open(furl, options: [:])
}
} label: {
Text("Show MeloNX Folder")
}
} label: { } label: {
Image(systemName: "plus") Image(systemName: "plus")
.foregroundColor(.blue) .foregroundColor(.blue)