mirror of
https://github.com/nextcloud/server.git
synced 2026-02-13 07:45:08 -05:00
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>
This commit is contained in:
parent
0a5b3d03df
commit
d072a5201d
3 changed files with 15 additions and 4 deletions
|
|
@ -112,6 +112,7 @@ export default {
|
|||
fileInfo: null,
|
||||
starLoading: false,
|
||||
isFullScreen: false,
|
||||
hasLowHeight: false,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -226,7 +227,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,
|
||||
|
|
@ -484,6 +485,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>
|
||||
|
|
|
|||
4
dist/files-sidebar.js
vendored
4
dist/files-sidebar.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-sidebar.js.map
vendored
2
dist/files-sidebar.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue