Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed Jun 5, 2024
1 parent 98264e8 commit b90cec2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class NCAutoUploadFileNamesModel: ObservableObject, ViewOnAppearHandling {
// Check if maintaining original file name is enabled
if keychain.getOriginalFileName(key: NCGlobal.shared.keyFileNameOriginalAutoUpload) {
// If maintaining original file name, return a default filename
return (NSLocalizedString("_filename_", comment: "") + ": IMG_0001.JPG")
return ("IMG_0001.JPG")
} else {
let valueRenameTrimming = changedName.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
// If the changed name is empty, set the filename mask to empty and generate a new filename
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ struct NCAutoUploadFileNamesView: View {
HStack {
Text(NSLocalizedString("_filename_", comment: ""))
.font(.system(size: 17))
.foregroundColor(Color(UIColor.label))
.fontWeight(.medium)
.background(Color(UIColor.secondarySystemGroupedBackground))
Spacer()
TextField(NSLocalizedString("_filename_header_", comment: ""), text: $model.changedName)
.onSubmit {
Expand All @@ -80,23 +78,22 @@ struct NCAutoUploadFileNamesView: View {
.onChange(of: model.changedName, perform: { _ in
model.getFileName()
})

.font(.system(size: 15))
.foregroundColor(Color(UIColor.label))
.background(Color(UIColor.secondarySystemGroupedBackground))
.multilineTextAlignment(.trailing)
}
.font(.system(size: 16))
Text("\(model.fileName)")
.font(.system(size: 16))
.foregroundColor(Color(UIColor.lightGray))
}, header: {
Text(NSLocalizedString("_filename_", comment: ""))
}, footer: {
Text(NSLocalizedString("_preview_filename_footer_", comment: ""))
Text(String(format: NSLocalizedString("_preview_filename_", comment: ""), "MM, MMM, DD, YY, YYYY, HH, hh, mm, ss, ampm"))
})
} else {
Section(content: {
Text(NSLocalizedString("_default_filename_image_", comment: ""))
Text("IMG_0001.JPG")
.foregroundColor(Color(UIColor.lightGray))
}, header: {
Text(NSLocalizedString("_filename_", comment: ""))
}, footer: {
Expand Down
2 changes: 0 additions & 2 deletions iOSClient/Supporting Files/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,7 @@
"_rename_filename_" = "Rename";
"_filename_" = "Filename";
"_enter_filename_" = "Enter filename …";
"_default_filename_image_" = "Filename: IMG_0001.JPG";
"_default_preview_filename_footer_" = "Example preview of filename: IMG_0001.JPG";
"_preview_filename_footer_" = "Example preview of filename. You can use the mask YYYY.MM.DD hh.mm.ss am/pm for date/time.";
"_filename_header_" = "Enter filename";
"_preview_filename_" = "Example preview of filename. You can use the mask %@ for date/time";
"_add_filenametype_" = "Specify type in filename";
Expand Down

0 comments on commit b90cec2

Please sign in to comment.