Minor improvements

This commit is contained in:
世界 committed 2023-08-14 09:40:21 +08:00
1 parent 736bbc81e9
commit 1ac5df7f72
6 files changed
+86 -63

No files matched your search

@@ -53,7 +53,7 @@ public struct ProfileView: View {
}
}
FormView {
#if os(iOS) || os(tvOS)
#if os(iOS)
NavigationLink {
NewProfileView {
Task.detached {
@@ -64,17 +64,27 @@ public struct ProfileView: View {
Text("New Profile").foregroundColor(.accentColor)
}
.disabled(editMode.isEditing)
#endif
#if os(tvOS)
if ApplicationLibrary.inPreview || devicePickerSupports(.applicationService(name: "sing-box"), parameters: { .applicationService }) {
#elseif os(tvOS)
Section {
NavigationLink {
ImportProfileView {
NewProfileView {
Task.detached {
doReload()
}
}
} label: {
Text("Import Profile").foregroundColor(.accentColor)
Text("New Profile").foregroundColor(.accentColor)
}
if ApplicationLibrary.inPreview || devicePickerSupports(.applicationService(name: "sing-box"), parameters: { .applicationService }) {
NavigationLink {
ImportProfileView {
Task.detached {
doReload()
}
}
} label: {
Text("Import Profile").foregroundColor(.accentColor)
}
}
}
#endif