From ed2a4679264d2c89f40af5608a15e34aa4b23a2d Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 12 May 2025 13:51:20 +0200 Subject: [PATCH] refactor(Dashboard additional row): changes the UI and behavior to add an additional row to the grid --- public/css/components/dashboard.css | 16 +++++++++ public/js/components/Dashboard/Item.js | 3 +- public/js/components/Dashboard/Section.js | 4 ++- public/js/components/Drop/Grid.js | 41 ++++++++++++----------- 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/public/css/components/dashboard.css b/public/css/components/dashboard.css index f48a25418..8770c1e78 100644 --- a/public/css/components/dashboard.css +++ b/public/css/components/dashboard.css @@ -18,6 +18,22 @@ position:relative; } +.dashboard-section > .newGridRow{ + position:absolute; + width:20px; + height:20px; + padding:0; + bottom:0; + left:50%; + transform:translate(-50%, 50%); + background-color:white; +} + +.newGridRow:hover { + color:white; + background-color:#6c757d; +} + .empty-tile-hover:hover { background-image: url('data:image/svg+xml;utf8,'); } diff --git a/public/js/components/Dashboard/Item.js b/public/js/components/Dashboard/Item.js index beaca64f0..68a92e701 100644 --- a/public/js/components/Dashboard/Item.js +++ b/public/js/components/Dashboard/Item.js @@ -42,7 +42,8 @@ export default { "place", "setup", "dragstate", - "resizeOverlay" + "resizeOverlay", + "additionalRow" ], computed: { maxHeight(){ diff --git a/public/js/components/Dashboard/Section.js b/public/js/components/Dashboard/Section.js index fb5caa965..07e636cf5 100644 --- a/public/js/components/Dashboard/Section.js +++ b/public/js/components/Dashboard/Section.js @@ -41,6 +41,7 @@ export default { gridWidth: 1, gridHeight: null, draggedItem:null, + additionalRow:false, } }, provide() { @@ -214,7 +215,8 @@ export default { {{sectionNameTranslation()}}:
- + +