summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-10-19 09:08:21 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-10-19 10:04:51 +0200
commit2d98cd1dafb3adbcad5d9af9245f44aec583de2e (patch)
treeca2f867e50680bed2911a94b35d98617b7252b59 /core/src
parenta6684da737c40e3d05b3a88bf6f8c8649364587b (diff)
downloadnextcloud-server-2d98cd1dafb3adbcad5d9af9245f44aec583de2e.tar.gz
nextcloud-server-2d98cd1dafb3adbcad5d9af9245f44aec583de2e.zip
Add config and fix selenium
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main.js2
-rw-r--r--core/src/services/BrowserStorageService.js4
-rw-r--r--core/src/services/BrowsersListService.js2
-rw-r--r--core/src/services/LoggerService.js28
-rw-r--r--core/src/unsupported-browser.js2
-rw-r--r--core/src/utils/RedirectUnsupportedBrowsers.js6
-rw-r--r--core/src/views/UnsupportedBrowser.vue14
7 files changed, 16 insertions, 42 deletions
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æ <skjnldsv@protonmail.com>
*
- * @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æ <skjnldsv@protonmail.com>
*
- * @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æ <skjnldsv@protonmail.com>
- *
- * @author John Molakvoæ <skjnldsv@protonmail.com>
- *
- * @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 <http://www.gnu.org/licenses/>.
- *
- */
-
-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æ <skjnldsv@protonmail.com>
*
- * @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æ <skjnldsv@protonmail.com>
*
- * @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 {
</script>
<style lang="scss" scoped>
+$spacing: 30px;
+
.content-unsupported-browser {
display: flex;
justify-content: center;
width: 400px;
- max-width: 90vw;
+ max-width: calc(90vw - 2 * $spacing);
margin: auto;
- padding: 30px;
+ padding: $spacing;
.empty-content {
margin: 0;
@@ -176,12 +178,12 @@ export default {
&__continue {
display: block;
- margin: 20px auto;
+ margin: $spacing auto;
}
&__list {
- margin-top: 60px;
- margin-bottom: 30px;
+ margin-top: 2 * $spacing;
+ margin-bottom: $spacing;
li {
text-align: left;
}