aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/src/main-admin.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/src/main-admin.js')
-rw-r--r--apps/federatedfilesharing/src/main-admin.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/src/main-admin.js b/apps/federatedfilesharing/src/main-admin.js
new file mode 100644
index 00000000000..9e3e25fe7cb
--- /dev/null
+++ b/apps/federatedfilesharing/src/main-admin.js
@@ -0,0 +1,25 @@
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+import Vue from 'vue'
+import { getCSPNonce } from '@nextcloud/auth'
+import { translate as t } from '@nextcloud/l10n'
+import { loadState } from '@nextcloud/initial-state'
+
+import AdminSettings from './components/AdminSettings.vue'
+
+__webpack_nonce__ = getCSPNonce()
+
+Vue.mixin({
+ methods: {
+ t,
+ },
+})
+
+const internalOnly = loadState('federatedfilesharing', 'internalOnly', false)
+
+if (!internalOnly) {
+ const AdminSettingsView = Vue.extend(AdminSettings)
+ new AdminSettingsView().$mount('#vue-admin-federated')
+}