Skip to content

Open source personal finance application

ui: update dashboard and refactor

ilkomed99575480d83
diff --git a/components/chart/Periods.vue b/components/chart/Periods.vue
index b40c739e..8479aa7e 100644
--- a/components/chart/Periods.vue
+++ b/components/chart/Periods.vue
@@ -31,6 +31,9 @@ export default {
}
function removePeriodOrGroup () {
+ if (store.state.chart.periods[filterPeriodNameAllReplacedToYear.value].showedPeriods <= 2)
+ return
+
store.commit('chart/removeElementsFromChart', {
periodName: filterPeriodNameAllReplacedToYear.value,
periodType: 'showedPeriods'
@@ -72,35 +75,8 @@ export default {
<template lang="pug">
.periods
- .periods__custom
- SharedContextMenu(
- :position="{ left: '-12px', top: true }"
- :visible="visibleContextMenu"
- @onClickOpener="visibleContextMenu = !visibleContextMenu"
- )
- template(slot="opener")
- .periodItem._tune
- .periodItem__icon: .mdi.mdi-tune
- .periodItem__text {{ $t('settings.customize') }}
-
- template(slot="content")
- template(v-if="!isEmptyStat")
- CustomizeMenu
-
- SharedContextMenuItem(
- :title="$t('theme.change')"
- icon="mdi mdi-palette"
- @onClick="$store.dispatch('ui/changeTheme')"
- )
- SharedContextMenuItem(
- :title="$t('currency.selectBaseTitle')"
- icon="mdi mdi-currency-usd"
- @onClick="$store.commit('currencies/showBaseCurrenciesModal')"
- @onClose="visibleContextMenu = !visibleContextMenu"
- )
-
.periods__group
- .periodItem(
+ .periodItem._date(
v-for="periodItem in periodsNames"
:key="periodItem.slug"
:class="{ _active: filterPeriodNameAllReplacedToYear === periodItem.slug }"
@@ -130,13 +106,11 @@ export default {
@import '~assets/stylus/variables'
.periods
- z-index 10
position relative
display grid
grid-template-columns auto 1fr auto auto
grid-column-gap $m5
align-items center
- margin 0 (- 0)
+media(600px)
margin 0 (- $m4)
@@ -159,50 +133,42 @@ export default {
align-items center
justify-content center
min-width 20px
- padding 10px $m5
+ padding $m5 $m6
color var(--c-font-5)
font-size 10px
- border-radius $m3
+ border-radius $m4
anim()
+ &._date
+ padding $m5 $m6
+
+media(400px)
font-size 12px
+media(600px)
- padding $m6 $m6
+ padding $m6 $m7
font-size 12px
+media(800px)
- padding $m6 $m7
+ padding $m6 $m8
+media-hover()
- cursor pointer
- color var(--c-font-3)
- background var(--c-bg-5)
- border-radius 50px
+ &:not(._active)
+ cursor pointer
+ color var(--c-font-3)
+ background var(--c-item2-bg-hover)
&._active
+ cursor default
color var(--c-blue-1)
+ background var(--c-item-bg-hover)
&__count
color var(--c-font-3)
font-size 14px
.mdi
+ font-size 16px
+media(600px)
font-size 18px
-
- &._history
- display none
-
- +media(800px)
- display flex
-
- &._tune
- color var(--c-font-3)
-
- &__icon
- padding-right $m5
- .mdi
- font-size 18px
</style>
diff --git a/components/stat/Dashboard.vue b/components/stat/Dashboard.vue
index e0de73ed..9f1de5df 100644
--- a/components/stat/Dashboard.vue
+++ b/components/stat/Dashboard.vue
@@ -7,7 +7,7 @@ import getStat from '~/modules/stat/getStat'
import useTrns from '~/modules/trns/useTrns'
export default {
- name: 'StatMobile',
+ name: 'StatDashboard',
setup () {
const { store, app: { $day } } = useContext()
@@ -151,209 +151,231 @@ export default {
<template lang="pug">
.pageWrapScroll
.baseBox._date
- DateMobilePrevNextArrow
+ StatDashboardDatesArrows
DateMobileSelector
- StatDashboardMenu
-
- template
- //- Total
- .baseBox._total
- .baseBoxIn
- template(v-if="(activeTabStat === 'details' || activeTabStat === 'history') && $store.state.filter.period !== 'all'")
- div
- .baseBox__title {{ $t('money.total') }}
- .boxSummary2
- .boxSummary2__item
- Amount(
- :currency="$store.state.currencies.base"
- :type="(statCurrentPeriod.incomes.total - statCurrentPeriod.expenses.total) > 0 ? 1 : 0"
- :value="statCurrentPeriod.incomes.total - statCurrentPeriod.expenses.total"
- size="xl"
- vertical="left"
- )
- StatSummaryRowItemView(
- :type="(statAverage.incomes - statAverage.expenses) > 0 ? 1 : 0"
- :amount="statAverage.incomes - statAverage.expenses"
- :title="$t('money.averageTotal')"
- )
-
- template(v-if="activeTabStat === 'incomes' || activeTabStat === 'expenses'")
- .sumBox
- .baseBox__title {{ $t(`money.${activeTabStat}`) }}
- .boxSummary2(@click="onClickTitle()")
- .boxSummary2__item
- Amount(
- :currency="$store.state.currencies.base"
- :type="activeTabStat === 'incomes' ? 1 : 0"
- :value="statCurrentPeriod[activeTabStat].total"
- size="xl"
- vertical="left"
- )
- StatSummaryRowItemView(
- :type="activeTabStat === 'incomes' ? 1 : 0"
- :amount="statAverage[activeTabStat]"
- :title="$t(`money.average.${activeTabStat}`)"
- )
- StatSummaryRowItemView(
- v-if="statToday && statToday[activeTabStat].total !== 0 && $store.state.filter.period !== 'day'"
- :type="activeTabStat === 'incomes' ? 1 : 0"
- :amount="statToday[activeTabStat].total"
- :title="$t('dates.day.today')"
- )
-
- .total__custom(v-if="statCurrentPeriod[activeTabStat].total !== 0")
- .periodItem(
- :class="{ _active: ui.showPieChart }"
- @click="toogleView('showPieChart')"
- ): .mdi.mdi-chart-pie
-
- .periodItem(
- :class="{ _active: ui.showCatsVerticalChart }"
- @click="toogleView('showCatsVerticalChart')"
- ): .mdi.mdi-poll
- .periodItem(
- :class="{ _active: ui.showRoundCats }"
- @click="toogleView('showRoundCats')"
- ): .mdi.mdi-chart-bubble
+ //-
+ //- Chart control
+ //-
+ //- .baseBox._date
- .periodItem(
- :class="{ _active: ui.showCatsHorizontalList }"
- @click="toogleView('showCatsHorizontalList')"
- ): .mdi.mdi-chart-timeline
+ //-
+ //- Chart graph
+ //-
+ .baseBox._total
+ .baseBoxIn
+ template(v-if="(activeTabStat === 'details' || activeTabStat === 'history') && $store.state.filter.period !== 'all'")
div
- .baseBox._chart(v-if="ui.showMainChart && isShowChart")
- LazyChartTotal(v-if="ui.showMainChart && isShowChart")
+ .baseBox__title {{ $t('money.total') }}
+ .boxSummary2
+ .boxSummary2__item
+ Amount(
+ :currency="$store.state.currencies.base"
+ :type="(statCurrentPeriod.incomes.total - statCurrentPeriod.expenses.total) > 0 ? 1 : 0"
+ :value="statCurrentPeriod.incomes.total - statCurrentPeriod.expenses.total"
+ size="xl"
+ vertical="left"
+ )
+ StatSummaryRowItemView(
+ :type="(statAverage.incomes - statAverage.expenses) > 0 ? 1 : 0"
+ :amount="statAverage.incomes - statAverage.expenses"
+ :title="$t('money.averageTotal')"
+ )
+
+ template(v-if="activeTabStat === 'incomes' || activeTabStat === 'expenses'")
+ .sumBox
+ .baseBox__title {{ $t(`money.${activeTabStat}`) }}
+ .boxSummary2(@click="onClickTitle()")
+ .boxSummary2__item
+ Amount(
+ :currency="$store.state.currencies.base"
+ :type="activeTabStat === 'incomes' ? 1 : 0"
+ :value="statCurrentPeriod[activeTabStat].total"
+ size="xl"
+ vertical="left"
+ )
+ StatSummaryRowItemView(
+ :type="activeTabStat === 'incomes' ? 1 : 0"
+ :amount="statAverage[activeTabStat]"
+ :title="$t(`money.average.${activeTabStat}`)"
+ )
+ StatSummaryRowItemView(
+ v-if="statToday && statToday[activeTabStat].total !== 0 && $store.state.filter.period !== 'day'"
+ :type="activeTabStat === 'incomes' ? 1 : 0"
+ :amount="statToday[activeTabStat].total"
+ :title="$t('dates.day.today')"
+ )
- .baseBox._date
+ .total__custom(
+ v-if="statCurrentPeriod[activeTabStat].total !== 0"
+ style="padding-right: 12px"
+ )
+ .periodItem(
+ :class="{ _active: ui.showPieChart }"
+ @click="toogleView('showPieChart')"
+ ): .mdi.mdi-chart-pie
+
+ .periodItem(
+ :class="{ _active: ui.showCatsVerticalChart }"
+ @click="toogleView('showCatsVerticalChart')"
+ ): .mdi.mdi-poll
+
+ .periodItem(
+ :class="{ _active: ui.showRoundCats }"
+ @click="toogleView('showRoundCats')"
+ ): .mdi.mdi-chart-bubble
+
+ .periodItem(
+ :class="{ _active: ui.showCatsHorizontalList }"
+ @click="toogleView('showCatsHorizontalList')"
+ ): .mdi.mdi-chart-timeline
+
+ //- Control
ChartPeriods
- .baseBox._filter(v-if="isShowFilter")
- LazyFilterRow(v-if="isShowFilter")
-
- .noStat(v-if="isEmptyStat")
- .noStat__title {{ $t('stat.empty') }}
- .noStat__desc {{ $t('stat.emptyDesc') }}
-
- //- Loop throw incomes / expenses
- .statMoneyTypes
- template(
- v-for="item in moneyTypes"
- v-if="activeTabStat === 'details' || (activeTabStat === 'incomes' && item.id === 'incomes') || (activeTabStat === 'expenses' && item.id === 'expenses')"
- )
- template(v-if="statCurrentPeriod[item.id].total > 0 || (statAverage && statAverage[item.id] !== 0) || $store.state.filter.period === 'all'")
- .baseBox._noBdMedia._mw
- template(v-if="activeTabStat === 'details' && (statAverage.incomes !== 0 && statAverage.expenses !== 0)")
- .sumBox
- .baseBox__title {{ $t(`money.${item.id}`) }}
- .boxSummary2
- .boxSummary2__item(@click="onClickTitle(item.type)")
- Amount(
- :currency="$store.state.currencies.base"
- :type="item.type"
- :value="statCurrentPeriod[item.id].total"
- size="xl"
- vertical="left"
- )
- StatSummaryRowItemView(
- :type="item.type"
- :amount="statAverage[item.id]"
- :title="$t(`money.average.${item.id}`)"
- )
- StatSummaryRowItemView(
- v-if="statToday && statToday[item.id].total !== 0 && $store.state.filter.period !== 'day'"
+ //- Graph
+ .baseBox._chart(v-if="ui.showMainChart && isShowChart")
+ LazyChartTotal(v-if="ui.showMainChart && isShowChart")
+
+ //-
+ //- Menu
+ //-
+ StatDashboardMenu
+
+ //-
+ //- Filter
+ //-
+ .baseBox._filter(v-if="isShowFilter")
+ LazyFilterRow(v-if="isShowFilter")
+
+ //-
+ //- No stat
+ //-
+ .noStat(v-if="isEmptyStat")
+ .noStat__title {{ $t('stat.empty') }}
+ .noStat__desc {{ $t('stat.emptyDesc') }}
+
+ //-
+ //- Loop throw incomes / expenses
+ //-
+ .statMoneyTypes
+ template(
+ v-for="item in moneyTypes"
+ v-if="activeTabStat === 'details' || (activeTabStat === 'incomes' && item.id === 'incomes') || (activeTabStat === 'expenses' && item.id === 'expenses')"
+ )
+ template(v-if="statCurrentPeriod[item.id].total > 0 || (statAverage && statAverage[item.id] !== 0) || $store.state.filter.period === 'all'")
+ .baseBox._noBdMedia._mw
+ template(v-if="activeTabStat === 'details' && (statAverage.incomes !== 0 && statAverage.expenses !== 0)")
+ .sumBox
+ .baseBox__title {{ $t(`money.${item.id}`) }}
+ .boxSummary2
+ .boxSummary2__item(@click="onClickTitle(item.type)")
+ Amount(
+ :currency="$store.state.currencies.base"
:type="item.type"
- :amount="statToday[item.id].total"
- :title="$t('dates.day.today')"
+ :value="statCurrentPeriod[item.id].total"
+ size="xl"
+ vertical="left"
)
+ StatSummaryRowItemView(
+ :type="item.type"
+ :amount="statAverage[item.id]"
+ :title="$t(`money.average.${item.id}`)"
+ )
+ StatSummaryRowItemView(
+ v-if="statToday && statToday[item.id].total !== 0 && $store.state.filter.period !== 'day'"
+ :type="item.type"
+ :amount="statToday[item.id].total"
+ :title="$t('dates.day.today')"
+ )
- .total__custom(v-if="statCurrentPeriod[item.id].total !== 0")
- .periodItem(
- :class="{ _active: ui.showPieChart }"
- @click="toogleView('showPieChart')"
- ): .mdi.mdi-chart-pie
-
- .periodItem(
- :class="{ _active: ui.showCatsVerticalChart }"
- @click="toogleView('showCatsVerticalChart')"
- ): .mdi.mdi-poll
-
- .periodItem(
- :class="{ _active: ui.showRoundCats }"
- @click="toogleView('showRoundCats')"
- ): .mdi.mdi-chart-bubble
-
- .periodItem(
- :class="{ _active: ui.showCatsHorizontalList }"
- @click="toogleView('showCatsHorizontalList')"
- ): .mdi.mdi-chart-timeline
-
- .boxEmpty(v-if="statCurrentPeriod[item.id].categoriesIds.length === 0") {{ $t('stat.empty') }}
-
- //- Pie chart
- .statChartPie(v-if="ui.showPieChart")
- LazyStatChartPie(
- v-if="ui.showPieChart && statCurrentPeriod[item.id].categoriesIds.length"
- :amountType="item.id"
- )
-
- //- Cats vertical chart
- StatCatsPeriodCatsChart(
- v-if="ui.showCatsVerticalChart && !filter.categoryId && statCurrentPeriod[item.id].categoriesIds.length > 1 && (!filter.categoryId || filter.categoryId && $store.getters['categories/getChildCategoriesIds'](filter.categoryId).length !== 0)"
- :type="item.id"
+ .total__custom(v-if="statCurrentPeriod[item.id].total !== 0")
+ .periodItem(
+ :class="{ _active: ui.showPieChart }"
+ @click="toogleView('showPieChart')"
+ ): .mdi.mdi-chart-pie
+
+ .periodItem(
+ :class="{ _active: ui.showCatsVerticalChart }"
+ @click="toogleView('showCatsVerticalChart')"
+ ): .mdi.mdi-poll
+
+ .periodItem(
+ :class="{ _active: ui.showRoundCats }"
+ @click="toogleView('showRoundCats')"
+ ): .mdi.mdi-chart-bubble
+
+ .periodItem(
+ :class="{ _active: ui.showCatsHorizontalList }"
+ @click="toogleView('showCatsHorizontalList')"
+ ): .mdi.mdi-chart-timeline
+
+ .boxEmpty(v-if="statCurrentPeriod[item.id].categoriesIds.length === 0") {{ $t('stat.empty') }}
+
+ //- Pie chart
+ .statChartPie(v-if="ui.showPieChart")
+ LazyStatChartPie(
+ v-if="ui.showPieChart && statCurrentPeriod[item.id].categoriesIds.length"
+ :amountType="item.id"
)
- //- Round cats list
- .statItemsTiles(v-if="ui.showRoundCats && statWithLastPeriods[item.id].categoriesIds.length > 0 && (!filter.categoryId || filter.categoryId && $store.getters['categories/getChildCategoriesIds'](filter.categoryId).length !== 0)")
- LazyStatItemRound(
- v-if="ui.showRoundCats && statWithLastPeriods[item.id].categoriesIds.length > 0"
- v-for="categoryId in statWithLastPeriods[item.id].categoriesIds"
- :category="$store.state.categories.items[categoryId]"
- :categoryId="categoryId"
- :currency="$store.state.currencies.base"
- :key="categoryId"
- :total="statWithLastPeriods.categories[categoryId][item.id]"
- :type="item.type"
- )
- template(v-if="filter.categoryId")
- template(v-for="categoryId in $store.getters['categories/getChildCategoriesIds'](filter.categoryId)")
- template(v-if="!statWithLastPeriods[item.id].categoriesIds.includes(categoryId)")
- LazyStatItemRound(
- v-if="filter.categoryId"
- :category="$store.state.categories.items[categoryId]"
- :categoryId="categoryId"
- :currency="$store.state.currencies.base"
- :key="categoryId"
- :total="0"
- :type="item.type"
- )
-
- //- Cats horizontal list
- .statCategories(v-if="ui.showCatsHorizontalList && statCurrentPeriod[item.id].categoriesIds.length > 0 ")
- LazyStatItem(
- v-if="ui.showCatsHorizontalList && statCurrentPeriod[item.id].categoriesIds.length > 0"
- v-for="categoryId in statCurrentPeriod[item.id].categoriesIds"
- :key="categoryId"
- :biggest="statCurrentPeriod[item.id].biggest"
- :category="$store.state.categories.items[categoryId]"
- :categoryId="categoryId"
- :currency="$store.state.currencies.base"
- :total="statCurrentPeriod.categories[categoryId][item.id]"
- :type="item.type"
- )
+ //- Cats vertical chart
+ StatCatsPeriodCatsChart(
+ v-if="ui.showCatsVerticalChart && !filter.categoryId && statCurrentPeriod[item.id].categoriesIds.length > 1 && (!filter.categoryId || filter.categoryId && $store.getters['categories/getChildCategoriesIds'](filter.categoryId).length !== 0)"
+ :type="item.id"
+ )
+
+ //- Round cats list
+ .statItemsTiles(v-if="ui.showRoundCats && statWithLastPeriods[item.id].categoriesIds.length > 0 && (!filter.categoryId || filter.categoryId && $store.getters['categories/getChildCategoriesIds'](filter.categoryId).length !== 0)")
+ LazyStatItemRound(
+ v-if="ui.showRoundCats && statWithLastPeriods[item.id].categoriesIds.length > 0"
+ v-for="categoryId in statWithLastPeriods[item.id].categoriesIds"
+ :category="$store.state.categories.items[categoryId]"
+ :categoryId="categoryId"
+ :currency="$store.state.currencies.base"
+ :key="categoryId"
+ :total="statWithLastPeriods.categories[categoryId][item.id]"
+ :type="item.type"
+ )
+ template(v-if="filter.categoryId")
+ template(v-for="categoryId in $store.getters['categories/getChildCategoriesIds'](filter.categoryId)")
+ template(v-if="!statWithLastPeriods[item.id].categoriesIds.includes(categoryId)")
+ LazyStatItemRound(
+ v-if="filter.categoryId"
+ :category="$store.state.categories.items[categoryId]"
+ :categoryId="categoryId"
+ :currency="$store.state.currencies.base"
+ :key="categoryId"
+ :total="0"
+ :type="item.type"
+ )
- template(v-if="(activeTabStat !== 'history' && statAverage && (statAverage.incomes === 0 || statAverage.expenses === 0)) || (activeTabStat === 'incomes' && statAverage.incomes !== 0 || activeTabStat === 'expenses' && statAverage.expenses !== 0)")
- .baseBox._mw(v-if="$store.getters['trns/selectedTrnsIdsWithDate'].length > 0")
- .baseBox__title {{ $t('trns.history') }}
- .baseBox__content
- TrnsList3(
- :incomes="activeTabStat === 'incomes'"
- :expenses="activeTabStat === 'expenses'"
- :size="12"
+ //- Cats horizontal list
+ .statCategories(v-if="ui.showCatsHorizontalList && statCurrentPeriod[item.id].categoriesIds.length > 0 ")
+ LazyStatItem(
+ v-if="ui.showCatsHorizontalList && statCurrentPeriod[item.id].categoriesIds.length > 0"
+ v-for="categoryId in statCurrentPeriod[item.id].categoriesIds"
+ :key="categoryId"
+ :biggest="statCurrentPeriod[item.id].biggest"
+ :category="$store.state.categories.items[categoryId]"
+ :categoryId="categoryId"
+ :currency="$store.state.currencies.base"
+ :total="statCurrentPeriod.categories[categoryId][item.id]"
+ :type="item.type"
)
+ template(v-if="(activeTabStat !== 'history' && statAverage && (statAverage.incomes === 0 || statAverage.expenses === 0)) || (activeTabStat === 'incomes' && statAverage.incomes !== 0 || activeTabStat === 'expenses' && statAverage.expenses !== 0)")
+ .baseBox._mw(v-if="$store.getters['trns/selectedTrnsIdsWithDate'].length > 0")
+ .baseBox__title {{ $t('trns.history') }}
+ .baseBox__content
+ TrnsList3(
+ :incomes="activeTabStat === 'incomes'"
+ :expenses="activeTabStat === 'expenses'"
+ :size="12"
+ )
+
//- history
.history(v-if="activeTabStat === 'history' || statAverage && (statAverage.incomes !== 0 && statAverage.expenses !== 0) && ui.showHistory && $store.getters['trns/selectedTrnsIdsWithDate'].length > 0 && (activeTabStat !== 'incomes' && activeTabStat !== 'expenses')")
.baseBox__title(v-if="activeTabStat !== 'history'") {{ $t('trns.history') }}
@@ -418,6 +440,7 @@ export default {
.periodItem
padding $m5
color var(--c-font-5)
+ font-size 18px
border-radius $m5
&._active
@@ -499,6 +522,7 @@ export default {
overflow initial
max-width 400px
margin-top 0
+ padding-top $m7
&._noBdMedia
+media(700px)
@@ -527,7 +551,7 @@ export default {
margin-top 0
margin-bottom 0
padding-top 0
- padding-bottom $m5
+ padding-bottom 0
background none
border none
@@ -557,7 +581,7 @@ export default {
&._total
margin-top 0
margin-bottom 0
- padding-top $m4
+ padding-top 0
padding-right 0
padding-bottom 0
background none
@@ -619,10 +643,12 @@ export default {
grid-template-columns repeat(auto-fill, minmax(80px, 1fr))
grid-column-gap 0
grid-row-gap 0
+ padding-bottom $m7
.statCategories
max-width 400px
padding $m7 $m5
+ padding-top 0
// ------------------------------------
.pageAnalytics
diff --git a/components/date/MobilePrevNextArrow.vue b/components/stat/DashboardDatesArrows.vue
similarity index 100%
rename from components/date/MobilePrevNextArrow.vue
rename to components/stat/DashboardDatesArrows.vue
diff --git a/components/stat/DashboardMenu.vue b/components/stat/DashboardMenu.vue
index 5f5b1cb3..f6cd5008 100644
--- a/components/stat/DashboardMenu.vue
+++ b/components/stat/DashboardMenu.vue
@@ -51,11 +51,12 @@ export default {
z-index 10
display flex
align-items center
- justify-content center
- max-width 640px
+ justify-content space-between
+ max-width 480px
overflow-x auto
margin 0 auto
- padding 0 $m6
+ padding $m7 $m6
+ padding-bottom 0
+media(600px)
overflow initial
@@ -66,14 +67,15 @@ export default {
align-items center
justify-content center
min-height 38px
+ min-width 80px
margin 0 $m5
padding $m6 $m6
- color var(--c-font-5)
+ color var(--c-font-4)
font-size 12px
font-weight 500
font-roboto()
text-align center
- border-radius 50px
+ border-radius $m6
anim()
+media(400px)
@@ -88,9 +90,10 @@ export default {
&:not(._active)
cursor pointer
color var(--c-font-3)
- background var(--c-bg-5)
+ background var(--c-item2-bg-hover)
&._active
cursor default
color var(--c-blue-1)
+ background var(--c-item-bg-hover)
</style>
diff --git a/components/stat/chartOptions.js b/components/stat/chartOptions.js
index cc885974..92e82c70 100644
--- a/components/stat/chartOptions.js
+++ b/components/stat/chartOptions.js
@@ -108,9 +108,11 @@ export default {
tickmarkPlacement: 'on',
crosshair: true,
labels: {
+ autoRotation: 0,
padding: 15,
rotation: false,
style: {
+ lineHeight: '10px',
cursor: 'pointer',
color: 'var(--c-font-5)',
fontSize: '10px',
diff --git a/store/chart/actions.js b/store/chart/actions.js
index a089fdb3..601aa879 100644
--- a/store/chart/actions.js
+++ b/store/chart/actions.js
@@ -5,10 +5,10 @@ export default {
const localPeriods = await localforage.getItem('finapp.chart.periods')
let showedPeriods
- if (!localPeriods) { return }
+ if (!localPeriods) return
for (const periodName in localPeriods) {
- if (!localPeriods[periodName]) { return }
+ if (!localPeriods[periodName]) return
Number.isInteger(localPeriods[periodName].showedPeriods)
? showedPeriods = localPeriods[periodName].showedPeriods
diff --git a/store/chart/mutations.js b/store/chart/mutations.js
index 1f57301b..387036af 100644
--- a/store/chart/mutations.js
+++ b/store/chart/mutations.js
@@ -18,8 +18,8 @@ export default {
},
setHoveredPeriodValues (state, { values, offset }) {
- if (values) { state.hoveredPeriod.values = values }
- if (offset) { state.hoveredPeriod.offset = offset }
+ if (values) state.hoveredPeriod.values = values
+ if (offset) state.hoveredPeriod.offset = offset
},
clearHoveredPeriodValues (state) {
state.hoveredPeriod.values = null