Skip to content

Commit

Permalink
feat: smaller column width to fit 2 columns in landscape mobiles
Browse files Browse the repository at this point in the history
  • Loading branch information
adrium committed Feb 10, 2022
1 parent 8888b9f commit 7870e89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/views/files/Listing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export default {
data: function () {
return {
showLimit: 50,
columnWidth: 280,
dragCounter: 0,
width: window.innerWidth,
itemWeight: 0,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7870e89

Please sign in to comment.