aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/unsupported-browser.js
blob: d54b1c8fb24b1e1d537a131a546e09b3c4ea3089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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),
})