summaryrefslogtreecommitdiffstats
path: root/apps/files/src/views/Sidebar.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/src/views/Sidebar.vue')
-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>