-
Notifications
You must be signed in to change notification settings - Fork 127
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/url-shortcuts] Open and create .url shortcut files #1344
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to remove the URLDisplayViewController. Instead I would choose one of the following approaches:
- show an
UIAlertViewController
with question "Open Link?", on "Yes" it opens the link in the system browser - open the link directly In-App in a
SafariViewController
The detail view does not give any further content to the user and can be removed in my opinion.
@hosy Thanks for the feedback. The improved implementation now allows opening shortcut files directly from the file list and brings up an alert asking the user whether the URL should be opened: I still kept the viewer for shortcut files around for those cases where a user views files in the same folder and eventually reaches a shortcut file when swiping through. |
I did a first look into the feature (before QA - CR), with a couple of comments on my side
Will do deeper testing after CR but it really looks good at this point. |
@jesmrec Thanks for the feedback. I've trimmed down the alert asking for opening the link and removed the browser reference entirely. Also, the error message when the target of a shortcut can't be found is now on point and informative (or at least I hope so 😉). I also added a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome feature and implementation!
QA checks:
|
(1)In oC10 server:
Current: not opened, also the thumbnail in file list is not correct NOTE: same behaviour when files are shortcuted. iPhoneXR iOS17 |
(2)As a question: shortcuts over files are only allowed over items in the same account, right? not posible to create a shortcut that points to a file in other account attached to the device (moving to there). |
@jesmrec Regarding (1): The current implementation supporting <?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/files/admin/Files.url</d:href>
<d:propstat>
<d:prop>
<d:resourcetype/>
<d:getlastmodified>Fri, 03 May 2024 15:48:47 GMT</d:getlastmodified>
<d:getcontentlength>51</d:getcontentlength>
<d:getcontenttype>application/octet-stream</d:getcontenttype>
<d:getetag>"ba2042d735ee8e0bd77c95655aedb8e6"</d:getetag>
<oc:id>00009374oc60lgadtioc</oc:id>
<oc:size>51</oc:size>
<oc:permissions>RDNVW</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:share-types/>
<oc:owner-id>admin</oc:owner-id>
<oc:owner-display-name>admin</oc:owner-display-name>
<oc:checksums>
<oc:checksum>SHA1:9405c1b721fdd574d50d639dc14983f8906f45fd MD5:cdc846c7f7b2980ca79b452fb3015f9b ADLER32:f32e1229</oc:checksum>
</oc:checksums>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus> Once OC10 returns Regarding (2): |
That's approved on my side. |
Before merging, the branch should point to a different base branch like |
406271c
to
5a6cc66
Compare
- INIFile+URLFile: simple extension for quickly parsing and composing .url files - URLDisplayViewController: stub implementation to handle .url files
…ng shortcut URL - CreateURLShortcutAction: new action to create a URL shortcut in a folder - design and add "text-uri-list" icon
… open files from file lists, overriding viewers if needed - OCItem+Interactions: add support for `.directOpen` actions - INIFile+ShortcutResolution: implement support for shortcuts to other items on the same server - ShortcutFileDisplayViewController: implement support for shortcuts to other items on the same server, including an item preview - add new action OpenShortcutFileAction - hooks into the `.directOpen` location - uses INIFile+ShortcutResolution to open the contained link or jump to the targeted location - asks users before opening links - rename files for better distinctibility: - URLDisplayViewController -> ShortcutFileDisplayViewController - CreateURLShortcutAction -> CreateShortcutFileAction - OCItem+UniversalItemListCellContentProvider: fix warning
- CreateShortcutFileAction: break out creation functionality into its own view controller - CreateShortcutFileViewController: - dedicated view controller for creating shortcuts - allows picking files and folders for shortcuts to point to and presents an embedded preview for them - improved error handling - INIFile: fix formatting bug that could accidentally leak memory into the .url file - ClientLocationPicker: add ability to allow picking files via new .allowFileSelection property
…targeting unavailable/detached drives and removes the respective policies - adapt app code to SDK API changes
- improved error reporting for when the target of a shortcut can't be accessed / found - simplified and generalized prompt for opening the URL a shortcut points to
…ShortcutResolution: add MDM option to allow all shortcuts, only URL shortcuts, only item shortcuts or no shortcuts
…root, the name for the shortcut was not derived correctly
60834c9
to
86f267d
Compare
- Localizable.strings: re-add strings auto-removed by git during rebase
Description
Adds the ability to open shortcuts stored in
.url
files as well as to create them.The MDM option
action.open-shortcut-mode
provides control over what kind of shortcuts (URLs, items) should be allowed to be opened. Defaults toall
.Screenshots (if appropriate):
+
buttonTypes of changes