diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-10 00:26:15 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-10 00:41:01 +0300 |
commit | 3a8de08ebaab982f4be7164b7a0e4df47632e9e8 (patch) | |
tree | 7f06a7cf28da1ac2594284f8943c085d8b264eb0 /src/views | |
parent | 002958354b9ec04ad5cce1f8ea7b28a2a60ab349 (diff) |
Remove no longer needed Vue adapter
With the changes in the Files app sidebar API the Chat tab can be
directly used in the OCA.Files.Sidebar.Tab object without having to use
a special Vue component as a bridge.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/FilesSidebarTab.vue | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/views/FilesSidebarTab.vue b/src/views/FilesSidebarTab.vue deleted file mode 100644 index c92d0ffe8..000000000 --- a/src/views/FilesSidebarTab.vue +++ /dev/null @@ -1,70 +0,0 @@ -<!-- - - @copyright Copyright (c) 2019 Marco Ambrosini <smarcoambrosini@pm.me> - - - - @author Marco Ambrosini <smarcoambrosini@pm.me> - - - - @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/>. - - - --> - -<template> - <div id="talk-tab-mount" /> -</template> - -<script> -export default { - name: 'FilesSidebarTab', - data() { - return { - fileInfo: null, - tab: null, - } - }, - mounted() { - // Dirty hack to force the style on parent component - const tabChat = document.querySelector('#tab-chat') - tabChat.style.height = '100%' - // Remove paddding to maximize space for the chat view - tabChat.style.padding = '0' - - try { - OCA.Talk.fileInfo = this.fileInfo - this.tab = OCA.Talk.newTab() - this.tab.$mount('#talk-tab-mount') - } catch (error) { - console.error('Unable to mount Chat tab', error) - } - }, - beforeDestroy() { - try { - OCA.Talk.fileInfo = null - this.tab.$destroy() - } catch (error) { - console.error('Unable to unmount Chat tab', error) - } - }, - methods: { - /** - * Update current fileInfo and fetch new data - * @param {Object} fileInfo the current file FileInfo - */ - async update(fileInfo) { - this.fileInfo = fileInfo - OCA.Talk.fileInfo = this.fileInfo - }, - }, -} -</script> |