diff options
author | Devlin Junker <devlin.junker@gmail.com> | 2022-11-09 21:52:11 -0800 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-11-17 14:50:53 +0100 |
commit | c6b4bcc00e5202e85388a0624d149e8b1df386f8 (patch) | |
tree | 7063a29710dfd0a363f3462fee8a0e8185488e15 /js-old/app | |
parent | 760c44288256b104b662ade7a892a6ec0b898851 (diff) |
upmerging master into vue-rewrite
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
Diffstat (limited to 'js-old/app')
-rw-r--r-- | js-old/app/Config.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js-old/app/Config.js b/js-old/app/Config.js index f7c62e7ae..441c6e54d 100644 --- a/js-old/app/Config.js +++ b/js-old/app/Config.js @@ -34,6 +34,10 @@ app.config(function ($routeProvider, $provide, $httpProvider, $locationProvider) $provide.constant('MARK_READ_TIMEOUT', 0.5); $provide.constant('SCROLL_TIMEOUT', 0.1); + const majorVersion = parseInt($('#app-content').data('nc-major-version') || 0, 10); + $provide.constant('NC_MAJOR_VERSION', majorVersion); + window.NEWS_NC_MAJOR_VERSION = majorVersion; + // make sure that the CSRF header is only sent to the Nextcloud domain $provide.factory('CSRFInterceptor', function ($q, BASE_URL, $window) { return { @@ -55,7 +59,7 @@ app.config(function ($routeProvider, $provide, $httpProvider, $locationProvider) var errorMessages = { 0: t('news', 'Request failed, network connection unavailable!'), 401: t('news', 'Request unauthorized. Are you logged in?'), - 403: t('news', 'Request forbidden. Are you an admin?'), + 403: t('news', 'Request forbidden. Are you an administrator?'), 412: t('news', 'Token expired or app not enabled! Reload the page!'), 500: t('news', 'Internal server error! Please check your ' + 'data/nextcloud.log file for additional ' + |