summaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-01-14 14:21:12 +0100
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2020-01-14 22:38:04 +0000
commit17256781a6900f45ddcb1be2f67f627072e33586 (patch)
tree973cbc2fc72302c65ddcb4860d2458c79a0ddd20 /apps/files/src
parent092a1fb90f57639a15adc5a8e565b53debe26a8a (diff)
downloadnextcloud-server-17256781a6900f45ddcb1be2f67f627072e33586.tar.gz
nextcloud-server-17256781a6900f45ddcb1be2f67f627072e33586.zip
Proper text previews
Fixes #17828 * Modified the preview provider to provider smaller fonts for the previes (so it is not so screaming) * Modified the sidebar to show plain text and markdown files full size. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/views/Sidebar.vue14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue
index be6f8dee1f5..4bee3c67759 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -176,6 +176,7 @@ export default {
starred: this.fileInfo.isFavourited,
subtitle: this.subtitle,
title: this.fileInfo.name,
+ 'data-mimetype': this.fileInfo.mimetype,
}
} else if (this.error) {
return {
@@ -381,8 +382,17 @@ export default {
</script>
<style lang="scss" scoped>
#app-sidebar {
- &.has-preview::v-deep .app-sidebar-header__figure {
- background-size: cover;
+ &.has-preview::v-deep {
+ .app-sidebar-header__figure {
+ background-size: cover;
+ }
+
+ &[data-mimetype="text/plain"],
+ &[data-mimetype="text/markdown"] {
+ .app-sidebar-header__figure {
+ background-size: contain;
+ }
+ }
}
}
</style>