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/url-shortcuts] Open and create .url shortcut files #1344

Merged
merged 12 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ disabled_rules:
- function_parameter_count
- comment_spacing
- unused_closure_parameter
- control_statement
- nesting
- comma
custom_rules:
Expand Down
2 changes: 1 addition & 1 deletion PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
Expand Down
Binary file added design/text-uri-list.idraw
Binary file not shown.
60 changes: 60 additions & 0 deletions doc/CONFIGURATION.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
"description" : "Create folder",
"value" : "com.owncloud.action.createFolder"
},
{
"description" : "Create shortcut",
"value" : "com.owncloud.action.createShortcutFile"
},
{
"description" : "Cut",
"value" : "com.owncloud.action.cutpasteboard"
Expand Down Expand Up @@ -65,6 +69,10 @@
"description" : "Move",
"value" : "com.owncloud.action.move"
},
{
"description" : "Open shortcut",
"value" : "com.owncloud.action.openShortcutFile"
},
{
"description" : "Open in",
"value" : "com.owncloud.action.openin"
Expand Down Expand Up @@ -179,6 +187,10 @@
"description" : "Create folder",
"value" : "com.owncloud.action.createFolder"
},
{
"description" : "Create shortcut",
"value" : "com.owncloud.action.createShortcutFile"
},
{
"description" : "Cut",
"value" : "com.owncloud.action.cutpasteboard"
Expand Down Expand Up @@ -207,6 +219,10 @@
"description" : "Move",
"value" : "com.owncloud.action.move"
},
{
"description" : "Open shortcut",
"value" : "com.owncloud.action.openShortcutFile"
},
{
"description" : "Open in",
"value" : "com.owncloud.action.openin"
Expand Down Expand Up @@ -346,6 +362,38 @@
"status" : "advanced",
"type" : "string"
},
{
"autoExpansion" : "none",
"category" : "Actions",
"categoryTag" : "actions",
"classIdentifier" : "action",
"className" : "ownCloudAppShared.Action",
"defaultValue" : "all",
"description" : "Determines how the app opens shortcut files (ending in `.url`) app.",
"flatIdentifier" : "action.open-shortcut-mode",
"key" : "open-shortcut-mode",
"label" : "Open Shortcut mode",
"possibleValues" : [
{
"description" : "Open all shortcut files, targeting both links (web and other) and items.",
"value" : "all"
},
{
"description" : "Open only shortcut files that target items.",
"value" : "items-only"
},
{
"description" : "Open only shortcut files that target links (web and other).",
"value" : "links-only"
},
{
"description" : "Do not open shortcut files.",
"value" : "none"
}
],
"status" : "advanced",
"type" : "string"
},
{
"autoExpansion" : "none",
"category" : "App",
Expand Down Expand Up @@ -1758,6 +1806,10 @@
"description" : "Extension with the identifier com.owncloud.action.createFolder.",
"value" : "com.owncloud.action.createFolder"
},
{
"description" : "Extension with the identifier com.owncloud.action.createShortcutFile.",
"value" : "com.owncloud.action.createShortcutFile"
},
{
"description" : "Extension with the identifier com.owncloud.action.cutpasteboard.",
"value" : "com.owncloud.action.cutpasteboard"
Expand Down Expand Up @@ -1790,6 +1842,10 @@
"description" : "Extension with the identifier com.owncloud.action.move.",
"value" : "com.owncloud.action.move"
},
{
"description" : "Extension with the identifier com.owncloud.action.openShortcutFile.",
"value" : "com.owncloud.action.openShortcutFile"
},
{
"description" : "Extension with the identifier com.owncloud.action.openin.",
"value" : "com.owncloud.action.openin"
Expand Down Expand Up @@ -1902,6 +1958,10 @@
"description" : "Extension with the identifier org.owncloud.ql_preview.",
"value" : "org.owncloud.ql_preview"
},
{
"description" : "Extension with the identifier org.owncloud.url-shortcut.",
"value" : "org.owncloud.url-shortcut"
},
{
"description" : "Extension with the identifier org.owncloud.webview.",
"value" : "org.owncloud.webview"
Expand Down
47 changes: 47 additions & 0 deletions doc/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ tag::actions[]
! `com.owncloud.action.createFolder`
! Create folder

! `com.owncloud.action.createShortcutFile`
! Create shortcut

! `com.owncloud.action.cutpasteboard`
! Cut

Expand All @@ -56,6 +59,9 @@ tag::actions[]
! `com.owncloud.action.move`
! Move

! `com.owncloud.action.openShortcutFile`
! Open shortcut

! `com.owncloud.action.openin`
! Open in

Expand Down Expand Up @@ -142,6 +148,9 @@ action.create-document-mode
! `com.owncloud.action.createFolder`
! Create folder

! `com.owncloud.action.createShortcutFile`
! Create shortcut

! `com.owncloud.action.cutpasteboard`
! Cut

Expand All @@ -163,6 +172,9 @@ action.create-document-mode
! `com.owncloud.action.move`
! Move

! `com.owncloud.action.openShortcutFile`
! Open shortcut

! `com.owncloud.action.openin`
! Open in

Expand Down Expand Up @@ -271,6 +283,32 @@ action.open-in-web-app-mode

|advanced `candidate`

|**Open Shortcut mode** +
+
action.open-shortcut-mode
|string
|`all`
|Determines how the app opens shortcut files (ending in `.url`) app.
[cols="1,1"]
!===
! Value
! Description
! `all`
! Open all shortcut files, targeting both links (web and other) and items.

! `items-only`
! Open only shortcut files that target items.

! `links-only`
! Open only shortcut files that target links (web and other).

! `none`
! Do not open shortcut files.

!===

|advanced `candidate`

|===
end::actions[]

Expand Down Expand Up @@ -1098,6 +1136,9 @@ tag::extensions[]
! `com.owncloud.action.createFolder`
! Extension with the identifier com.owncloud.action.createFolder.

! `com.owncloud.action.createShortcutFile`
! Extension with the identifier com.owncloud.action.createShortcutFile.

! `com.owncloud.action.cutpasteboard`
! Extension with the identifier com.owncloud.action.cutpasteboard.

Expand All @@ -1122,6 +1163,9 @@ tag::extensions[]
! `com.owncloud.action.move`
! Extension with the identifier com.owncloud.action.move.

! `com.owncloud.action.openShortcutFile`
! Extension with the identifier com.owncloud.action.openShortcutFile.

! `com.owncloud.action.openin`
! Extension with the identifier com.owncloud.action.openin.

Expand Down Expand Up @@ -1206,6 +1250,9 @@ tag::extensions[]
! `org.owncloud.ql_preview`
! Extension with the identifier org.owncloud.ql_preview.

! `org.owncloud.url-shortcut`
! Extension with the identifier org.owncloud.url-shortcut.

! `org.owncloud.webview`
! Extension with the identifier org.owncloud.webview.

Expand Down
1 change: 1 addition & 0 deletions img/filetypes-tvg/text-uri-list.tvg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"viewBox":"{{0, 0}, {16, 16}}","image":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE svg PUBLIC \"-\/\/W3C\/\/DTD SVG 1.1\/\/EN\" \"http:\/\/www.w3.org\/Graphics\/SVG\/1.1\/DTD\/svg11.dtd\">\n<svg version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" x=\"0\" y=\"0\" width=\"16\" height=\"16\" viewBox=\"0, 0, 16, 16\">\n <path d=\"M10.443,4.911 L10.735,4.921 L10.942,5.058 C11.186,5.302 11.186,5.698 10.942,5.942 L5.942,10.942 C5.698,11.186 5.302,11.186 5.058,10.942 C4.814,10.698 4.814,10.302 5.058,10.058 L10.058,5.058 C10.288,4.901 10.16,4.952 10.443,4.911 z\" fill=\"{{fileFillColor}}\"\/>\n <path d=\"M13.001,1 C14.105,1 15,1.895 15,2.999 L15,13.001 C15,14.105 14.105,15 13.001,15 L2.999,15 C1.895,15 1,14.105 1,13.001 L1,2.999 C1,1.895 1.895,1 2.999,1 L13.001,1 z M13.001,2.25 L2.999,2.25 C2.585,2.25 2.25,2.585 2.25,2.999 L2.25,13.001 C2.25,13.415 2.585,13.75 2.999,13.75 L13.001,13.75 C13.415,13.75 13.75,13.415 13.75,13.001 L13.75,2.999 C13.75,2.585 13.415,2.25 13.001,2.25 z\" fill=\"{{fileFillColor}}\"\/>\n <path d=\"M10.5,4.875 C10.845,4.875 11.125,5.155 11.125,5.5 C11.125,5.845 10.845,6.125 10.5,6.125 L6.5,6.125 C6.155,6.125 5.875,5.845 5.875,5.5 C5.875,5.155 6.155,4.875 6.5,4.875 L10.5,4.875 z\" fill=\"{{fileFillColor}}\"\/>\n <path d=\"M10.5,4.875 C10.845,4.875 11.125,5.155 11.125,5.5 L11.125,9.5 C11.125,9.845 10.845,10.125 10.5,10.125 C10.155,10.125 9.875,9.845 9.875,9.5 L9.875,5.5 C9.875,5.155 10.155,4.875 10.5,4.875 z\" fill=\"{{fileFillColor}}\"\/>\n<\/svg>\n","defaults":{"fileFillColor":"#969696"}}
8 changes: 8 additions & 0 deletions img/filetypes/text-uri-list.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.