Open source personal finance application
Change max-width for layout and small refactor
ilkomecf93b430db70
diff --git a/src/components/chart/store/actions.js b/src/components/chart/store/actions.jsindex 0f0ce1ad..221e8067 100644--- a/src/components/chart/store/actions.js+++ b/src/components/chart/store/actions.js@@ -1,7 +1,7 @@import localforage from 'localforage'export default {- async initChart ({ rootState, dispatch, commit }) {+ async initChart ({ rootState, commit }) {const localPeriods = await localforage.getItem('next.chart.periods')let showedGroups, showedPeriodsdiff --git a/src/components/chart/store/mutations.js b/src/components/chart/store/mutations.jsindex 8b737b56..387036af 100644--- a/src/components/chart/store/mutations.js+++ b/src/components/chart/store/mutations.js@@ -1,10 +1,4 @@export default {- setAllPeriodValues (state, { values }) {- state.periods = {- ...state.periods,- ...values- }- },setPeriodValues (state, { periodName, values }) {state.periods[periodName] = {...state.periods[periodName],diff --git a/src/components/dashboard/Dashboard.vue b/src/components/dashboard/Dashboard.vueindex 6d441e94..fdf6ed9c 100644--- a/src/components/dashboard/Dashboard.vue+++ b/src/components/dashboard/Dashboard.vue@@ -43,49 +43,51 @@ export default {StatChartsLine.statMain__info- DashboardNav- StatSummaryPc+ .statMain__info__in+ DashboardNav+ StatSummaryPcDashboardFilter- .statMain__header- .statMain__header__group- .statMain__header__item._tabName(- @click="$store.commit('toogleDashboardTrnsHistory')"- :class="{ _active: !$store.state.dashboard.showTrnsHistory }") Stat- .statMain__header__item._tabName(- @click="$store.commit('toogleDashboardTrnsHistory')"- :class="{ _active: $store.state.dashboard.showTrnsHistory }") History-- .statMain__header__group._center- .statMain__header__item._monthNav(- @click="$store.dispatch('setPeriodPrev')"- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters.isFirstPeriodSelected }")- .mdi.mdi-chevron-left- | Next {{ $store.state.filter.period }}-- .statMain__header__item._monthNav(- @click="$store.dispatch('setPeriodNext')"- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters.isLastPeriodSelected }")- | Prev {{ $store.state.filter.period }} - .mdi.mdi-chevron-right-- .statMain__header__group-- .statMain__content- //- empty- //------------------------------------------------- template(v-if="$store.getters.stat.incomes.categoriesIds.length === 0 && $store.getters.stat.expenses.categoriesIds.length === 0 && $store.getters.selectedTrnsIdsWithDate.length === 0")- EmptyData(text="No stat for this period")-- //- stat & history- template(v-else)- transition(name="animation-tab")- .statMain__tab(v-show="!$store.state.dashboard.showTrnsHistory")- StatPc-- transition(name="animation-tab")- .statMain__tab._trns(v-show="$store.state.dashboard.showTrnsHistory")- TrnsList+ .statMain__box+ .statMain__header+ .statMain__header__group+ .statMain__header__item._tabName(+ @click="$store.commit('toogleDashboardTrnsHistory')"+ :class="{ _active: !$store.state.dashboard.showTrnsHistory }") Stat+ .statMain__header__item._tabName(+ @click="$store.commit('toogleDashboardTrnsHistory')"+ :class="{ _active: $store.state.dashboard.showTrnsHistory }") History++ .statMain__header__group._center+ .statMain__header__item._monthNav(+ @click="$store.dispatch('setPeriodPrev')"+ :class="{ _disable: $store.state.filter.period === 'all' || $store.getters.isFirstPeriodSelected }")+ .mdi.mdi-chevron-left+ | Next {{ $store.state.filter.period }}++ .statMain__header__item._monthNav(+ @click="$store.dispatch('setPeriodNext')"+ :class="{ _disable: $store.state.filter.period === 'all' || $store.getters.isLastPeriodSelected }")+ | Prev {{ $store.state.filter.period }} + .mdi.mdi-chevron-right++ .statMain__header__group++ .statMain__content+ //- empty+ //------------------------------------------------+ template(v-if="$store.getters.stat.incomes.categoriesIds.length === 0 && $store.getters.stat.expenses.categoriesIds.length === 0 && $store.getters.selectedTrnsIdsWithDate.length === 0")+ EmptyData(text="No stat for this period")++ //- stat & history+ template(v-else)+ transition(name="animation-tab")+ .statMain__tab(v-show="!$store.state.dashboard.showTrnsHistory")+ StatPc++ transition(name="animation-tab")+ .statMain__tab._trns(v-show="$store.state.dashboard.showTrnsHistory")+ TrnsList</template><style lang="stylus" scoped>@@ -110,16 +112,22 @@ export default {overflow-y scroll&__info- position relative- padding $m9 $mb2- background var(--c-bg-3)border-bottom 1px solid var(--c-bg-1)+ background var(--c-bg-3)- @media $media-laptop+ &__in+ position relative+ max-width 1200pxpadding $m9 $mb2- @media $media-xl- padding $m9 $mb2+ @media $media-laptop+ padding $m9 $mb2++ @media $media-xl+ padding $m9 $mb2++ &__box+ max-width 1200px&__headerdisplay griddiff --git a/src/components/filter/store/getters.js b/src/components/filter/store/getters.jsindex 053a6776..efba7fa6 100644--- a/src/components/filter/store/getters.js+++ b/src/components/filter/store/getters.js@@ -1,4 +1,2 @@export default {- // categoriesRootIds (state, getters, rootState) {- // }}diff --git a/src/components/layout/LayoutPc.vue b/src/components/layout/LayoutPc.vueindex b3ae5764..48dcd1b9 100644--- a/src/components/layout/LayoutPc.vue+++ b/src/components/layout/LayoutPc.vue@@ -149,7 +149,7 @@ export default {position relativeoverflow hiddenmin-height 100%- max-width 1527px+ // max-width 1527px&__wrapoverflow hiddendiff --git a/src/components/stat/StatMobile.vue b/src/components/stat/StatMobile.vueindex 6cfca9cf..88dbd428 100644--- a/src/components/stat/StatMobile.vue+++ b/src/components/stat/StatMobile.vue@@ -7,7 +7,6 @@ import EmptyData from '@/components/shared/emptyData/EmptyData'import FilterItem from '@/components/filter/FilterItem'import Icon from '@/components/icon/Icon'import PeriodCatsChart from '@/components/stat/cats/PeriodCatsChart'-import Slider from '@/components/slider/Slider'import StatItem from '@/components/stat/StatItem'import StatSummaryMobile from '@/components/stat/StatSummaryMobile'import TrnsList from '@/components/trns/list/TrnsList'@@ -23,7 +22,6 @@ export default {FilterItem,Icon,PeriodCatsChart,- Slider,StatItem,StatSummaryMobile,TrnsList,@@ -55,10 +53,6 @@ export default {},methods: {- onSlideChange (slideIndex) {- this.$store.commit('setStatSliderIndex', slideIndex)- },-clearCategoryFilter () {const nextCategory = this.filterCategory.parentId !== 0 ? this.filterCategory.parentId : nullthis.$store.dispatch('setFilterCategoryId', nextCategory)diff --git a/src/components/stat/cats/PeriodCatsChart.vue b/src/components/stat/cats/PeriodCatsChart.vueindex 8b62be3a..f4bd3a0e 100644--- a/src/components/stat/cats/PeriodCatsChart.vue+++ b/src/components/stat/cats/PeriodCatsChart.vue@@ -1,13 +1,11 @@<script>import PeriodCatsChartItem from '@/components/stat/cats/PeriodCatsChartItem'import PeriodCatsChartPopup from '@/components/stat/cats/PeriodCatsChartPopup'-import Slider from '@/components/slider/Slider'export default {components: {PeriodCatsChartItem,- PeriodCatsChartPopup,- Slider+ PeriodCatsChartPopup},props: {diff --git a/src/components/stat/chart/ChartItem.vue b/src/components/stat/chart/ChartItem.vueindex 4a1d22d4..205f5004 100644--- a/src/components/stat/chart/ChartItem.vue+++ b/src/components/stat/chart/ChartItem.vue@@ -125,7 +125,8 @@ export default {.chart-itempadding $m5 $m5flex-grow 1- border-left 1px solid var(--c-bg-1)+ max-width 80px+ border-left 1px solid transparentborder-right 1px solid transparent@media $media-laptop@@ -168,7 +169,7 @@ export default {color var(--c-font-2)background var(--c-bg-3)border-left 1px solid var(--c-bg-1)- border-right 1px solid transparent+ border-right 1px solid var(--c-bg-1)&._active._groupedborder-right 1px solid var(--c-bg-1)diff --git a/src/components/trnForm/TrnFormHeader.vue b/src/components/trnForm/TrnFormHeader.vueindex 39ed2e05..165ce360 100644--- a/src/components/trnForm/TrnFormHeader.vue+++ b/src/components/trnForm/TrnFormHeader.vue@@ -80,3 +80,65 @@ export default {).trnFormHeader__name {{ category.name }}</template>++<style lang="stylus" scoped>+@import "~@/stylus/variables/margins"+@import "~@/stylus/variables/media"++.trnFormHeader+ display flex+ justify-content space-between+ min-height 75px+ background var(--c-bg-8)++ @media $media-laptop+ min-height 81px++ &__item+ position relative+ display flex+ align-items center+ flex-grow 1+ width 50%+ padding $m8 $m8+ color var(--c-bg-5)++ @media $media-laptop+ min-height 81px++ &:last-child+ border-left-color var(--c-bg-5)++ &__icon+ z-index 2+ position absolute+ right $m7+ top - (48/2)px++ &__total+ padding-top $m5++ &__name+ font-size 18px+ color var(--c-font-1)++ &__transfer+ display flex+ align-items center+ justify-content center+ padding 0 $m6+ font-size 22px+ border 1px solid var(--c-bg-5)+ border-right-color transparent+ border-top-color transparent+</style>++<style lang="stylus">+.trnFormHeader__total+ .amount__wrap+ justify-content flex-start+ color var(--c-font-1)++ .amount__wrap._small+ display none+</style>diff --git a/src/components/trnForm/styles/trnFormHeader.styl b/src/components/trnForm/styles/trnFormHeader.styldeleted file mode 100644index 5f082e05..00000000--- a/src/components/trnForm/styles/trnFormHeader.styl+++ /dev/null@@ -1,55 +0,0 @@-.trnFormHeader- display flex- justify-content space-between- min-height 75px- background var(--c-bg-8)-- @media $media-laptop- min-height 81px-- &__item- position relative- display flex- align-items center- flex-grow 1- width 50%- padding $m8 $m8- color var(--c-bg-5)- //border-bottom 1px solid var(--c-bg-5)- //border-left 1px solid transparent-- @media $media-laptop- min-height 81px-- &:last-child- border-left-color var(--c-bg-5)-- &__icon- z-index 2- position absolute- right $m7- top - (48/2)px-- &__total- padding-top $m5-- .amount__wrap- justify-content flex-start- color var(--c-font-1)-- .amount__wrap._small- display none-- &__name- font-size 18px- color var(--c-font-1)-- &__transfer- display flex- align-items center- justify-content center- padding 0 $m6- font-size 22px- border 1px solid var(--c-bg-5)- border-right-color transparent- border-top-color transparentdiff --git a/src/components/trns/store/getters.js b/src/components/trns/store/getters.jsindex 32c644d6..0e4f6cf9 100644--- a/src/components/trns/store/getters.js+++ b/src/components/trns/store/getters.js@@ -83,7 +83,6 @@ export default {firstCreatedTrnId (state, getters, rootState, rootGetters) {if (rootGetters.hasTrns) {const trnsIds = [...getters.sortedTrnsIds].reverse()- // const trns = rootState.trns.itemsreturn trnsIds[0]}},