aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/unsupported-browser.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/unsupported-browser.js')
-rw-r--r--core/src/unsupported-browser.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/core/src/unsupported-browser.js b/core/src/unsupported-browser.js
new file mode 100644
index 00000000000..d54b1c8fb24
--- /dev/null
+++ b/core/src/unsupported-browser.js
@@ -0,0 +1,23 @@
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+import { generateUrl } from '@nextcloud/router'
+import Vue from 'vue'
+
+import { browserStorageKey } from './utils/RedirectUnsupportedBrowsers.js'
+import browserStorage from './services/BrowserStorageService.js'
+import UnsupportedBrowser from './views/UnsupportedBrowser.vue'
+
+// If the ignore token is set, redirect
+if (browserStorage.getItem(browserStorageKey) === 'true') {
+ window.location = generateUrl('/')
+}
+
+export default new Vue({
+ el: '#unsupported-browser',
+ // eslint-disable-next-line vue/match-component-file-name
+ name: 'UnsupportedBrowserRoot',
+ render: h => h(UnsupportedBrowser),
+})