Add iCloud Drive path description for iCloud profile type
This commit is contained in:
@@ -21,11 +21,11 @@ public struct EditProfileView: View {
|
||||
|
||||
private var formContent: some View {
|
||||
FormView {
|
||||
Section {
|
||||
FormItem(String(localized: "Name")) {
|
||||
TextField("Name", text: $profile.name, prompt: Text("Required"))
|
||||
.multilineTextAlignment(.trailing)
|
||||
}
|
||||
|
||||
Picker(selection: $profile.type) {
|
||||
Text("Local").tag(ProfileType.local)
|
||||
Text("iCloud").tag(ProfileType.icloud)
|
||||
@@ -56,6 +56,12 @@ public struct EditProfileView: View {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} footer: {
|
||||
if profile.type == .icloud {
|
||||
let fileName = profile.path.isEmpty ? String(localized: "FileName") : profile.path
|
||||
Text("File will be located at iCloud Drive/sing-box/\(fileName)")
|
||||
}
|
||||
}
|
||||
if profile.type == .remote {
|
||||
Section("Status") {
|
||||
FormTextItem("Last Updated", profile.lastUpdated!.relativeFormat)
|
||||
|
||||
@@ -52,6 +52,7 @@ public struct NewProfileView: View {
|
||||
|
||||
private var formContent: some View {
|
||||
FormView {
|
||||
Section {
|
||||
FormItem(String(localized: "Name")) {
|
||||
TextField("Name", text: $viewModel.profileName, prompt: Text("Required"))
|
||||
.multilineTextAlignment(.trailing)
|
||||
@@ -115,6 +116,12 @@ public struct NewProfileView: View {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} footer: {
|
||||
if viewModel.profileType == .icloud {
|
||||
let fileName = viewModel.remotePath.isEmpty ? String(localized: "FileName") : viewModel.remotePath
|
||||
Text("File will be located at iCloud Drive/sing-box/\(fileName)")
|
||||
}
|
||||
}
|
||||
#if os(iOS) || os(tvOS)
|
||||
Section {
|
||||
if !viewModel.isSaving {
|
||||
|
||||
@@ -3481,6 +3481,62 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"File will be located at iCloud Drive/sing-box/%@" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "此文件将位于 iCloud 云盘/sing-box/%@"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "此檔案將位於 iCloud 雲碟/sing-box/%@"
|
||||
}
|
||||
},
|
||||
"ru" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Файл будет расположен в iCloud Drive/sing-box/%@"
|
||||
}
|
||||
},
|
||||
"fa" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "فایل در iCloud Drive/sing-box/%@ قرار خواهد گرفت"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"FileName" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "文件名"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "檔案名稱"
|
||||
}
|
||||
},
|
||||
"ru" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "ИмяФайла"
|
||||
}
|
||||
},
|
||||
"fa" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "نام فایل"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Filter" : {
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
|
||||
Reference in New Issue
Block a user