From 4a04a6afc451558f659b112f0817311b8d8341c4 Mon Sep 17 00:00:00 2001 From: Terry Date: Thu, 22 Apr 2021 16:33:40 +0200 Subject: [PATCH] sidebar tab declaration mandatory parameters added and removed unused --- apps/files_versions/src/files_versions_tab.js | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/apps/files_versions/src/files_versions_tab.js b/apps/files_versions/src/files_versions_tab.js index 6a310cd883..0d8228976d 100644 --- a/apps/files_versions/src/files_versions_tab.js +++ b/apps/files_versions/src/files_versions_tab.js @@ -24,25 +24,22 @@ import Vue from 'vue' import VueClipboard from 'vue-clipboard2' -import {translate as t, translatePlural as n } from '@nextcloud/l10n' +import { translate as t, translatePlural as n } from '@nextcloud/l10n' import VersionTab from '../../files_versions/src/views/VersionTab' import TabSections from '../../files_versions/src/services/TabSections' - - // Init Version Tab Service -if(!window.OCA.Versions) { +if (!window.OCA.Versions) { window.OCA.Versions = {} } -Object.assign(window.OCA.Versions, { VersionTabSections: new TabSections() }); +Object.assign(window.OCA.Versions, { VersionTabSections: new TabSections() }) Vue.prototype.t = t Vue.prototype.n = n Vue.use(VueClipboard) - // Init Sharing tab component const View = Vue.extend(VersionTab) let TabInstance = null @@ -50,14 +47,9 @@ let TabInstance = null window.addEventListener('DOMContentLoaded', function() { if (OCA.Files && OCA.Files.Sidebar) { OCA.Files.Sidebar.registerTab(new OCA.Files.Sidebar.Tab({ - - _fileInfo: null, - - _currentUser: null, - - _client: null, - - + id: 'versions', + name: t('files_versions', 'version'), + icon: 'icon-version', async mount(el, fileInfo, context) { if (TabInstance) { TabInstance.$destroy()