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