Skip to content

Commit fbf7fab

Browse files
NMC-5291 - iOS v10.2.2.3 - Sharing: Wrong sharing icon in file browser when internal share is sent
NMC-5294 - iOS v10.2.2.3 - E2EE: Errormessage after creating a E2EE folder NMC-5295 - iOS v10.2.2.3 - File Browser: Remove "file lock" feature from menu NMC-5297 - iOS v10.2.2.3 - File Browser: unable to change the folder color to magenta NMC-5298 - iOS v10.2.2.3 - Sharing: its possible to select a password with just one charater (like space) NMC-5299 - iOS v10.2.2.3 - Autoupload: Incorrect description for auto-upload function NMC-5302 - iOS v10.2.2.3 - Settings: Change pin - missing translation for "Enter your passcode" NMC-5303 - iOS v10.2.2.3 - E2E: possible to share E2E encrypted folders NMC-5304 - iOS v10.2.2.3 - Settings: description text for PIN is not correct NMC-5307 - iOS v10.2.2.3 - Sharing: Email address suggestion is displayed in gray instead of white (Darkmode)
1 parent 956dd4d commit fbf7fab

15 files changed

+81
-59
lines changed

iOSClient/Extensions/UIAlertController+Extension.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ extension UIAlertController {
6262
if createFolderResults.error == .success {
6363
let error = await NCNetworkingE2EEMarkFolder().markFolderE2ee(account: session.account, serverUrlFileName: serverUrlFileName, userId: session.userId)
6464
if error != .success {
65-
NCContentPresenter().showError(error: error)
66-
}else {
65+
await showErrorBanner(scene: scene, text: error.errorDescription)
66+
} else{
6767
#if !EXTENSION
6868
AnalyticsHelper.shared.trackCreateFolder(isEncrypted: true, creationDate: Date())
6969
#endif
70-
await showErrorBanner(scene: scene, text: error.errorDescription)
7170
}
7271
} else {
7372
await showErrorBanner(scene: scene, text: createFolderResults.error.errorDescription)

iOSClient/Main/Collection Common/NCCollectionViewCommon+CollectionViewDataSource.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,14 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
205205
if metadata.directory {
206206
let tblDirectory = database.getTableDirectory(ocId: metadata.ocId)
207207

208-
if metadata.e2eEncrypted {
208+
// if metadata.e2eEncrypted {
209209
// cell.previewImageView?.image = imageCache.getFolderEncrypted()
210-
// } else if metadata.permissions.contains("S"), (metadata.permissions.range(of: "S") != nil) {
210+
// } else if isShare {
211211
// cell.previewImageView?.image = imageCache.getFolderSharedWithMe()
212-
// } else if isShare || !metadata.shareType.isEmpty {
213-
// cell.previewImageView?.image = imageCache.getFolderPublic()
214-
//// } else if isShare {
215-
//// cell.filePreviewImageView?.image = imageCache.getFolderSharedWithMe()
216-
//// } else if !metadata.shareType.isEmpty {
217-
//// metadata.shareType.contains(NKShare.ShareType.publicLink.rawValue) ?
218-
//// (cell.filePreviewImageView?.image = imageCache.getFolderPublic()) :
219-
//// (cell.filePreviewImageView?.image = imageCache.getFolderSharedWithMe())
212+
// } else if !metadata.shareType.isEmpty {
213+
// metadata.shareType.contains(NKShare.ShareType.publicLink.rawValue) ?
214+
// (cell.previewImageView?.image = imageCache.getFolderPublic()) :
215+
// (cell.previewImageView?.image = imageCache.getFolderSharedWithMe())
220216
// } else if !metadata.shareType.isEmpty && metadata.shareType.contains(NKShare.ShareType.publicLink.rawValue) {
221217
// cell.previewImageView?.image = imageCache.getFolderPublic()
222218
// } else if metadata.mountType == "group" {
@@ -227,9 +223,13 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
227223
// cell.previewImageView?.image = imageCache.getFolderAutomaticUpload()
228224
// } else {
229225
// cell.previewImageView?.image = imageCache.getFolder()
230-
cell.previewImageView?.image = imageCache.getFolderEncrypted()
231-
} else if isShare {
232-
cell.previewImageView?.image = imageCache.getFolderSharedWithMe()
226+
// }
227+
if metadata.e2eEncrypted {
228+
cell.previewImageView?.image = NCImageCache.shared.getFolderEncrypted()
229+
} else if metadata.permissions.contains("S"), (metadata.permissions.range(of: "S") != nil) {
230+
cell.previewImageView?.image = NCImageCache.shared.getFolderSharedWithMe()
231+
} else if isShare || !metadata.shareType.isEmpty {
232+
cell.previewImageView?.image = NCImageCache.shared.getFolderPublic()
233233
} else if !metadata.shareType.isEmpty {
234234
metadata.shareType.contains(NKShare.ShareType.publicLink.rawValue) ?
235235
(cell.previewImageView?.image = imageCache.getFolderPublic()) :

iOSClient/Main/Collection Common/NCCollectionViewCommonSelectTabBar.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,18 @@ struct NCCollectionViewCommonSelectTabBarView: View {
187187
})
188188
.disabled(!tabBarSelect.isAnyOffline && (!tabBarSelect.canSetAsOffline || tabBarSelect.isSelectedEmpty))
189189

190-
Button(action: {
191-
tabBarSelect.delegate?.lock(isAnyLocked: tabBarSelect.isAnyLocked)
192-
}, label: {
193-
Label(NSLocalizedString(tabBarSelect.isAnyLocked ? "_unlock_" : "_lock_", comment: ""), systemImage: tabBarSelect.isAnyLocked ? "lock.open" : "lock")
194-
195-
if !tabBarSelect.enableLock {
196-
Text(NSLocalizedString("_lock_no_permissions_selected_", comment: ""))
197-
}
198-
})
199-
.disabled(!tabBarSelect.enableLock || tabBarSelect.isSelectedEmpty)
190+
// NMC-5295 - iOS v10.2.2.3 - File Browser: Remove "file lock" feature from menu
191+
// lock menu entry is not available. not supported by magentacloud
192+
// Button(action: {
193+
// tabBarSelect.delegate?.lock(isAnyLocked: tabBarSelect.isAnyLocked)
194+
// }, label: {
195+
// Label(NSLocalizedString(tabBarSelect.isAnyLocked ? "_unlock_" : "_lock_", comment: ""), systemImage: tabBarSelect.isAnyLocked ? "lock.open" : "lock")
196+
//
197+
// if !tabBarSelect.enableLock {
198+
// Text(NSLocalizedString("_lock_no_permissions_selected_", comment: ""))
199+
// }
200+
// })
201+
// .disabled(!tabBarSelect.enableLock || tabBarSelect.isSelectedEmpty)
200202

201203
Button(action: {
202204
tabBarSelect.delegate?.selectAll()

iOSClient/Menu/NCCollectionViewCommon+Menu.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension NCCollectionViewCommon {
8181
actions.append(
8282
NCMenuAction(
8383
title: NSLocalizedString("_details_", comment: ""),
84-
icon: utility.loadImage(named: "square.and.arrow.up", colors: [NCBrandColor.shared.iconImageColor]),
84+
icon: UIImage(named: "share")!.withTintColor(NCBrandColor.shared.iconImageColor),
8585
order: 10,
8686
sender: sender,
8787
action: { _ in

iOSClient/Menu/NCContextMenu.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class NCContextMenu: NSObject {
9292
private func makeDetailAction(metadata: tableMetadata) -> UIAction {
9393
return UIAction(
9494
title: NSLocalizedString("_details_", comment: ""),
95-
image: UIImage(named: "share")
95+
image: UIImage(named: "share")?.withTintColor(NCBrandColor.shared.iconImageColor)
9696
) { _ in
9797
NCCreate().createShare(viewController: self.viewController, metadata: metadata, page: .activity)
9898
}
@@ -121,7 +121,7 @@ class NCContextMenu: NSObject {
121121
private func makeShareAction() -> UIAction {
122122
return UIAction(
123123
title: NSLocalizedString("_share_", comment: ""),
124-
image: UIImage(named: "share")
124+
image: UIImage(named: "share")?.withTintColor(NCBrandColor.shared.iconImageColor)
125125
) { _ in
126126
Task { @MainActor in
127127
let controller = self.viewController.tabBarController as? NCMainTabBarController
@@ -414,7 +414,7 @@ class NCContextMenu: NSObject {
414414

415415
let deleteSubMenu = UIMenu(
416416
title: NSLocalizedString("_delete_", comment: ""),
417-
image: utility.loadImage(named: "trashIcon"),
417+
image: utility.loadImage(named: "trashIcon", colors: [NCBrandColor.shared.iconImageColor]),
418418
options: .destructive,
419419
children: [deleteConfirmLocal, deleteConfirmFile]
420420
)
@@ -438,7 +438,7 @@ class NCContextMenu: NSObject {
438438
metadata.directory ? "_delete_folder_" : "_delete_file_",
439439
comment: ""
440440
),
441-
image: utility.loadImage(named: "trashIcon"),
441+
image: utility.loadImage(named: "trashIcon", colors: [NCBrandColor.shared.iconImageColor]),
442442
attributes: .destructive
443443
) { _ in
444444
if let viewController = self.viewController as? NCCollectionViewCommon {
@@ -460,7 +460,7 @@ class NCContextMenu: NSObject {
460460
private func makeDeleteLocalAction(metadata: tableMetadata) -> UIAction {
461461
return UIAction(
462462
title: NSLocalizedString("_remove_local_file_", comment: ""),
463-
image: utility.loadImage(named: "trashIcon"),
463+
image: utility.loadImage(named: "trashIcon", colors: [NCBrandColor.shared.iconImageColor]),
464464
attributes: .destructive
465465
) { _ in
466466
Task {

iOSClient/Menu/NCViewerContextMenu.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ enum NCViewerContextMenu {
2929
if !(!capabilities.fileSharingApiEnabled && !capabilities.filesComments && capabilities.activity.isEmpty), !metadata.isDirectoryE2EE, !metadata.e2eEncrypted {
3030
let action = UIAction(
3131
title: NSLocalizedString("_details_", comment: ""),
32-
image: UIImage(systemName: "square.and.arrow.up")?.withTintColor(NCBrandColor.shared.iconImageColor)
32+
image: UIImage(named: "share")?.withTintColor(NCBrandColor.shared.iconImageColor)
3333
) { _ in
3434
NCCreate().createShare(viewController: controller,
3535
metadata: metadata,

iOSClient/Share/Advanced/NCShareAdvancePermission.swift

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,28 @@ class NCShareAdvancePermission: UITableViewController, NCShareAdvanceFotterDeleg
185185
tableView.reloadData()
186186
return
187187
}
188+
// let alertController = UIAlertController.password(titleKey: "_share_password_") { password in
189+
// self.share.password = password ?? ""
190+
// tableView.reloadData()
191+
// }
188192
let alertController = UIAlertController.password(titleKey: "_share_password_") { password in
189-
self.share.password = password ?? ""
190-
tableView.reloadData()
193+
let newPassword = password ?? ""
194+
195+
// Enforce identical rules: minimum 6 characters
196+
if newPassword.count >= 6 {
197+
self.share.password = newPassword
198+
tableView.reloadData()
199+
} else if !newPassword.isEmpty {
200+
// Optional: Show an error alert or toast for "too short"
201+
print(NSLocalizedString("_share_password_must_be_at_least_6_chars", comment: ""))
202+
NCContentPresenter().showInfo(title: "_share_password_must_be_at_least_6_chars")
203+
// Task {
204+
// await showErrorBanner(controller: self, text: "_share_password_must_be_at_least_6_chars")
205+
//// Task {
206+
//// await showErrorBanner(sceneIdentifier: self.sceneIdentifier, text: "_share_password_must_be_at_least_6_chars")
207+
//// }
208+
// }
209+
}
191210
}
192211
self.present(alertController, animated: true)
193212
case .note:

iOSClient/Share/NCShare.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ extension NCShare: NCShareNetworkingDelegate {
397397
appearance.shadowOpacity = 0.2
398398
appearance.shadowRadius = 30
399399
appearance.animationduration = 0.25
400-
appearance.textColor = .darkGray
400+
appearance.textColor = NCBrandColor.shared.label
401401
appearance.setupMaskedCorners([.layerMaxXMaxYCorner, .layerMinXMaxYCorner])
402402

403403
let account = NCManageDatabase.shared.getTableAccount(account: metadata.account)
206 Bytes
Binary file not shown.

iOSClient/Supporting Files/en.lproj/Localizable.strings

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275

276276
//TOPasscodeSettingsWarningLabel.m
277277
"_1_failed_passcode_attempt" = "1 Failed Passcode Attempt";
278-
"_failed_passcode_attempts" = "%d Failed Passcode Attempts";
278+
"_failed_passcode_attempts" = "%ld Failed Passcode Attempts";
279279

280280
/* Background of the file listing view */
281281
"_use_as_background_" = "Use it as a background";
@@ -379,8 +379,6 @@
379379
"_username_" = "Username";
380380
"_change_credentials_" = "Change your credentials";
381381
"_wifi_only_" = "Only use Wi-Fi connection";
382-
"_settings_autoupload_" = "Auto upload photos";
383-
//"_settings_autoupload_" = "Auto upload";
384382
//"_settings_autoupload_" = "Auto upload photos";
385383
"_settings_autoupload_" = "Auto upload";
386384
"_app_version_" = "Application version";
@@ -736,6 +734,7 @@
736734
"_share_link_name_" = "Link name";
737735
"_password_" = "Password";
738736
"_share_password_" = "Password protected link";
737+
"_share_password_must_be_at_least_6_chars" = "Password must be at least 6 characters.";
739738
"_share_expirationdate_" = "Set expiration date for link";
740739
"_date_" = "Date";
741740
"_share_title_" = "Share";
@@ -1131,11 +1130,11 @@
11311130
"_voice_memo_stop_" = "Tap to stop";
11321131
"_voice_memo_filename_" = "Voice memo";
11331132
"_voice_memo_title_" = "Upload voice memo";
1134-
"Enter Passcode" = "Enter Passcode";
1135-
"Enter a new passcode" = "Enter a new passcode";
1136-
"Confirm new passcode" = "Confirm new passcode";
1133+
//"Enter Passcode" = "Enter Passcode";
1134+
//"Enter a new passcode" = "Enter a new passcode";
1135+
//"Confirm new passcode" = "Confirm new passcode";
11371136
"_too_many_failed_passcode_attempts_error_" = "Too many failed passcode attempts. Please try again.";
1138-
"Passcodes didn't match. Try again." = "Passcodes didn't match. Try again.";
1137+
//"Passcodes didn't match. Try again." = "Passcodes didn't match. Try again.";
11391138
"Delete" = "Delete";
11401139
"Cancel" = "Cancel";
11411140
"_certificate_details_" = "Certificate Server details";

0 commit comments

Comments
 (0)