From 7870e89bc04f1494f2705795476b5f1c9d621e38 Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 16 Jan 2022 11:24:23 +0100 Subject: [PATCH] feat: smaller column width to fit 2 columns in landscape mobiles --- frontend/src/views/files/Listing.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/files/Listing.vue b/frontend/src/views/files/Listing.vue index 425dd4d6..fac8608f 100644 --- a/frontend/src/views/files/Listing.vue +++ b/frontend/src/views/files/Listing.vue @@ -283,6 +283,7 @@ export default { data: function () { return { showLimit: 50, + columnWidth: 280, dragCounter: 0, width: window.innerWidth, itemWeight: 0, @@ -599,7 +600,7 @@ export default { colunmsResize() { // Update the columns size based on the window width. let columns = Math.floor( - document.querySelector("main").offsetWidth / 300 + document.querySelector("main").offsetWidth / this.columnWidth ); let items = css(["#listing.mosaic .item", ".mosaic#listing .item"]); if (columns === 0) columns = 1;