aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/mixins/SharesMixin.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/src/mixins/SharesMixin.js')
-rw-r--r--apps/files_sharing/src/mixins/SharesMixin.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js
index 4b51e4a97fb..55e31872da1 100644
--- a/apps/files_sharing/src/mixins/SharesMixin.js
+++ b/apps/files_sharing/src/mixins/SharesMixin.js
@@ -5,6 +5,7 @@
import { getCurrentUser } from '@nextcloud/auth'
import { showError, showSuccess } from '@nextcloud/dialogs'
+import { ShareType } from '@nextcloud/sharing'
import { emit } from '@nextcloud/event-bus'
import { fetchNode } from '../services/WebdavClient.ts'
@@ -13,7 +14,6 @@ import debounce from 'debounce'
import Share from '../models/Share.ts'
import SharesRequests from './ShareRequests.js'
-import ShareTypes from './ShareTypes.js'
import Config from '../services/ConfigService.ts'
import logger from '../services/logger.ts'
@@ -22,7 +22,7 @@ import {
} from '../lib/SharePermissionsToolBox.js'
export default {
- mixins: [SharesRequests, ShareTypes],
+ mixins: [SharesRequests],
props: {
fileInfo: {
@@ -44,6 +44,7 @@ export default {
return {
config: new Config(),
node: null,
+ ShareType,
// errors helpers
errors: {},
@@ -114,10 +115,10 @@ export default {
},
isPublicShare() {
const shareType = this.share.shareType ?? this.share.type
- return [this.SHARE_TYPES.SHARE_TYPE_LINK, this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(shareType)
+ return [ShareType.Link, ShareType.Email].includes(shareType)
},
isRemoteShare() {
- return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP || this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE
+ return this.share.type === ShareType.RemoteGroup || this.share.type === ShareType.Remote
},
isShareOwner() {
return this.share && this.share.owner === getCurrentUser().uid