diff options
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/views/Sidebar.vue | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue index d3938156172..da25a3e6ce1 100644 --- a/apps/files/src/views/Sidebar.vue +++ b/apps/files/src/views/Sidebar.vue @@ -29,7 +29,11 @@ @close="close" @update:active="setActiveTab" @update:starred="toggleStarred" - @[defaultActionListener].stop.prevent="onDefaultAction"> + @[defaultActionListener].stop.prevent="onDefaultAction" + @opening="handleOpening" + @opened="handleOpened" + @closing="handleClosing" + @closed="handleClosed"> <!-- TODO: create a standard to allow multiple elements here? --> <template v-if="fileInfo" #description> <LegacyView v-for="view in views" @@ -78,6 +82,7 @@ import { encodePath } from '@nextcloud/paths' import $ from 'jquery' import axios from '@nextcloud/axios' +import { emit } from '@nextcloud/event-bus' import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar' import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' @@ -422,6 +427,22 @@ export default { this.Sidebar.file = '' this.resetData() }, + + /** + * Emit SideBar events. + */ + handleOpening() { + emit('files:sidebar:opening') + }, + handleOpened() { + emit('files:sidebar:opened') + }, + handleClosing() { + emit('files:sidebar:closing') + }, + handleClosed() { + emit('files:sidebar:closed') + }, }, } </script> |