diff options
Diffstat (limited to 'core/src/OC/index.js')
-rw-r--r-- | core/src/OC/index.js | 110 |
1 files changed, 40 insertions, 70 deletions
diff --git a/core/src/OC/index.js b/core/src/OC/index.js index 5267e2491f4..5afc941b396 100644 --- a/core/src/OC/index.js +++ b/core/src/OC/index.js @@ -1,40 +1,19 @@ /** - * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @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 - * 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/>. - * + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ import { subscribe } from '@nextcloud/event-bus' -import { addScript, addStyle } from './legacy-loader' import { ajaxConnectionLostHandler, processAjaxError, registerXHRForErrorProcessing, -} from './xhr-error' -import Apps from './apps' -import { AppConfig, appConfig } from './appconfig' -import { appSettings } from './appsettings' -import appswebroots from './appswebroots' -import Backbone from './backbone' +} from './xhr-error.js' +import Apps from './apps.js' +import { AppConfig, appConfig } from './appconfig.js' +import appswebroots from './appswebroots.js' +import Backbone from './backbone.js' import { basename, dirname, @@ -45,8 +24,8 @@ import { import { build as buildQueryString, parse as parseQueryString, -} from './query-string' -import Config from './config' +} from './query-string.js' +import Config from './config.js' import { coreApps, menuSpeed, @@ -58,35 +37,31 @@ import { PERMISSION_SHARE, PERMISSION_UPDATE, TAG_FAVORITE, -} from './constants' -import ContactsMenu from './contactsmenu' -import { currentUser, getCurrentUser } from './currentuser' -import Dialogs from './dialogs' -import EventSource from './eventsource' -import { get, set } from './get_set' -import { getCapabilities } from './capabilities' +} from './constants.js' +import { currentUser, getCurrentUser } from './currentuser.js' +import Dialogs from './dialogs.js' +import EventSource from './eventsource.js' +import { get, set } from './get_set.js' +import { getCapabilities } from './capabilities.js' import { getHost, getHostName, getPort, getProtocol, -} from './host' -import { - getToken as getRequestToken, -} from './requesttoken' +} from './host.js' +import { getRequestToken } from './requesttoken.ts' import { hideMenus, registerMenu, showMenu, unregisterMenu, -} from './menu' -import { isUserAdmin } from './admin' -import L10N, { - getLanguage, - getLocale, -} from './l10n' +} from './menu.js' +import { isUserAdmin } from './admin.js' +import L10N from './l10n.js' import { getCanonicalLocale, + getLanguage, + getLocale, } from '@nextcloud/l10n' import { @@ -101,16 +76,16 @@ import { import { linkToRemoteBase, -} from './routing' -import msg from './msg' -import Notification from './notification' -import PasswordConfirmation from './password-confirmation' -import Plugins from './plugins' -import { theme } from './theme' -import Util from './util' -import { debug } from './debug' -import { redirect, reload } from './navigation' -import webroot from './webroot' +} from './routing.js' +import msg from './msg.js' +import Notification from './notification.js' +import PasswordConfirmation from './password-confirmation.js' +import Plugins from './plugins.js' +import { theme } from './theme.js' +import Util from './util.js' +import { debug } from './debug.js' +import { redirect, reload } from './navigation.js' +import webroot from './webroot.js' /** @namespace OC */ export default { @@ -139,16 +114,11 @@ export default { * @deprecated 17.0.0 */ fileIsBlacklisted: file => !!(file.match(Config.blacklist_files_regex)), - - addScript, - addStyle, Apps, AppConfig, appConfig, - appSettings, appswebroots, Backbone, - ContactsMenu, config: Config, /** * Currently logged in user or null if none @@ -231,17 +201,14 @@ export default { * @deprecated 20.0.0 use `getCanonicalLocale` from https://www.npmjs.com/package/@nextcloud/l10n */ getCanonicalLocale, + /** + * @deprecated 26.0.0 use `getLocale` from https://www.npmjs.com/package/@nextcloud/l10n + */ getLocale, - getLanguage, /** - * Loads translations for the given app asynchronously. - * - * @param {string} app app name - * @param {Function} callback callback to call after loading - * @return {Promise} - * @deprecated 17.0.0 use OC.L10N.load instead + * @deprecated 26.0.0 use `getLanguage` from https://www.npmjs.com/package/@nextcloud/l10n */ - addTranslations: L10N.load, + getLanguage, /** * Query string helpers @@ -251,6 +218,9 @@ export default { msg, Notification, + /** + * @deprecated 28.0.0 use methods from '@nextcloud/password-confirmation' + */ PasswordConfirmation, Plugins, theme, |