Skip to content

Commit

Permalink
Merge pull request #11661 from owncloud/feat/link-type-naming
Browse files Browse the repository at this point in the history
feat: adjust link type descriptions and remove "Uploader" type
  • Loading branch information
kulmann authored Sep 26, 2024
2 parents cf88474 + a261943 commit 420cf4a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/enhancement-remove-uploader-link-type
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Remove link type "Uploader"

The link type "Uploader" has been removed because it's almost the same as "Editor". Existing links of this type still work though.

https://github.com/owncloud/web/pull/11661
https://github.com/owncloud/web/issues/11381
17 changes: 5 additions & 12 deletions packages/web-pkg/src/composables/links/useLinkTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ export const useLinkTypes = () => {
}

if (isFolder) {
return [
SharingLinkType.View,
SharingLinkType.Upload,
SharingLinkType.Edit,
SharingLinkType.CreateOnly
]
return [SharingLinkType.View, SharingLinkType.Edit, SharingLinkType.CreateOnly]
}

return [SharingLinkType.View, SharingLinkType.Edit]
Expand All @@ -58,27 +53,25 @@ export const useLinkTypes = () => {
{
id: SharingLinkType.View,
displayName: $gettext('Can view'),
description: $gettext('Anyone with the link can view and download.'),
description: $gettext('View, download'),
icon: 'eye'
},
{
id: SharingLinkType.Upload,
displayName: $gettext('Can upload'),
description: $gettext('Anyone with the link can view, download and upload.'),
description: $gettext('View, upload, download'),
icon: 'upload'
},
{
id: SharingLinkType.Edit,
displayName: $gettext('Can edit'),
description: $gettext('Anyone with the link can view, download and edit.'),
description: $gettext('View, upload, edit, download, delete'),
icon: 'pencil'
},
{
id: SharingLinkType.CreateOnly,
displayName: $gettext('Secret File Drop'),
description: $gettext(
'Anyone with the link can only upload, existing content is not revealed.'
),
description: $gettext('Upload only, existing content is not revealed'),
icon: 'inbox-unarchive'
}
] satisfies ShareRole[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ describe('useLinkTypes', () => {
setup: ({ getAvailableLinkTypes }) => {
expect(getAvailableLinkTypes({ isFolder: true })).toEqual([
SharingLinkType.View,
SharingLinkType.Upload,
SharingLinkType.Edit,
SharingLinkType.CreateOnly
])
Expand Down

0 comments on commit 420cf4a

Please sign in to comment.