diff options
Diffstat (limited to 'apps/files/src/services/Settings.js')
-rw-r--r-- | apps/files/src/services/Settings.js | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/apps/files/src/services/Settings.js b/apps/files/src/services/Settings.js index 7d8961b35ab..7f04aa82fda 100644 --- a/apps/files/src/services/Settings.js +++ b/apps/files/src/services/Settings.js @@ -1,31 +1,14 @@ /** - * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev> - * - * @author Gary Kim <gary@garykim.dev> - * - * @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/>. - * + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ export default class Settings { - #settings + _settings constructor() { - this.#settings = [] + this._settings = [] console.debug('OCA.Files.Settings initialized') } @@ -34,23 +17,24 @@ export default class Settings { * * @since 19.0.0 * @param {OCA.Files.Settings.Setting} view element to add to settings - * @returns {boolean} whether registering was successful + * @return {boolean} whether registering was successful */ register(view) { - if (this.#settings.filter(e => e.name === view.name).length > 0) { + if (this._settings.filter(e => e.name === view.name).length > 0) { console.error('A setting with the same name is already registered') return false } - this.#settings.push(view) + this._settings.push(view) return true } /** * All settings elements - * @returns {OCA.Files.Settings.Setting[]} All currently registered settings + * + * @return {OCA.Files.Settings.Setting[]} All currently registered settings */ get settings() { - return this.#settings + return this._settings } } |