|
@@ -53,9 +53,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_upload_photos_videos_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "file_photo"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_upload_photos_videos_", comment: ""), icon: UIImage(named: "file_photo")!.image(color: NCBrandColor.shared.icon, size: 50), action: { menuAction in
|
|
|
NCPhotosPickerViewController.init(viewController: appDelegate.window.rootViewController!, maxSelectedAssets: 0, singleSelectedMode: false)
|
|
|
}
|
|
|
)
|
|
@@ -63,9 +61,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_upload_file_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "file"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_upload_file_", comment: ""), icon: UIImage(named: "file")!.image(color: NCBrandColor.shared.icon, size: 50), action: { menuAction in
|
|
|
if let tabBarController = self.window.rootViewController as? UITabBarController {
|
|
|
self.documentPickerViewController = NCDocumentPickerViewController.init(tabBarController: tabBarController)
|
|
|
}
|
|
@@ -76,9 +72,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
#if HC
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_im_create_new_file", tableName: "IMLocalizable", bundle: Bundle.main, value: "", comment: ""),
|
|
|
- icon: CCGraphics.scale(UIImage(named: "imagemeter"), to: CGSize(width: 25, height: 25), isAspectRation: true),
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_im_create_new_file", tableName: "IMLocalizable", bundle: Bundle.main, value: "", comment: ""), icon: UIImage(named: "imagemeter")!.image(color: NCBrandColor.shared.icon, size: 50), action: { menuAction in
|
|
|
_ = IMCreate.init(serverUrl: appDelegate.activeServerUrl, imagemeterViewerDelegate: NCNetworkingMain.shared)
|
|
|
}
|
|
|
)
|
|
@@ -88,7 +82,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
if NCCommunication.shared.isNetworkReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == NCBrandGlobal.shared.editorText}) && !isEncrypted {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == NCBrandGlobal.shared.editorText})!
|
|
|
actions.append(
|
|
|
- NCMenuAction(title: NSLocalizedString("_create_nextcloudtext_document_", comment: ""), icon: CCGraphics.changeThemingColorImage(UIImage(named: "file_txt"), width: 50, height: 50, color: NCBrandColor.shared.icon), action: { menuAction in
|
|
|
+ NCMenuAction(title: NSLocalizedString("_create_nextcloudtext_document_", comment: ""), icon: UIImage(named: "file_txt")!.image(color: NCBrandColor.shared.icon, size: 50), action: { menuAction in
|
|
|
guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController() else {
|
|
|
return
|
|
|
}
|
|
@@ -109,9 +103,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
if #available(iOS 13.0, *) {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_scans_document_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "scan"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_scans_document_", comment: ""), icon: UIImage(named: "scan")!.image(color: NCBrandColor.shared.icon, size: 50), action: { menuAction in
|
|
|
NCCreateScanDocument.shared.openScannerDocument(viewController: appDelegate.window.rootViewController!)
|
|
|
}
|
|
|
)
|
|
@@ -120,9 +112,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_create_voice_memo_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "microphone"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_create_voice_memo_", comment: ""), icon: UIImage(named: "microphone")!.image(color: NCBrandColor.shared.icon, size: 20), action: { menuAction in
|
|
|
|
|
|
let fileName = CCUtility.createFileNameDate(NSLocalizedString("_voice_memo_filename_", comment: ""), extension: "m4a")!
|
|
|
let viewController = UIStoryboard(name: "NCAudioRecorderViewController", bundle: nil).instantiateInitialViewController() as! NCAudioRecorderViewController
|
|
@@ -139,8 +129,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
|
|
|
actions.append(
|
|
|
NCMenuAction(title: NSLocalizedString("_create_folder_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "folder"), width: 50, height: 50, color: NCBrandColor.shared.brandElement),
|
|
|
- action: { menuAction in
|
|
|
+ icon: UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: 50), action: { menuAction in
|
|
|
|
|
|
guard let serverUrl = appDelegate.activeServerUrl else { return }
|
|
|
|
|
@@ -172,9 +161,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
if serverVersionMajor >= NCBrandGlobal.shared.nextcloudVersion18 && directory?.richWorkspace == nil && !isEncrypted && NCCommunication.shared.isNetworkReachable() {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_add_folder_info_", comment: ""),
|
|
|
- icon: CCGraphics.changeThemingColorImage(UIImage(named: "addFolderInfo"), width: 50, height: 50, color: NCBrandColor.shared.icon),
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_add_folder_info_", comment: ""), icon: UIImage(named: "addFolderInfo")!.image(color: NCBrandColor.shared.icon, size: 50), action: { menuAction in
|
|
|
let richWorkspaceCommon = NCRichWorkspaceCommon()
|
|
|
if let viewController = self.activeViewController {
|
|
|
if NCManageDatabase.shared.getMetadata(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND fileNameView LIKE[c] %@", appDelegate.account, appDelegate.activeServerUrl, NCBrandGlobal.shared.fileNameRichWorkspace.lowercased())) == nil {
|
|
@@ -192,9 +179,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == NCBrandGlobal.shared.editorOnlyoffice && $0.identifier == NCBrandGlobal.shared.onlyofficeDocx})!
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_create_new_document_", comment: ""),
|
|
|
- icon: UIImage(named: "create_file_document")!,
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_create_new_document_", comment: ""), icon: UIImage(named: "create_file_document")!, action: { menuAction in
|
|
|
guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController() else {
|
|
|
return
|
|
|
}
|
|
@@ -217,9 +202,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == NCBrandGlobal.shared.editorOnlyoffice && $0.identifier == NCBrandGlobal.shared.onlyofficeXlsx})!
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_create_new_spreadsheet_", comment: ""),
|
|
|
- icon: UIImage(named: "create_file_xls")!,
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_create_new_spreadsheet_", comment: ""), icon: UIImage(named: "create_file_xls")!, action: { menuAction in
|
|
|
guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController() else {
|
|
|
return
|
|
|
}
|
|
@@ -242,9 +225,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == NCBrandGlobal.shared.editorOnlyoffice && $0.identifier == NCBrandGlobal.shared.onlyofficePptx})!
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_create_new_presentation_", comment: ""),
|
|
|
- icon: UIImage(named: "create_file_ppt")!,
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_create_new_presentation_", comment: ""), icon: UIImage(named: "create_file_ppt")!, action: { menuAction in
|
|
|
guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController() else {
|
|
|
return
|
|
|
}
|
|
@@ -267,9 +248,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
if richdocumentsMimetypes.count > 0 && NCCommunication.shared.isNetworkReachable() && !isEncrypted {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_create_new_document_", comment: ""),
|
|
|
- icon: UIImage(named: "create_file_document")!,
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_create_new_document_", comment: ""), icon: UIImage(named: "create_file_document")!, action: { menuAction in
|
|
|
guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController() else {
|
|
|
return
|
|
|
}
|
|
@@ -288,9 +267,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_create_new_spreadsheet_", comment: ""),
|
|
|
- icon: UIImage(named: "create_file_xls")!,
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_create_new_spreadsheet_", comment: ""), icon: UIImage(named: "create_file_xls")!, action: { menuAction in
|
|
|
guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController() else {
|
|
|
return
|
|
|
}
|
|
@@ -309,9 +286,7 @@ extension AppDelegate: NCAudioRecorderViewControllerDelegate {
|
|
|
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
- title: NSLocalizedString("_create_new_presentation_", comment: ""),
|
|
|
- icon: UIImage(named: "create_file_ppt")!,
|
|
|
- action: { menuAction in
|
|
|
+ title: NSLocalizedString("_create_new_presentation_", comment: ""), icon: UIImage(named: "create_file_ppt")!, action: { menuAction in
|
|
|
guard let navigationController = UIStoryboard(name: "NCCreateFormUploadDocuments", bundle: nil).instantiateInitialViewController() else {
|
|
|
return
|
|
|
}
|