Browse Source

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>
tags/v26.0.0beta1
Simon L 1 year ago
parent
commit
088e9b0feb
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