Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature/keyboard-commands] Keyboard Commands for all actions on iPad #495

Merged
merged 106 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from 93 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
65028ae
Naming improvements based on latest SDK:
felix-schwarz Jun 30, 2019
9b4a828
#393 added an activity indicator which will be shown, if offline copi…
hosy Jul 3, 2019
94f2632
Merge branch 'master' into feature/naming
felix-schwarz Jul 4, 2019
2c00907
- Change SDK branch to master
felix-schwarz Jul 4, 2019
ce2fc9c
#76 user can import files using the iOS share sheet. all file types a…
hosy Jul 8, 2019
10e0928
Merge remote-tracking branch 'origin/master' into feature/naming
felix-schwarz Jul 8, 2019
f2480b4
- using new SDK with fixes for requesting core
hosy Jul 8, 2019
09b6e63
- Log device, version and locale information at the beginning of ever…
felix-schwarz Jul 8, 2019
ebc7dc3
fixed crash, changed bookmark name to shortname
hosy Jul 9, 2019
de7d854
changed UIAlertViewController for account selection to CardViewContro…
hosy Jul 9, 2019
af29a59
fixed icon badge creation for fastlane lane In-House Enterprise IPA g…
hosy Jul 10, 2019
1774cc9
install librsvg for fastlane via sh
hosy Jul 10, 2019
f212713
moved import file code to own class
hosy Jul 10, 2019
6a09780
added option to automatically resolve name conflicts, if file name al…
hosy Jul 10, 2019
f650478
Changed app version to 1.1.0
hosy Jul 10, 2019
a55e85f
enabled beta build and warning
hosy Jul 10, 2019
dcc0231
Keep the gallery alive after doing some action over an item (#447)
mneuwert Jul 10, 2019
be14b82
Media player implemented using AVKit (#429)
mneuwert Jul 10, 2019
78d8b03
Merge branch 'feature/log-info' into milestone/1.1
hosy Jul 10, 2019
d2e1467
Merge branch 'fix/delete-offline-activity-indicator' into milestone/1.1
hosy Jul 10, 2019
415a593
Merge branch 'feature/naming' into milestone/1.1
hosy Jul 10, 2019
6611dd4
Display error message in case file couldn’t be preview e.g. due to fi…
mneuwert Jul 10, 2019
4077876
Merge branch 'milestone/1.1' of github.com:owncloud/ios-app into mile…
hosy Jul 10, 2019
78ff966
Fixed UI test for creating folder, need to return a fixed name, becau…
hosy Jul 11, 2019
8be02df
added a description header and changed typo
hosy Jul 11, 2019
a1cf538
- fixed showing the directory picker controller, after the card view …
hosy Jul 12, 2019
4d4f10c
Merge branch 'milestone/1.1' into feature/share-sheet
hosy Jul 12, 2019
9dd6f9d
Version Bump to 126
Jul 12, 2019
9c935fe
- create local copy of import file, if needed
hosy Jul 15, 2019
0e5c4c2
- improved duplicate item deletion behaviour
felix-schwarz Jul 15, 2019
30cae47
Merge branch 'feature/share-sheet' into milestone/1.1
hosy Jul 15, 2019
992005c
Version Bump to 127
Jul 15, 2019
8e88a12
changed back signing identity
hosy Jul 15, 2019
4d18c69
Merge branch 'milestone/1.1' of github.com:owncloud/ios-app into mile…
hosy Jul 15, 2019
97212f1
Version Bump to 128
Jul 15, 2019
8759a3a
added required CFBundleTypeName key
hosy Jul 15, 2019
8ac51f9
Merge branch 'milestone/1.1' of github.com:owncloud/ios-app into mile…
hosy Jul 15, 2019
39e6172
Version Bump to 129
Jul 15, 2019
bd0732b
updated changelog
hosy Jul 15, 2019
216b1d6
use formSheet presentation style for the iPad when showing the docume…
hosy Jul 16, 2019
2e76789
Fix for images not being displayed in the gallery
mneuwert Jul 16, 2019
f39b614
Version Bump to 130
Jul 16, 2019
cab565c
Version Bump to 131
Jul 19, 2019
e7eaac8
[fix/sharing-search] Fixed min length for searching sharing users (#455)
hosy Jul 19, 2019
642a788
- Update ios-sdk to address finding (1) in ios-app #446
felix-schwarz Jul 23, 2019
92befda
Preventing updating UI in DisplayViewController while item is being c…
mneuwert Jul 23, 2019
1455467
Fixed a small warning
mneuwert Jul 23, 2019
483c4c1
Merge branch 'milestone/1.1' of https://github.com/owncloud/ios-app i…
mneuwert Jul 23, 2019
7b67d40
Tried to improve gallery logic concerning items modification
mneuwert Jul 23, 2019
3952a14
Added a setting allowing to decide user if media files shall be streamed
mneuwert Jul 23, 2019
5474b06
- Add debug output to Display*ViewController
felix-schwarz Jul 25, 2019
a043012
Fixed handling of deleted / moved item in the gallery
mneuwert Jul 25, 2019
a25823c
Merge branch 'milestone/1.1' of https://github.com/owncloud/ios-app i…
mneuwert Jul 25, 2019
5680ca8
Another small fix for handling of failed item move
mneuwert Jul 25, 2019
6374107
Version Bump to 132
Jul 26, 2019
2b3cba8
Added LSSupportsOpeningDocumentsInPlace key to Info.plist
mneuwert Jul 26, 2019
83a30cc
Merge branch 'milestone/1.1' of https://github.com/owncloud/ios-app i…
mneuwert Jul 26, 2019
034c7ed
Fixed Info.plist and added LSHandlerRank property
mneuwert Jul 26, 2019
1cbecd4
Fix for #455 issue: no search request triggered
mneuwert Jul 26, 2019
2d62879
show always the account selection sheet and added a note, that only o…
hosy Jul 31, 2019
8caf9a7
use securtiy scoped file operation for importing a file
hosy Aug 1, 2019
640047e
Fix for the PR #447 (keep gallery alive) (#465)
mneuwert Aug 1, 2019
afd9053
[feature/bundle-import] Add support for certain bundle formats to the…
felix-schwarz Aug 8, 2019
57b855f
Version Bump to 133
Aug 9, 2019
dd6b625
[feature/sort direction] Allow sorting asc/desc for all sort methods …
hosy Aug 9, 2019
7bb5c4f
[fix/index-bar] Make Index Bar available in general file list (#469)
hosy Aug 9, 2019
349e7cf
Version Bump to 134
Aug 9, 2019
f89b344
Merge remote-tracking branch 'origin/master' into milestone/1.1
felix-schwarz Aug 13, 2019
869c86d
Version Bump to 135
Aug 13, 2019
934766f
Version Bump to 136
Aug 16, 2019
285f34a
Change behaviour of default expiration date (#476)
mneuwert Aug 16, 2019
8701760
Implement UIKeyCommands to access all actions and navigate through ta…
hosy Aug 17, 2019
de76821
Permission increasing UX in reshares (#467)
mneuwert Aug 19, 2019
3f3dbd7
fixed table selection in StaticTableView with key command
hosy Aug 20, 2019
efb7c27
Version Bump to 137
Aug 23, 2019
9129530
- moved KeyCommands extension into own file
hosy Aug 27, 2019
32b5412
[feature/itempolicy] Item Policy / Available Offline support (#456)
felix-schwarz Aug 29, 2019
f131ccc
Version Bump to 138
Aug 30, 2019
e868684
[feature/reorder buttons] Reorder Navigation Bar Actions (#478)
hosy Aug 30, 2019
7d7a7ab
Merge branch 'milestone/1.1' into feature/keyboard-commands
hosy Aug 30, 2019
b8937bb
using correct SDK after merge
hosy Aug 30, 2019
e2a2ba6
fixed changed selectButton variable name after merge
hosy Aug 30, 2019
b0d0af0
- added missing commands
hosy Aug 30, 2019
e21557d
fixed folder actions commands
hosy Aug 30, 2019
88c1f23
added sharing and links key commands
hosy Aug 30, 2019
fbef3eb
- added key commands for LibrarySharing
hosy Aug 30, 2019
c256bdc
- added missing key commands
hosy Sep 2, 2019
5f783b4
added commands for bookmark selection
hosy Sep 2, 2019
bb43994
Determine, if the internal pasteboard is the current item and use it
hosy Sep 2, 2019
58dadc6
- implemented "Cut"-Command, "Favorite"-Command
hosy Sep 3, 2019
3a43c25
- refactored code to own actions
hosy Sep 27, 2019
3359da1
Merge branch 'milestone/1.2' into feature/keyboard-commands
hosy Sep 27, 2019
0156427
- fixed code review findings
hosy Oct 2, 2019
19d9366
Merge branch 'milestone/1.2' into feature/keyboard-commands
hosy Oct 29, 2019
a3ae60d
Fixed QA finding (6), unfavorite was not possible, favorite was wrong
hosy Oct 30, 2019
aa9329d
- fixed QA finding (1), directory picker key commands fixed
hosy Oct 30, 2019
1808a51
Merge branch 'milestone/1.2' into feature/keyboard-commands
hosy Oct 30, 2019
c0c8102
added keyboard commands for
hosy Oct 30, 2019
629a338
- fixed duplicated keyboard commands
hosy Oct 30, 2019
b2b237d
Finding (7) fixed
hosy Oct 30, 2019
a716336
fixed findings (3), (7), (9), (11)
hosy Oct 31, 2019
71a90c9
added missing localization strings
hosy Oct 31, 2019
fbe97e8
fixed finding (13)
hosy Oct 31, 2019
6026ed7
Finding: (14), (15) crash fixed
hosy Nov 3, 2019
15e206e
Merge branch 'milestone/1.2' into feature/keyboard-commands
hosy Nov 4, 2019
8e78ec0
Fixed finding (17) and do not show tab bar controllers for modal view…
hosy Nov 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ownCloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@
3913214D22956D5700EF88F4 /* LibraryTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3913214A22956D5700EF88F4 /* LibraryTableViewController.swift */; };
392557FE2278703300E83F60 /* UISearchBar+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392557FD2278703300E83F60 /* UISearchBar+Extension.swift */; };
394804DA225CBDBA00AA8183 /* BreadCrumbTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394804D9225CBDBA00AA8183 /* BreadCrumbTableViewController.swift */; };
394E1FDA233E2D64009D2897 /* FavoriteAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394E1FD9233E2D64009D2897 /* FavoriteAction.swift */; };
394E1FDC233E3750009D2897 /* UnfavoriteAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394E1FDB233E3750009D2897 /* UnfavoriteAction.swift */; };
394E1FFF233E43F5009D2897 /* LinksAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394E1FFE233E43F5009D2897 /* LinksAction.swift */; };
39607CBC2225D480007B386D /* UITableViewController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39607CBB2225D480007B386D /* UITableViewController+Extension.swift */; };
396BE4C32288A84C00B254A9 /* PendingSharesTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396BE4C22288A84C00B254A9 /* PendingSharesTableViewController.swift */; };
396BE4CA2289500E00B254A9 /* RoundedLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396BE4C92289500E00B254A9 /* RoundedLabel.swift */; };
396C82FB2319AFDD00938262 /* CollaborateAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396C82FA2319AFDD00938262 /* CollaborateAction.swift */; };
3971B48F221B23FE006FB441 /* ThemeableColoredView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3971B48E221B23FE006FB441 /* ThemeableColoredView.swift */; };
397328EF22D606AC006CFAA4 /* ImportFilesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397328EE22D606AC006CFAA4 /* ImportFilesController.swift */; };
39878B7421FB1DE800DBF693 /* UINavigationController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39878B7321FB1DE800DBF693 /* UINavigationController+Extension.swift */; };
Expand All @@ -63,6 +67,7 @@
39DE75CD22F960CF0064C1E2 /* SortMethodTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39DE75C722F960CF0064C1E2 /* SortMethodTableViewController.swift */; };
39E2FDED21FDEC7500F0117F /* ServerListTableHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39E2FDEC21FDEC7500F0117F /* ServerListTableHeaderView.swift */; };
39E2FE0021FF814A00F0117F /* ThemeRoundedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39E2FDFF21FF814A00F0117F /* ThemeRoundedButton.swift */; };
39E42D1C2315288B00B82AC3 /* KeyCommands.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39E42D1B2315288B00B82AC3 /* KeyCommands.swift */; };
39E98B3E22797D1B009911F1 /* PublicLinkTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39E98B3D22797D1B009911F1 /* PublicLinkTableViewController.swift */; };
39E98B452279ACF5009911F1 /* PublicLinkEditTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39E98B442279ACF5009911F1 /* PublicLinkEditTableViewController.swift */; };
46B9D336BF7FE50321823888 /* Pods_ownCloudScreenshotsTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54199937F74A129BC74DEB0A /* Pods_ownCloudScreenshotsTests.framework */; };
Expand Down Expand Up @@ -615,9 +620,13 @@
3913214A22956D5700EF88F4 /* LibraryTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LibraryTableViewController.swift; sourceTree = "<group>"; };
392557FD2278703300E83F60 /* UISearchBar+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UISearchBar+Extension.swift"; sourceTree = "<group>"; };
394804D9225CBDBA00AA8183 /* BreadCrumbTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadCrumbTableViewController.swift; sourceTree = "<group>"; };
394E1FD9233E2D64009D2897 /* FavoriteAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FavoriteAction.swift; sourceTree = "<group>"; };
394E1FDB233E3750009D2897 /* UnfavoriteAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnfavoriteAction.swift; sourceTree = "<group>"; };
394E1FFE233E43F5009D2897 /* LinksAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinksAction.swift; sourceTree = "<group>"; };
39607CBB2225D480007B386D /* UITableViewController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableViewController+Extension.swift"; sourceTree = "<group>"; };
396BE4C22288A84C00B254A9 /* PendingSharesTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PendingSharesTableViewController.swift; sourceTree = "<group>"; };
396BE4C92289500E00B254A9 /* RoundedLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundedLabel.swift; sourceTree = "<group>"; };
396C82FA2319AFDD00938262 /* CollaborateAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollaborateAction.swift; sourceTree = "<group>"; };
3971B48E221B23FE006FB441 /* ThemeableColoredView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeableColoredView.swift; sourceTree = "<group>"; };
397328EE22D606AC006CFAA4 /* ImportFilesController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportFilesController.swift; sourceTree = "<group>"; };
39878B7321FB1DE800DBF693 /* UINavigationController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Extension.swift"; sourceTree = "<group>"; };
Expand All @@ -640,6 +649,7 @@
39DE75C722F960CF0064C1E2 /* SortMethodTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SortMethodTableViewController.swift; sourceTree = "<group>"; };
39E2FDEC21FDEC7500F0117F /* ServerListTableHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerListTableHeaderView.swift; sourceTree = "<group>"; };
39E2FDFF21FF814A00F0117F /* ThemeRoundedButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeRoundedButton.swift; sourceTree = "<group>"; };
39E42D1B2315288B00B82AC3 /* KeyCommands.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyCommands.swift; sourceTree = "<group>"; };
39E98B3D22797D1B009911F1 /* PublicLinkTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublicLinkTableViewController.swift; sourceTree = "<group>"; };
39E98B442279ACF5009911F1 /* PublicLinkEditTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublicLinkEditTableViewController.swift; sourceTree = "<group>"; };
3D753147564B1E4F47826109 /* Pods-ownCloud Screenshots Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ownCloud Screenshots Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ownCloud Screenshots Tests/Pods-ownCloud Screenshots Tests.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1044,6 +1054,7 @@
DC3BE0DB2077CC13002A0AC0 /* Client */,
DC7DF17C205140F400189B9A /* Server List */,
DCF4F1802051A91500189B9A /* Settings */,
39E42D152315286300B82AC3 /* Key Commands */,
DC422448207CAED60006A2A6 /* Theming */,
DCF4F1622051927200189B9A /* UI Elements */,
239F1314205A69240029F186 /* UIKit Extensions */,
Expand Down Expand Up @@ -1190,6 +1201,14 @@
path = Import;
sourceTree = "<group>";
};
39E42D152315286300B82AC3 /* Key Commands */ = {
isa = PBXGroup;
children = (
39E42D1B2315288B00B82AC3 /* KeyCommands.swift */,
);
path = "Key Commands";
sourceTree = "<group>";
};
4C51727422DE04BD001BC97F /* Tasks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1322,6 +1341,10 @@
6E586CF52199A70100F680C4 /* Actions+Extensions */ = {
isa = PBXGroup;
children = (
394E1FFE233E43F5009D2897 /* LinksAction.swift */,
394E1FDB233E3750009D2897 /* UnfavoriteAction.swift */,
394E1FD9233E2D64009D2897 /* FavoriteAction.swift */,
396C82FA2319AFDD00938262 /* CollaborateAction.swift */,
6E91F37D21ECA6FD009436D2 /* CopyAction.swift */,
6ED1B80A21A4004900E16C95 /* CreateFolderAction.swift */,
6E586CFF2199A78E00F680C4 /* DeleteAction.swift */,
Expand Down Expand Up @@ -2505,6 +2528,8 @@
DC3BE0DF2077CC14002A0AC0 /* ClientRootViewController.swift in Sources */,
4CB8ADE022DF5EC500F1FEBC /* UIAlertViewController+SystemPermissions.swift in Sources */,
396BE4CA2289500E00B254A9 /* RoundedLabel.swift in Sources */,
394E1FFF233E43F5009D2897 /* LinksAction.swift in Sources */,
396C82FB2319AFDD00938262 /* CollaborateAction.swift in Sources */,
DC854936218331CF00782BA8 /* UserInterfaceSettingsSection.swift in Sources */,
4C464BF42187AF1500D30602 /* PDFSearchTableViewCell.swift in Sources */,
DC1B2709209CF0D3004715E1 /* CertificateViewController.swift in Sources */,
Expand All @@ -2529,6 +2554,7 @@
39AFC3D1225E72FB00A6D3AE /* GroupSharingTableViewController.swift in Sources */,
DC9BFBBD20A1C37B007064B5 /* PasswordManagerAccess.swift in Sources */,
39A5135322608836002CF1AA /* OCShare+Extension.swift in Sources */,
39E42D1C2315288B00B82AC3 /* KeyCommands.swift in Sources */,
23D5241521491C670002C566 /* DisplayViewController.swift in Sources */,
DC0B379420514E4700189B9A /* ServerListBookmarkCell.swift in Sources */,
DC297965226E4D1100E01BC7 /* PushTransitionDelegate.swift in Sources */,
Expand Down Expand Up @@ -2621,6 +2647,7 @@
DC33939622E0747400DD3DA4 /* MakeAvailableOfflineAction.swift in Sources */,
6E586CFE2199A75900F680C4 /* MoveAction.swift in Sources */,
DC625148225CEB2C00736874 /* UploadFileAction.swift in Sources */,
394E1FDC233E3750009D2897 /* UnfavoriteAction.swift in Sources */,
DC4FEAE7209E3A7700D4476B /* OCIssue+Extension.swift in Sources */,
DC434D1320D7A8F100740056 /* UIAlertController+OCIssue.swift in Sources */,
39E2FDED21FDEC7500F0117F /* ServerListTableHeaderView.swift in Sources */,
Expand All @@ -2633,6 +2660,7 @@
39607CBC2225D480007B386D /* UITableViewController+Extension.swift in Sources */,
39104E10223991C8002FC02F /* UIButton+Extension.swift in Sources */,
DC422450207CB2500006A2A6 /* NSObject+ThemeApplication.swift in Sources */,
394E1FDA233E2D64009D2897 /* FavoriteAction.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
9 changes: 6 additions & 3 deletions ownCloud/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
OCExtensionManager.shared.addExtension(UploadFileAction.actionExtension)
OCExtensionManager.shared.addExtension(UploadMediaAction.actionExtension)
OCExtensionManager.shared.addExtension(UnshareAction.actionExtension)
OCExtensionManager.shared.addExtension(MakeAvailableOfflineAction.actionExtension)
OCExtensionManager.shared.addExtension(MakeUnavailableOfflineAction.actionExtension)

OCExtensionManager.shared.addExtension(BackgroundFetchUpdateTaskAction.taskExtension)
OCExtensionManager.shared.addExtension(InstantMediaUploadTaskExtension.taskExtension)
OCExtensionManager.shared.addExtension(MakeAvailableOfflineAction.actionExtension)
OCExtensionManager.shared.addExtension(MakeUnavailableOfflineAction.actionExtension)
OCExtensionManager.shared.addExtension(CollaborateAction.actionExtension)
OCExtensionManager.shared.addExtension(LinksAction.actionExtension)
OCExtensionManager.shared.addExtension(FavoriteAction.actionExtension)
OCExtensionManager.shared.addExtension(UnfavoriteAction.actionExtension)

Theme.shared.activeCollection = ThemeCollection(with: ThemeStyle.preferredStyle)

Expand Down
2 changes: 1 addition & 1 deletion ownCloud/Bookmarks/BookmarkInfoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class BookmarkInfoViewController: StaticTableViewController {

self?.present(alertController, animated: true, completion: nil)
}
}, title: "Include available offline files".localized, value: false, identifier: "row-include-available-offline")
}, title: "Include available offline files".localized, value: false, identifier: "row-include-available-offline")

let deleteLocalFilesRow = StaticTableViewRow(buttonWithAction: { [weak self] (row, _) in
if let bookmark = self?.bookmark {
Expand Down
13 changes: 10 additions & 3 deletions ownCloud/Client/Actions/Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,23 @@ extension OCExtensionLocationIdentifier {
static let moreFolder: OCExtensionLocationIdentifier = OCExtensionLocationIdentifier("moreFolder") //!< Present in "more" options for a whole folder
static let toolbar: OCExtensionLocationIdentifier = OCExtensionLocationIdentifier("toolbar") //!< Present in a toolbar
static let folderAction: OCExtensionLocationIdentifier = OCExtensionLocationIdentifier("folderAction") //!< Present in the alert sheet when the folder action bar button is pressed
static let keyboardShortcut: OCExtensionLocationIdentifier = OCExtensionLocationIdentifier("keyboardShortcut") //!< Currently used for UIKeyCommand
}

class ActionExtension: OCExtension {
// MARK: - Custom Instance Properties.
var name: String
var category: ActionCategory
var keyCommand: String?
var keyModifierFlags: UIKeyModifierFlags?

// MARK: - Init & Deinit
init(name: String, category: ActionCategory = .normal, identifier: OCExtensionIdentifier, locations: [OCExtensionLocationIdentifier]?, features: [String : Any]?, objectProvider: OCExtensionObjectProvider?, customMatcher: OCExtensionCustomContextMatcher?) {
init(name: String, category: ActionCategory = .normal, identifier: OCExtensionIdentifier, locations: [OCExtensionLocationIdentifier]?, features: [String : Any]?, objectProvider: OCExtensionObjectProvider?, customMatcher: OCExtensionCustomContextMatcher?, keyCommand: String?, keyModifierFlags: UIKeyModifierFlags?) {

self.name = name
self.category = category
self.keyCommand = keyCommand
self.keyModifierFlags = keyModifierFlags

super.init(identifier: identifier, type: .action, locations: locations, features: features, objectProvider: objectProvider, customMatcher: customMatcher)
}
Expand Down Expand Up @@ -104,6 +109,8 @@ class Action : NSObject {
class var identifier : OCExtensionIdentifier? { return nil }
class var category : ActionCategory? { return .normal }
class var name : String? { return nil }
class var keyCommand : String? { return nil }
class var keyModifierFlags : UIKeyModifierFlags? { return nil }
class var locations : [OCExtensionLocationIdentifier]? { return nil }
class var features : [String : Any]? { return nil }

Expand Down Expand Up @@ -134,7 +141,7 @@ class Action : NSObject {
// Additional filtering (f.ex. via OCClassSettings, Settings) goes here
}

return ActionExtension(name: name!, category: category!, identifier: identifier!, locations: locations, features: features, objectProvider: objectProvider, customMatcher: customMatcher)
return ActionExtension(name: name!, category: category!, identifier: identifier!, locations: locations, features: features, objectProvider: objectProvider, customMatcher: customMatcher, keyCommand: keyCommand, keyModifierFlags: keyModifierFlags)
}

// MARK: - Extension matching
Expand Down Expand Up @@ -246,7 +253,7 @@ class Action : NSObject {
var actionWillRunHandler: ActionWillRunHandler? // to be filled before calling run(), provideStaticRow(), provideContextualAction(), etc. if desired

// MARK: - Action implementation
func perform() {
@objc func perform() {
self.willRun({
OnMainThread {
self.run()
Expand Down
54 changes: 54 additions & 0 deletions ownCloud/Client/Actions/Actions+Extensions/CollaborateAction.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//
// CollaborateAction.swift
// ownCloud
//
// Created by Matthias Hühne on 30.08.19.
// Copyright © 2019 ownCloud GmbH. All rights reserved.
//

/*
* Copyright (C) 2019, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
* For distribution utilizing Apple mechanisms please see https://owncloud.org/contribute/iOS-license-exception/
* You should have received a copy of this license along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.en.html>.
*
*/

import UIKit
import ownCloudSDK

class CollaborateAction: Action {
override class var identifier : OCExtensionIdentifier? { return OCExtensionIdentifier("com.owncloud.action.collaborate") }
override class var category : ActionCategory? { return .normal }
override class var name : String { return "Sharing".localized }
override class var locations : [OCExtensionLocationIdentifier]? { return [.keyboardShortcut] }
override class var keyCommand : String? { return "S" }
override class var keyModifierFlags: UIKeyModifierFlags? { return [.command] }

// MARK: - Extension matching
override class func applicablePosition(forContext: ActionContext) -> ActionPosition {
if forContext.items.count == 1, let core = forContext.core, core.connectionStatus == .online, core.connection.capabilities?.sharingAPIEnabled == 1 {
return .first
}

return .none
}

// MARK: - Action implementation
override func run() {
guard context.items.count == 1, let item = context.items.first, let viewController = context.viewController, let core = self.core else {
self.completed(with: NSError(ocError: .insufficientParameters))
return
}

let groupSharingController = GroupSharingTableViewController(core: core, item: item)
let navigationController = ThemeNavigationController(rootViewController: groupSharingController)
viewController.present(navigationController, animated: true)
}

override class func iconForLocation(_ location: OCExtensionLocationIdentifier) -> UIImage? {
return UIImage(named: "group")
}
}
4 changes: 3 additions & 1 deletion ownCloud/Client/Actions/Actions+Extensions/CopyAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class CopyAction : Action {
override class var identifier : OCExtensionIdentifier? { return OCExtensionIdentifier("com.owncloud.action.copy") }
override class var category : ActionCategory? { return .normal }
override class var name : String? { return "Copy".localized }
override class var locations : [OCExtensionLocationIdentifier]? { return [.moreItem, .moreFolder, .toolbar] }
override class var locations : [OCExtensionLocationIdentifier]? { return [.moreItem, .moreFolder, .toolbar, .keyboardShortcut] }
override class var keyCommand : String? { return "C" }
override class var keyModifierFlags: UIKeyModifierFlags? { return [.command, .alternate] }

// MARK: - Extension matching
override class func applicablePosition(forContext: ActionContext) -> ActionPosition {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class CreateFolderAction : Action {
override class var identifier : OCExtensionIdentifier? { return OCExtensionIdentifier("com.owncloud.action.createFolder") }
override class var category : ActionCategory? { return .normal }
override class var name : String? { return "Create folder".localized }
override class var locations : [OCExtensionLocationIdentifier]? { return [ .folderAction ] }
override class var locations : [OCExtensionLocationIdentifier]? { return [.folderAction, .keyboardShortcut] }
override class var keyCommand : String? { return "N" }
override class var keyModifierFlags: UIKeyModifierFlags? { return [.command] }

// MARK: - Extension matching
override class func applicablePosition(forContext: ActionContext) -> ActionPosition {
Expand Down
Loading