diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2021-06-21 16:06:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-21 16:06:39 +0200 |
commit | b505d563aeeabad7c086b16ba31c00b518dad4c9 (patch) | |
tree | fe5befc6e1f1723f15e10040e3e33ea87d9f345e /src | |
parent | d7db9ca4a983fd13da021613814bb0adba70de3d (diff) | |
parent | 6ee8c945bb0ebc8f6cad8038f868452345157b85 (diff) |
Merge pull request #5824 from nextcloud/adjust-viewer-and-sidebar-to-changes-in-nextcloud-22
Adjust viewer and sidebar to changes in Nextcloud 22
Diffstat (limited to 'src')
-rw-r--r-- | src/components/RightSidebar/RightSidebar.vue | 5 | ||||
-rw-r--r-- | src/main.js | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/components/RightSidebar/RightSidebar.vue b/src/components/RightSidebar/RightSidebar.vue index 6d5973ac9..11263abc0 100644 --- a/src/components/RightSidebar/RightSidebar.vue +++ b/src/components/RightSidebar/RightSidebar.vue @@ -34,6 +34,7 @@ @update:title="handleUpdateTitle" @submit-title="handleSubmitTitle" @dismiss-editing="dismissEditing" + @closed="handleClosed" @close="handleClose"> <template slot="description"> <LobbyStatus v-if="canFullModerate && hasLobbyEnabled" :token="token" /> @@ -259,6 +260,10 @@ export default { showSettings() { emit('show-settings') }, + + handleClosed() { + emit('files:sidebar:closed') + }, }, } </script> diff --git a/src/main.js b/src/main.js index 3d0e43e8e..218d9ab79 100644 --- a/src/main.js +++ b/src/main.js @@ -37,6 +37,7 @@ import router from './router/router' // Utils import { generateFilePath } from '@nextcloud/router' import { getRequestToken } from '@nextcloud/auth' +import { emit } from '@nextcloud/event-bus' // Directives import VueClipboard from 'vue-clipboard2' @@ -121,6 +122,8 @@ const waitForSidebarToBeOpen = function(sidebarElement, resolve) { sidebarElement.removeEventListener('transitionend', resolveOnceSidebarWidthHasChanged) + emit('files:sidebar:opened') + resolve() } @@ -133,6 +136,8 @@ const waitForSidebarToBeOpen = function(sidebarElement, resolve) { setTimeout(() => { console.debug('ontransitionend is not supported; the sidebar should have been fully shown by now') + emit('files:sidebar:opened') + resolve() }, Number.parseInt(animationQuickValue) + 200) } @@ -141,6 +146,8 @@ const waitForSidebarToBeOpen = function(sidebarElement, resolve) { Sidebar.prototype.open = function(path) { // The sidebar is already open, so this can return immediately. if (this.state.file) { + emit('files:sidebar:opened') + return } @@ -160,6 +167,10 @@ Sidebar.prototype.close = function() { store.dispatch('hideSidebar') this.state.file = '' } +Sidebar.prototype.setFullScreenMode = function(isFullScreen) { + // Sidebar style is not changed in Talk when the viewer is opened; this is + // needed only for compatibility with OCA.Files.Sidebar interface. +} Object.assign(window.OCA.Files, { Sidebar: new Sidebar(), |