From 225d6e2dcf6ae330161ebd968afce48be55f5666 Mon Sep 17 00:00:00 2001
From: John Molakvoæ <skjnldsv@protonmail.com>
Date: Wed, 12 Apr 2023 18:43:09 +0200
Subject: feat(files): better breakpoints and sidebar responsive design
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
---
 apps/files/src/components/FilesListHeader.vue | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'apps/files/src/components/FilesListHeader.vue')

diff --git a/apps/files/src/components/FilesListHeader.vue b/apps/files/src/components/FilesListHeader.vue
index 0edafb2db21..2edfb4aa30e 100644
--- a/apps/files/src/components/FilesListHeader.vue
+++ b/apps/files/src/components/FilesListHeader.vue
@@ -102,6 +102,10 @@ export default Vue.extend({
 			type: Array,
 			required: true,
 		},
+		filesListWidth: {
+			type: Number,
+			default: 0,
+		},
 	},
 
 	setup() {
@@ -123,6 +127,10 @@ export default Vue.extend({
 		},
 
 		columns() {
+			// Hide columns if the list is too small
+			if (this.filesListWidth < 512) {
+				return []
+			}
 			return this.currentView?.columns || []
 		},
 
-- 
cgit v1.2.3

