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

fileInfo: null, fileInfo: null,
starLoading: false, starLoading: false,
isFullScreen: false, isFullScreen: false,
hasLowHeight: false,
} }
}, },


'app-sidebar--has-preview': this.fileInfo.hasPreview && !this.isFullScreen, 'app-sidebar--has-preview': this.fileInfo.hasPreview && !this.isFullScreen,
'app-sidebar--full': this.isFullScreen, 'app-sidebar--full': this.isFullScreen,
}, },
compact: !this.fileInfo.hasPreview || this.isFullScreen,
compact: this.hasLowHeight || !this.fileInfo.hasPreview || this.isFullScreen,
loading: this.loading, loading: this.loading,
starred: this.fileInfo.isFavourited, starred: this.fileInfo.isFavourited,
subtitle: this.subtitle, subtitle: this.subtitle,
handleClosed() { handleClosed() {
emit('files:sidebar:closed') 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> </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