You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/core/src/unsupported-browser.js

24 lines
730 B
JavaScript

/**
* 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),
})