|
@@ -110,7 +110,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: metadata.favorite ? NSLocalizedString("_remove_favorites_", comment: "") : NSLocalizedString("_add_favorites_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "favorite"), width: 50, height: 50, color: NCBrandColor.shared.yellowFavorite),
|
|
|
+ icon: UIImage(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 50),
|
|
|
action: { menuAction in
|
|
|
NCNetworking.shared.favoriteMetadata(metadata, urlBase: appDelegate.urlBase) { (errorCode, errorDescription) in
|
|
|
if errorCode != 0 {
|
|
@@ -128,7 +128,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_details_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "details"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "details")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
NCNetworkingNotificationCenter.shared.openShare(ViewController: self, metadata: metadata, indexPage: 0)
|
|
|
}
|
|
@@ -143,7 +143,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_open_in_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "openFile"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "openFile")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
NCNetworkingNotificationCenter.shared.downloadOpen(metadata: metadata, selector: NCBrandGlobal.shared.selectorOpenIn)
|
|
|
}
|
|
@@ -158,7 +158,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_rename_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "rename"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "rename")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
let alertController = UIAlertController(title: NSLocalizedString("_rename_", comment: ""), message: nil, preferredStyle: .alert)
|
|
|
|
|
@@ -194,7 +194,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_move_or_copy_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "move"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "move")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
NCCollectionCommon.shared.openSelectView(items: [metadata])
|
|
|
}
|
|
@@ -209,7 +209,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: isOffline ? NSLocalizedString("_remove_available_offline_", comment: "") : NSLocalizedString("_set_available_offline_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "offline"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "offline")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
if isOffline {
|
|
|
if metadata.directory {
|
|
@@ -241,7 +241,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_view_in_folder_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "viewInFolder"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "viewInFolder")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
NCCollectionCommon.shared.openFileViewInFolder(serverUrl: metadata.serverUrl, fileName: metadata.fileName)
|
|
|
}
|
|
@@ -255,7 +255,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: titleDelete,
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "trash"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "trash")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
let alertController = UIAlertController(title: "", message: NSLocalizedString("_want_delete_", comment: ""), preferredStyle: .alert)
|
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_delete_", comment: ""), style: .default) { (action:UIAlertAction) in
|
|
@@ -277,7 +277,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_e2e_set_folder_encrypted_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "lock"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "lock")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
NCCommunication.shared.markE2EEFolder(fileId: metadata.fileId, delete: false) { (account, errorCode, errorDescription) in
|
|
|
if errorCode == 0 {
|
|
@@ -302,7 +302,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_e2e_remove_folder_encrypted_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "lock"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "lock")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
NCCommunication.shared.markE2EEFolder(fileId: metadata.fileId, delete: true) { (account, errorCode, errorDescription) in
|
|
|
if errorCode == 0 {
|
|
@@ -343,7 +343,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_select_all_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "selectFull"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "selectFull")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
self.collectionViewSelectAll()
|
|
|
}
|
|
@@ -356,7 +356,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_move_or_copy_selected_files_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "move"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "move")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
var meradatasSelect = [tableMetadata]()
|
|
|
for ocId in selectOcId {
|
|
@@ -378,7 +378,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_save_selected_files_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "saveSelectedFiles"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "saveSelectedFiles")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
for ocId in selectOcId {
|
|
|
if let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) {
|
|
@@ -398,7 +398,7 @@ extension NCCollectionViewCommon {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_delete_selected_files_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "trash"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
+ icon: UIImage(named: "trash")!.image(color: NCBrandColor.shared.icon, size: 50),
|
|
|
action: { menuAction in
|
|
|
let alertController = UIAlertController(title: "", message: NSLocalizedString("_want_delete_", comment: ""), preferredStyle: .alert)
|
|
|
alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_delete_", comment: ""), style: .default) { (action:UIAlertAction) in
|