Open source personal finance application
Update styles, refactor
ilkomef214be9c9f1b
diff --git a/src/components/app/App.vue b/src/components/app/App.vueindex 7f5b3652..cb9877e2 100644--- a/src/components/app/App.vue+++ b/src/components/app/App.vue@@ -122,9 +122,9 @@ htmlfont-size 14pxline-height 1letter-spacing 0- user-select noneoverscroll-behavior-y containbackground var(--c-bg-1)+ user-select none</style><style lang="stylus" scoped>diff --git a/src/components/dashboard/DashboardFilter.vue b/src/components/dashboard/DashboardFilter.vueindex 48c144da..f9a221b0 100644--- a/src/components/dashboard/DashboardFilter.vue+++ b/src/components/dashboard/DashboardFilter.vue@@ -95,13 +95,7 @@ export default {display flexposition relativemax-width 1100px- padding 12px $mb2-- @media $media-laptop- padding 12px $m9-- @media $media-pc- padding 12px $mb2+ padding 10px 60px^[0]._sidebar &padding 20pxdiff --git a/src/components/stat/StatItem.vue b/src/components/stat/StatItem.vueindex 66049ead..22c51be2 100644--- a/src/components/stat/StatItem.vue+++ b/src/components/stat/StatItem.vue@@ -41,7 +41,7 @@ export default {data () {return {- showTrns: false+ showInside: false}},@@ -51,16 +51,17 @@ export default {const childCatsIdsWithTrns = []for (const childCategoryId of childCategoriesIds) {- const trnsIds = this.$store.getters.getSelectedTrnsIdsByFilter({+ const trnsIds = this.$store.getters.getTrnsIdsByFilter({categoryId: childCategoryId,type: this.type})if (trnsIds.length > 0) childCatsIdsWithTrns.push(childCategoryId)}- if (childCatsIdsWithTrns.length > 0) return true+ if (childCatsIdsWithTrns.length > 0) return truereturn false},+styles () {return {width: `${Math.abs(this.total) / Math.abs(this.biggest) * 100}%`,@@ -70,8 +71,8 @@ export default {},methods: {- toogleShowTrnsInCategory (categoryId) {- this.showTrns = !this.showTrns+ toogleShowInside (categoryId) {+ this.showInside = !this.showInside}}}@@ -79,13 +80,12 @@ export default {<template lang="pug">.statItem(- @click="toogleShowTrnsInCategory(categoryId)"- :class="{ _active: showTrns }")+ @click="toogleShowInside(categoryId)"+ :class="{ _active: showInside }").statItem__content.statItem__graph: .statItem__graph__in(:style="styles")- .statItem__icon(- @click.stop="() => $store.dispatch('handleSetFilterCategory', categoryId)")+ .statItem__icon(@click.stop="() => $store.dispatch('handleSetFilterCategory', categoryId)")Icon(:background="category.color":icon="category.icon"@@ -97,13 +97,12 @@ export default {:currency="currency":value="total")- template(v-if="showTrns")- template(v-if="showChildCategories")- .statItem__cats(@click.stop="")+ template(v-if="showInside")+ .statItem__inside(@click.stop="")+ template(v-if="showChildCategories")StatItemChildCats(:categoryId="categoryId", :type="type")- template(v-else)- .statItem__trns(@click.stop="")+ template(v-else)TrnsList(ui="stat":incomes="type === 1"@@ -112,10 +111,7 @@ export default {</template><style lang="stylus" scoped>-@import "~@/stylus/variables/margins"-@import "~@/stylus/variables/fonts"@import "~@/stylus/variables/media"-@import "~@/stylus/variables/scrollbar".statItemcursor pointer@@ -163,7 +159,7 @@ export default {grid-column 2 / -1grid-row 2 / -1align-self center- margin-top $m5+ margin-top 6pxbackground var(--c-bg-8)border-radius 2px@@ -192,7 +188,4 @@ export default {&__amountalign-self center-- &__trns- padding 0</style>diff --git a/src/components/stat/StatPc.vue b/src/components/stat/StatPc.vueindex c32ec479..ca2d37b4 100644--- a/src/components/stat/StatPc.vue+++ b/src/components/stat/StatPc.vue@@ -66,7 +66,7 @@ export default {.statposition relative- padding 0 $mb2+ padding 0 60px&__contentdisplay flexdiff --git a/src/components/stat/chart/ChartItem.vue b/src/components/stat/chart/ChartItem.vueindex 04daad72..8ae586a8 100644--- a/src/components/stat/chart/ChartItem.vue+++ b/src/components/stat/chart/ChartItem.vue@@ -125,6 +125,7 @@ export default {@import "~@/stylus/variables/scrollbar".chart-item+ cursor pointerpadding $m5 $m5flex-grow 1max-width 80pxdiff --git a/src/components/wallets/store/getters.js b/src/components/wallets/store/getters.jsindex 88186e09..39d7280d 100644--- a/src/components/wallets/store/getters.js+++ b/src/components/wallets/store/getters.js@@ -30,6 +30,7 @@ export default {},walletsTotal (state, getters, rootState, rootGetters) {+ if (!rootGetters.hasWallets) return {}const walletsTotal = {}const wallets = rootState.wallets.items