summaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2021-05-26 18:21:30 +0200
committerLouis Chemineau <louis@chmn.me>2021-06-09 16:19:11 +0200
commitc03a14934b543c6734e5458f814997e419cf808b (patch)
tree484b381168538dc89bc64aab0a16d9a25f4d0c94 /apps/files/src
parent97e427f09f54b25f1d143665842a45b141e5427e (diff)
downloadnextcloud-server-c03a14934b543c6734e5458f814997e419cf808b.tar.gz
nextcloud-server-c03a14934b543c6734e5458f814997e419cf808b.zip
Trigger click event when scrollTo is set
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/sidebar.js1
-rw-r--r--apps/files/src/views/Sidebar.vue23
2 files changed, 22 insertions, 2 deletions
diff --git a/apps/files/src/sidebar.js b/apps/files/src/sidebar.js
index 274b2f49fd9..bc483f833e8 100644
--- a/apps/files/src/sidebar.js
+++ b/apps/files/src/sidebar.js
@@ -58,4 +58,5 @@ window.addEventListener('DOMContentLoaded', function() {
AppSidebar.$mount('#app-sidebar')
window.OCA.Files.Sidebar.open = AppSidebar.open
window.OCA.Files.Sidebar.close = AppSidebar.close
+ window.OCA.Files.Sidebar.setFullScreenMode = AppSidebar.setFullScreenMode
})
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue
index da25a3e6ce1..fa53f2af0a9 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -110,6 +110,7 @@ export default {
loading: true,
fileInfo: null,
starLoading: false,
+ isFullScreen: false,
}
},
@@ -202,7 +203,10 @@ export default {
'star-loading': this.starLoading,
active: this.activeTab,
background: this.background,
- class: { 'has-preview': this.fileInfo.hasPreview },
+ class: {
+ 'app-sidebar--has-preview': this.fileInfo.hasPreview,
+ 'app-sidebar--full': this.isFullScreen,
+ },
compact: !this.fileInfo.hasPreview,
loading: this.loading,
starred: this.fileInfo.isFavourited,
@@ -429,6 +433,14 @@ export default {
},
/**
+ * Allow to set the Sidebar as fullscreen from OCA.Files.Sidebar
+ * @param {boolean} isFullScreen - Wether or not to render the Sidebar in fullscreen.
+ */
+ setFullScreenMode(isFullScreen) {
+ this.isFullScreen = isFullScreen
+ },
+
+ /**
* Emit SideBar events.
*/
handleOpening() {
@@ -448,7 +460,7 @@ export default {
</script>
<style lang="scss" scoped>
.app-sidebar {
- &.has-preview::v-deep {
+ &--has-preview::v-deep {
.app-sidebar-header__figure {
background-size: cover;
}
@@ -460,5 +472,12 @@ export default {
}
}
}
+
+ &--full {
+ position: fixed !important;
+ z-index: 2025 !important;
+ top: 0 !important;
+ height: 100% !important;
+ }
}
</style>