appsidebar should be compact when opened on small heights

Signed-off-by: Simon L <szaimen@e.mail.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
pull/35972/head
Simon L 1 year ago committed by nextcloud-command
parent b37a4950e4
commit 088e9b0feb

@ -117,6 +117,7 @@ export default {
fileInfo: null,
starLoading: false,
isFullScreen: false,
hasLowHeight: false,
}
},
@ -231,7 +232,7 @@ export default {
'app-sidebar--has-preview': this.fileInfo.hasPreview && !this.isFullScreen,
'app-sidebar--full': this.isFullScreen,
},
compact: !this.fileInfo.hasPreview || this.isFullScreen,
compact: this.hasLowHeight || !this.fileInfo.hasPreview || this.isFullScreen,
loading: this.loading,
starred: this.fileInfo.isFavourited,
subtitle: this.subtitle,
@ -489,6 +490,16 @@ export default {
handleClosed() {
emit('files:sidebar:closed')
},
handleWindowResize() {
this.hasLowHeight = document.documentElement.clientHeight < 1024
},
},
created() {
window.addEventListener('resize', this.handleWindowResize)
this.handleWindowResize()
},
beforeDestroy() {
window.removeEventListener('resize', this.handleWindowResize)
},
}
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save