diff --git a/src/localization/en.json b/src/localization/en.json index c4645be0..07d30185 100644 --- a/src/localization/en.json +++ b/src/localization/en.json @@ -90,6 +90,7 @@ "add_row": "Add Row", "add_full_row": "Add Full Row", "add_split_row": "Add Split Row", + "add_vertical_row": "Add Vertical Row", "cancel": "Cancel", "save": "Save", "delete": "Delete" diff --git a/src/stores/dashboard.js b/src/stores/dashboard.js index 7e6d2e62..e7e27792 100644 --- a/src/stores/dashboard.js +++ b/src/stores/dashboard.js @@ -24,7 +24,9 @@ function cloneRows(rows) { if (!panels.length) { return null; } - return { panels }; + const direction = + row?.direction === 'vertical' ? 'vertical' : 'horizontal'; + return { panels, direction }; }) .filter(Boolean); } diff --git a/src/views/Dashboard/Dashboard.vue b/src/views/Dashboard/Dashboard.vue index f44d888a..9f93200e 100644 --- a/src/views/Dashboard/Dashboard.vue +++ b/src/views/Dashboard/Dashboard.vue @@ -39,16 +39,28 @@ + @@ -143,9 +155,9 @@ showAddRowOptions.value = !showAddRowOptions.value; }; - const handleAddRow = (panelCount) => { + const handleAddRow = (panelCount, direction = 'horizontal') => { const panels = Array(panelCount).fill(null); - editRows.value.push({ panels }); + editRows.value.push({ panels, direction }); showAddRowOptions.value = false; }; diff --git a/src/views/Dashboard/components/DashboardPanel.vue b/src/views/Dashboard/components/DashboardPanel.vue index 319a3b19..a30b807d 100644 --- a/src/views/Dashboard/components/DashboardPanel.vue +++ b/src/views/Dashboard/components/DashboardPanel.vue @@ -2,7 +2,7 @@