diff --git a/frontend/js/components/dashboard/Capital.vue b/frontend/js/components/dashboard/Capital.vue
index c5b0306..e561f45 100644
--- a/frontend/js/components/dashboard/Capital.vue
+++ b/frontend/js/components/dashboard/Capital.vue
@@ -13,7 +13,7 @@
v-if="data.length > 0"
:data="compute(data, precision, dateFrom, dateTo)"
:options="options()"
- :style="chartStyle(300)"
+ :style="chartStyle(380)"
/>
Aucune donnée
diff --git a/frontend/js/components/dashboard/SavingAccounts.vue b/frontend/js/components/dashboard/SavingAccounts.vue
index 27413fa..6783ccd 100644
--- a/frontend/js/components/dashboard/SavingAccounts.vue
+++ b/frontend/js/components/dashboard/SavingAccounts.vue
@@ -5,7 +5,7 @@
diff --git a/frontend/js/views/DashboardView.vue b/frontend/js/views/DashboardView.vue
index 946d48a..b633222 100644
--- a/frontend/js/views/DashboardView.vue
+++ b/frontend/js/views/DashboardView.vue
@@ -8,23 +8,21 @@
categories.length > 0
"
>
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
+
-
-
-
+
{{ i.label }}
@@ -115,7 +112,7 @@ const mode = ref('view')
const account = ref(getStorage(`dashboard:account`))
const dateFrom = ref(getStorage(`dashboard:dateFrom`))
const dateTo = ref(getStorage(`dashboard:dateTo`))
-const config = reactive(
+const config = ref(
getStorage(`dashboard:config`, [
{component: 'Capital', size: 8},
{component: 'SavingAccounts', size: 4},
@@ -159,10 +156,7 @@ const componentClasses = (item) => {
watch(dateFrom, (v) => saveStorage(`dashboard:dateFrom`, v))
watch(dateTo, (v) => saveStorage(`dashboard:dateTo`, v))
watch(account, (v) => saveStorage(`dashboard:account`, v))
-watch(config, (v) => {
- saveStorage(`dashboard:config`, v)
- refresh()
-})
+
window.addEventListener('resize', () => {
if (Math.abs(window.innerWidth - winWidth) < 20) {
@@ -176,6 +170,11 @@ window.addEventListener('resize', () => {
}, 500)
})
+const updateConfig = () => {
+ saveStorage(`dashboard:config`, config.value)
+ refresh()
+}
+
const refresh = () => {
let query = {
order: 'date',
@@ -234,5 +233,7 @@ onMounted(() => {
.handle {
cursor: grab;
+ margin-right: 10px;
+ margin-top: 6px;
}