Open source personal finance application
Refactor code and styles, update translations
ilkome2222f1518c66
diff --git a/src/components/filter/FilterItem.vue b/src/components/filter/FilterItem.vueindex f71a1152..a3b5c89b 100644--- a/src/components/filter/FilterItem.vue+++ b/src/components/filter/FilterItem.vue@@ -46,6 +46,7 @@ export default {.filterItem__iconIcon(:icon="icon"+ :medium="true":background="color").filterItem__name {{ name }}.filterItem__close: .mdi.mdi-close@@ -61,8 +62,7 @@ export default {display flexflex-flow rowalign-items center- padding 0 $m7- height 40px+ padding 8px 12pxcolor var(--c-font-1)border-radius $m3cursor pointer@@ -79,33 +79,31 @@ export default {&._clearmargin-left automargin-right 0- color var(--c-font-1)- background var(--c-bg-8)-- /.theme-light &- background var(--c-bg-9)+ color var(--c-font-4)&:hover@media $media-laptop+ color var(--c-font-1)background var(--c-blue-1)- @media $media-phone- color var(--c-font-1)- background var(--c-blue-1)- border-radius $m3-&__iconopacity .8padding-right $m6color var(--c-font-1)+.iconwidth autoheight auto+ ^[0]._clear &+ color var(--c-font-4)+ ^[0]:hover &+ color var(--c-font-1)&__nameoverflow hiddentext-overflow ellipsistext-align center+ font-size 14px&__closemargin-left autodiff --git a/src/components/layout/LayoutMobile.vue b/src/components/layout/LayoutMobile.vueindex 8a18ec49..3963e43e 100644--- a/src/components/layout/LayoutMobile.vue+++ b/src/components/layout/LayoutMobile.vue@@ -85,7 +85,7 @@ export default {ui="widget"v-on:onClick="(id) => handleShowWalletModal(id)")StatChartsLine(- v-if="$store.state.ui.statGraphsVisible && ($store.state.filter.period !== 'all')")+ v-if="$store.state.ui.statGraphsVisibility === 'visible' && ($store.state.filter.period !== 'all')")StatMobile//- trnsdiff --git a/src/components/layout/LayoutMobileMenu.vue b/src/components/layout/LayoutMobileMenu.vueindex eab6597e..c97db109 100644--- a/src/components/layout/LayoutMobileMenu.vue+++ b/src/components/layout/LayoutMobileMenu.vue@@ -81,61 +81,62 @@ export default {<template lang="pug">.menu- .menu__row- PeriodNavMobile(v-show="activeTab === 'stat' || activeTab === 'trns'")-- .create-btn(v-show="activeTab === 'categories'")- Button(- className="_inline _small"- :title="$lang.categories.new"- v-on:onClick="$store.dispatch('setActiveTab', 'createCategory')")-- .create-btn(v-show="activeTab === 'wallets'")- Button(- className="_inline _small"- :title="$lang.wallets.new"- v-on:onClick="$store.dispatch('setActiveTab', 'createWallet')")-- .customize(v-show="activeTab === 'wallets' || activeTab === 'categories'")- ContextMenu(- :position="{ right: true, bottom: true }"- :visible="visibleCustomizeMenu"- v-on:onClickOpener="visibleCustomizeMenu = !visibleCustomizeMenu")- template(slot="opener")- Dropdown(- :active="visibleCustomizeMenu"- icon="mdi mdi-tune"- :title="$lang.settings.options")- template(slot="content")- ContextMenuItem(- icon="mdi mdi-settings"- :title="$lang.settings.open"- v-on:onClick="$store.dispatch('setActiveTab', 'settings')"- v-on:onClose="visibleCustomizeMenu = !visibleCustomizeMenu")- .context-menu-sep- ContextMenuItem(- icon="mdi mdi-currency-usd"- title="Change base currency"- v-on:onClick="$store.commit('showBaseCurrenciesModal')"- v-on:onClose="visibleCustomizeMenu = !visibleCustomizeMenu")- ContextMenuItem(- icon="mdi mdi-palette"- title="Change theme"- v-on:onClick="$store.dispatch('changeTheme')"- v-on:onClose="visibleCustomizeMenu = !visibleCustomizeMenu")-- .menu__row- template(v-for="menuItem of menu")- .menu__item(- :key="menuItem.id"- :class="getClassName(menuItem.id)"- @click="handleSetActiveTab(menuItem.id)")- .menu__item__icon: div(:class="menuItem.icon")- .menu__item__text {{ menuItem.name }}-- .menu__item._hightlight(@click="$store.dispatch('openTrnForm', { action: 'create' })")- .menu__item__icon: .mdi.mdi-library-plus- .menu__item__text {{ this.$lang.create.title }}+ .menu__wrap+ .menu__row+ PeriodNavMobile(v-show="activeTab === 'stat' || activeTab === 'trns'")++ .create-btn(v-show="activeTab === 'categories'")+ Button(+ className="_inline _small"+ :title="$lang.categories.new"+ v-on:onClick="$store.dispatch('setActiveTab', 'createCategory')")++ .create-btn(v-show="activeTab === 'wallets'")+ Button(+ className="_inline _small"+ :title="$lang.wallets.new"+ v-on:onClick="$store.dispatch('setActiveTab', 'createWallet')")++ .customize(v-show="activeTab === 'wallets' || activeTab === 'categories'")+ ContextMenu(+ :position="{ right: true, bottom: true }"+ :visible="visibleCustomizeMenu"+ v-on:onClickOpener="visibleCustomizeMenu = !visibleCustomizeMenu")+ template(slot="opener")+ Dropdown(+ :active="visibleCustomizeMenu"+ icon="mdi mdi-tune"+ :title="$lang.settings.options")+ template(slot="content")+ ContextMenuItem(+ icon="mdi mdi-settings"+ :title="$lang.settings.open"+ v-on:onClick="$store.dispatch('setActiveTab', 'settings')"+ v-on:onClose="visibleCustomizeMenu = !visibleCustomizeMenu")+ .context-menu-sep+ ContextMenuItem(+ icon="mdi mdi-currency-usd"+ title="Change base currency"+ v-on:onClick="$store.commit('showBaseCurrenciesModal')"+ v-on:onClose="visibleCustomizeMenu = !visibleCustomizeMenu")+ ContextMenuItem(+ icon="mdi mdi-palette"+ title="Change theme"+ v-on:onClick="$store.dispatch('changeTheme')"+ v-on:onClose="visibleCustomizeMenu = !visibleCustomizeMenu")++ .menu__row+ template(v-for="menuItem of menu")+ .menu__item(+ :key="menuItem.id"+ :class="getClassName(menuItem.id)"+ @click="handleSetActiveTab(menuItem.id)")+ .menu__item__icon: div(:class="menuItem.icon")+ .menu__item__text {{ menuItem.name }}++ .menu__item._hightlight(@click="$store.dispatch('openTrnForm', { action: 'create' })")+ .menu__item__icon: .mdi.mdi-library-plus+ .menu__item__text {{ this.$lang.create.title }}</template><style lang="stylus" scoped>@@ -156,13 +157,17 @@ export default {position fixedleft 0bottom 0- display grid- grid-row-gap $m5padding-top $m6width 100%background var(--c-bg-3)border-top 1px solid var(--c-bg-1)+ &__wrap+ display grid+ grid-row-gap $m5+ max-width 620px+ margin 0 auto+/.theme-light &background var(--c-bg-4)diff --git a/src/components/layout/LayoutPc.vue b/src/components/layout/LayoutPc.vueindex 48dcd1b9..b8c023cf 100644--- a/src/components/layout/LayoutPc.vue+++ b/src/components/layout/LayoutPc.vue@@ -55,7 +55,6 @@ export default {<template lang="pug">.layout- .layout-formSideOpener(@click="$store.dispatch('openTrnForm', { action: 'create' })").createTrnBtn(@click="$store.dispatch('openTrnForm', { action: 'create' })"): .mdi.mdi-library-plus//- modals@@ -75,25 +74,25 @@ export default {//- categories//------------------------------------------------LayoutPcTab(:show="activeTab === 'categories'")- .dashboard__title Categories+ .dashboard__title {{ $lang.categories.title }}CategoriesList.dashboardItems(v-on:onClick="(id) => handleShowCategoryModal(id)")Button(className="_blue _inline"icon="mdi mdi-plus"- title="New category"+ :title="$lang.categories.new"v-on:onClick="$store.dispatch('setActiveTab', 'createCategory')")//- wallets//------------------------------------------------LayoutPcTab(:show="activeTab === 'wallets'")- .dashboard__title Wallets+ .dashboard__title {{ $lang.wallets.title }}WalletsList.dashboardItems(ui="tile"v-on:onClick="(id) => handleShowWalletModal(id)")Button(className="_blue _inline"icon="mdi mdi-plus"- title="New wallet"+ :title="$lang.wallets.new"v-on:onClick="$store.dispatch('setActiveTab', 'createWallet')")//- add category@@ -110,6 +109,8 @@ export default {//------------------------------------------------LayoutPcTab(:show="activeTab === 'settings'")Settings++ .layout-formSideOpener(@click="$store.dispatch('openTrnForm', { action: 'create' })")</template><style lang="stylus">@@ -129,18 +130,20 @@ export default {@import "~@/stylus/variables/scrollbar".layout-formSideOpener+ cursor pointeropacity .3- z-index 3+ z-index 2position fixedright 0top 0- width 30px+ width 50pxheight 100%anim-all()@media $media-xl- z-index 2- width 100%+ width 180px+ @media $media-xl2+ width 400px&:hoverbackground var(--c-bg-8)@@ -149,7 +152,6 @@ export default {position relativeoverflow hiddenmin-height 100%- // max-width 1527px&__wrapoverflow hidden@@ -157,7 +159,7 @@ export default {z-index 2min-height 100vhdisplay grid- grid-template-columns minMax(280px, 320px) 1fr+ grid-template-columns 280px 1frmin-width 600pxbackground var(--c-bg-2)diff --git a/src/components/modal/ModalBottom.vue b/src/components/modal/ModalBottom.vueindex 4bd32c92..c7bb59ac 100644--- a/src/components/modal/ModalBottom.vue+++ b/src/components/modal/ModalBottom.vue@@ -27,9 +27,9 @@ export default {<template lang="pug">.modalBottom(- :style="{ maxHeight: `${$store.state.ui.height - 0}px`}"- :class="{ _center: center }"-)+ :style="{ maxHeight: `${$store.state.ui.height}px`}"+ :class="{ _center: center }")+transition(name="fadeIn" appear).modalBottom__overflow(@click="$listeners.onClose" v-show="show")@@ -38,8 +38,7 @@ export default {//- Header.modalBottom__header(@click="$listeners.onClose"- ref="header"- )+ ref="header")template(v-if="$slots.header")slot(name="header")template(v-else)@@ -62,14 +61,8 @@ export default {@import "~@/stylus/variables/media".modalBottom- &._center- @media $media-laptop- // height 100%-&__wrap^[0]._center &@media $media-laptop- // top 50%- // transform translateY(-50%)margin 0 auto</style>diff --git a/src/components/shared/dropdown/Dropdown.vue b/src/components/shared/dropdown/Dropdown.vueindex a4c649ad..b6e2e604 100644--- a/src/components/shared/dropdown/Dropdown.vue+++ b/src/components/shared/dropdown/Dropdown.vue@@ -23,7 +23,7 @@ export default {.dropdown__titletemplate(v-if="$slots.title"): slot(name="title")template(v-else) {{ title }}- .dropdown__toogle: .mdi.mdi-chevron-down+ .dropdown__toogle: .mdi.mdi-dots-vertical</template><style lang="stylus" scoped>@@ -35,10 +35,24 @@ export default {display flexalign-items stretchwidth auto+ padding 0 12pxmargin-left autoborder-radius $m3font-size 16px+ &._noBd+ padding 0 12px+ margin 0 -12px+ background transparent+ border-color transparent+ box-shadow none++ &:hover:not(._disable)+ @media $media-laptop+ color var(--c-font-3)+ background var(--c-bg-1)+ border-color var(--c-bg-8)+&._inlinedisplay inline-flex@@ -50,31 +64,25 @@ export default {display flexalign-items centerjustify-content center- font-size 22px- margin-right (- $m4)- padding-left $m6+ font-size 18px+ margin-right 6pxopacity .8&__titleflex-grow 1- padding 0 $m7white-space nowrapjustify-content flex-start+ padding-right 12px@media $media-phone-smpadding 0 $m6&__toogle+ width 4pxflex-grow 0- padding 0 $m6font-size 18px- border-left 1px solid var(--c-bg-7)justify-content center- ^[0]:hover &- @media $media-laptop- border-left 1px solid var(--c-bg-8)-divanim-all()