Browse Source

Merge pull request #35972 from nextcloud/fix/34777/improve-app-sidebar

appsidebar should be compact when opened on small heights
tags/v26.0.0beta1
Vincent Petry 1 year ago
parent
commit
7e58906a85
No account linked to committer's email address
3 changed files with 15 additions and 4 deletions
  1. 12
    1
      apps/files/src/views/Sidebar.vue
  2. 2
    2
      dist/files-sidebar.js
  3. 1
    1
      dist/files-sidebar.js.map

+ 12
- 1
apps/files/src/views/Sidebar.vue View File

@@ -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>

+ 2
- 2
dist/files-sidebar.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/files-sidebar.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save