diff options
author | Louis Chemineau <louis@chmn.me> | 2022-01-26 15:33:36 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-01-26 17:58:43 +0100 |
commit | be968a8841587f6e4034ff32880d1ceca4a827bd (patch) | |
tree | 359a57ca4304c25fdb04051519ab9c183686f488 /apps/files_sharing/src/components/SharingEntryLink.vue | |
parent | a145edd00db95135bee6f584e21301267fb5ac16 (diff) | |
download | nextcloud-server-be968a8841587f6e4034ff32880d1ceca4a827bd.tar.gz nextcloud-server-be968a8841587f6e4034ff32880d1ceca4a827bd.zip |
Use @nextcloud/sharing in files and files_sharing
Signed-off-by: Louis Chemineau <louis@chmn.me>
Update tests
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index 5a49a1d4976..9fefa9b6f90 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -329,6 +329,7 @@ <script> import { generateUrl } from '@nextcloud/router' +import { Type as ShareTypes } from '@nextcloud/sharing' import Vue from 'vue' import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' @@ -662,8 +663,8 @@ export default { externalLinkActions() { // filter only the registered actions for said link return this.ExternalShareActions.actions - .filter(action => action.shareType.includes(OC.Share.SHARE_TYPE_LINK) - || action.shareType.includes(OC.Share.SHARE_TYPE_EMAIL)) + .filter(action => action.shareType.includes(ShareTypes.SHARE_TYPE_LINK) + || action.shareType.includes(ShareTypes.SHARE_TYPE_EMAIL)) }, isPasswordPolicyEnabled() { @@ -682,7 +683,7 @@ export default { } const shareDefaults = { - share_type: OC.Share.SHARE_TYPE_LINK, + share_type: ShareTypes.SHARE_TYPE_LINK, } if (this.config.isDefaultExpireDateEnforced) { // default is empty string if not set @@ -756,7 +757,7 @@ export default { const path = (this.fileInfo.path + '/' + this.fileInfo.name).replace('//', '/') const newShare = await this.createShare({ path, - shareType: OC.Share.SHARE_TYPE_LINK, + shareType: ShareTypes.SHARE_TYPE_LINK, password: share.password, expireDate: share.expireDate, // we do not allow setting the publicUpload |