From 2d98cd1dafb3adbcad5d9af9245f44aec583de2e Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Wed, 19 Oct 2022 09:08:21 +0200 Subject: Add config and fix selenium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- core/src/main.js | 2 +- core/src/services/BrowserStorageService.js | 4 ++-- core/src/services/BrowsersListService.js | 2 +- core/src/services/LoggerService.js | 28 --------------------------- core/src/unsupported-browser.js | 2 +- core/src/utils/RedirectUnsupportedBrowsers.js | 6 +++--- core/src/views/UnsupportedBrowser.vue | 14 ++++++++------ 7 files changed, 16 insertions(+), 42 deletions(-) delete mode 100644 core/src/services/LoggerService.js (limited to 'core/src') diff --git a/core/src/main.js b/core/src/main.js index 959110e86a4..a8abbe5ac02 100644 --- a/core/src/main.js +++ b/core/src/main.js @@ -38,7 +38,7 @@ import { initCore } from './init.js' import { registerAppsSlideToggle } from './OC/apps.js' import { testSupportedBrowser } from './utils/RedirectUnsupportedBrowsers.js' -if (window.TESTING === undefined) { +if (!window.TESTING && !OC?.config?.no_unsupported_browser_warning) { testSupportedBrowser() } diff --git a/core/src/services/BrowserStorageService.js b/core/src/services/BrowserStorageService.js index d383e1caaaf..3ecf52f423d 100644 --- a/core/src/services/BrowserStorageService.js +++ b/core/src/services/BrowserStorageService.js @@ -3,7 +3,7 @@ * * @author John Molakvoæ * - * @license GNU AGPL version 3 or any later version + * @license AGPL-3.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -22,7 +22,7 @@ import { getBuilder } from '@nextcloud/browser-storage' -export default getBuilder('nextcloud') +export default getBuilder('core') .clearOnLogout() .persist() .build() diff --git a/core/src/services/BrowsersListService.js b/core/src/services/BrowsersListService.js index c5d546665dc..5027489e8e9 100644 --- a/core/src/services/BrowsersListService.js +++ b/core/src/services/BrowsersListService.js @@ -3,7 +3,7 @@ * * @author John Molakvoæ * - * @license GNU AGPL version 3 or any later version + * @license AGPL-3.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as diff --git a/core/src/services/LoggerService.js b/core/src/services/LoggerService.js deleted file mode 100644 index f0b8fc9e61d..00000000000 --- a/core/src/services/LoggerService.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @copyright 2021 John Molakvoæ - * - * @author John Molakvoæ - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -import { getLoggerBuilder } from '@nextcloud/logger' - -export default getLoggerBuilder() - .setApp('core') - .detectUser() - .build() diff --git a/core/src/unsupported-browser.js b/core/src/unsupported-browser.js index cac5f145a7b..59b4154ec6b 100644 --- a/core/src/unsupported-browser.js +++ b/core/src/unsupported-browser.js @@ -3,7 +3,7 @@ * * @author John Molakvoæ * - * @license GNU AGPL version 3 or any later version + * @license AGPL-3.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as diff --git a/core/src/utils/RedirectUnsupportedBrowsers.js b/core/src/utils/RedirectUnsupportedBrowsers.js index 74074cec558..dd6bb99b94d 100644 --- a/core/src/utils/RedirectUnsupportedBrowsers.js +++ b/core/src/utils/RedirectUnsupportedBrowsers.js @@ -3,7 +3,7 @@ * * @author John Molakvoæ * - * @license GNU AGPL version 3 or any later version + * @license AGPL-3.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -23,10 +23,10 @@ import { generateUrl } from '@nextcloud/router' import { supportedBrowsersRegExp } from '../services/BrowsersListService.js' import browserStorage from '../services/BrowserStorageService.js' -import logger from '../services/LoggerService.js' +import logger from '../logger.js' -const redirectPath = '/unsupported' export const browserStorageKey = 'unsupported-browser-ignore' +const redirectPath = '/unsupported' const isBrowserOverridden = browserStorage.getItem(browserStorageKey) === 'true' diff --git a/core/src/views/UnsupportedBrowser.vue b/core/src/views/UnsupportedBrowser.vue index ef2a33ca213..dac2593b029 100644 --- a/core/src/views/UnsupportedBrowser.vue +++ b/core/src/views/UnsupportedBrowser.vue @@ -57,7 +57,7 @@ import Web from 'vue-material-design-icons/Web' import { browserStorageKey } from '../utils/RedirectUnsupportedBrowsers.js' import { supportedBrowsers } from '../services/BrowsersListService.js' import browserStorage from '../services/BrowserStorageService.js' -import logger from '../services/LoggerService.js' +import logger from '../logger.js' logger.debug('Supported browsers', { supportedBrowsers }) @@ -159,13 +159,15 @@ export default {