aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-05-24 09:02:59 +0200
committerGitHub <noreply@github.com>2023-05-24 09:02:59 +0200
commit4811a02740bf39d892be6dd730ca010e8b31ff94 (patch)
tree8253bfd09c3ff6e7225203460c66685ca01f060e /apps/files_sharing
parent294035f523a0149dcab5eb301ec39e99d09f7adb (diff)
parent7d02d98d9ebff664322dcf3f723db35fdebbed2d (diff)
downloadnextcloud-server-4811a02740bf39d892be6dd730ca010e8b31ff94.tar.gz
nextcloud-server-4811a02740bf39d892be6dd730ca010e8b31ff94.zip
Merge pull request #38329 from nextcloud/pulsejet/patch-webpack
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/src/files_sharing_tab.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/src/files_sharing_tab.js b/apps/files_sharing/src/files_sharing_tab.js
index 96bd207fa8a..602992320d1 100644
--- a/apps/files_sharing/src/files_sharing_tab.js
+++ b/apps/files_sharing/src/files_sharing_tab.js
@@ -23,8 +23,8 @@
import Vue from 'vue'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
+import { getRequestToken } from '@nextcloud/auth'
-import SharingTab from './views/SharingTab.vue'
import ShareSearch from './services/ShareSearch.js'
import ExternalLinkActions from './services/ExternalLinkActions.js'
import ExternalShareActions from './services/ExternalShareActions.js'
@@ -33,6 +33,9 @@ import TabSections from './services/TabSections.js'
// eslint-disable-next-line n/no-missing-import, import/no-unresolved
import ShareVariant from '@mdi/svg/svg/share-variant.svg?raw'
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(getRequestToken())
+
// Init Sharing Tab Service
if (!window.OCA.Sharing) {
window.OCA.Sharing = {}
@@ -46,7 +49,6 @@ Vue.prototype.t = t
Vue.prototype.n = n
// Init Sharing tab component
-const View = Vue.extend(SharingTab)
let TabInstance = null
window.addEventListener('DOMContentLoaded', function() {
@@ -57,6 +59,9 @@ window.addEventListener('DOMContentLoaded', function() {
iconSvg: ShareVariant,
async mount(el, fileInfo, context) {
+ const SharingTab = (await import('./views/SharingTab.vue')).default
+ const View = Vue.extend(SharingTab)
+
if (TabInstance) {
TabInstance.$destroy()
}