Open source personal finance application
update 3.2.0
ilkome371e414a1575
diff --git a/assets/stylus/variables/media.styl b/assets/stylus/variables/media.stylindex aa7beb02..b58c418f 100644--- a/assets/stylus/variables/media.styl+++ b/assets/stylus/variables/media.styl@@ -30,9 +30,8 @@ $w360 = 360px$w400 = 400px$w440 = 440px-//// custom width-//+// -----------------------------------------------------------------------------media($width, $less = false)if $less@media (max-width: $width)@@ -41,9 +40,8 @@ media($width, $less = false)@media (min-width: $width){block}-//// tablet-//+// -----------------------------------------------------------------------------media-tablet($less = false)if $less@media (max-width: $tablet - 1)@@ -52,9 +50,8 @@ media-tablet($less = false)@media (min-width: $tablet){block}-//// laptop-//+// -----------------------------------------------------------------------------media-laptop($less = false)if $less@media (max-width: $laptop - 1)diff --git a/components/SummaryRow2.vue b/components/SummaryRow2.vueindex 5d7fd019..b195f17f 100644--- a/components/SummaryRow2.vue+++ b/components/SummaryRow2.vue@@ -17,7 +17,7 @@ export default {.summary//- Incomes.summary__item._incomes- .summary__item__title._incomes {{ $lang.money.incomes }}+ .summary__item__title._incomes {{ $t('money.incomes') }}.summary__item__amountAmount(:center="true"@@ -29,7 +29,7 @@ export default {//- Expenses.summary__item._expenses- .summary__item__title._expenses {{ $lang.money.expenses }}+ .summary__item__title._expenses {{ $t('money.expenses') }}.summary__item__amountAmount(:center="true"@@ -42,7 +42,7 @@ export default {//- Total.summary__item._totaltemplate(v-if="(incomesAmount - expensesAmount) !== 0")- .summary__item__title {{ $lang.money.total }}+ .summary__item__title {{ $t('money.total') }}.summary__item__amountAmount(v-if="incomesAmount > 0 || expensesAmount > 0"diff --git a/components/amount/Amount.vue b/components/amount/Amount.vueindex 013596f4..00bed7d7 100644--- a/components/amount/Amount.vue+++ b/components/amount/Amount.vue@@ -115,8 +115,8 @@ export default {font-size 16px&._base- padding-top 5pxopacity .6+ padding-top 5px&__valuefont-size 15px@@ -135,8 +135,8 @@ export default {padding-left 2px~/._original &- font-size 12pxpadding-bottom 1px+ font-size 12px~/._base &font-size 10pxdiff --git a/components/amount/amount.styl b/components/amount/amount.stylindex 0b52fff9..1d07d60d 100644--- a/components/amount/amount.styl+++ b/components/amount/amount.styl@@ -15,8 +15,8 @@&__wrapdisplay flexflex-flow row nowrap- justify-content flex-endalign-items flex-end+ justify-content flex-end^[0]._center &justify-content centerdiff --git a/components/budgets/BudgetForm.vue b/components/budgets/BudgetForm.vueindex c74397b6..8256a2b6 100644--- a/components/budgets/BudgetForm.vue+++ b/components/budgets/BudgetForm.vue@@ -79,42 +79,29 @@ export default {<template lang="pug">.form- .form__title {{ $lang.budgets.form.title }}+ .form__title {{ $t('budgets.form.title') }}.form__group(ref="budgetNameRef")- .inputText__label {{ $lang.budgets.form.name }}+ .inputText__label {{ $t('budgets.form.name') }}.inputTextinput.inputText__value(+ v-model="budgetName"+ :placeholder="`${$t('budgets.form.name')}...`"type="text"- :placeholder="`${$lang.budgets.form.name}...`"- v-model="budgetName")+ ).form__group(ref="budgetAmountRef")- .inputText__label {{ $lang.budgets.form.amount }}+ .inputText__label {{ $t('budgets.form.amount') }}.inputTextcleave(v-model="budgetAmount"- :placeholder="`${$lang.budgets.form.amount} ${$store.state.currencies.base}...`"+ :placeholder="`${$t('budgets.form.amount')} ${$store.state.currencies.base}...`"class="inputText__value _number":options="amountInputOptions")- //- .form__group- .inputText__label {{ $lang.budgets.trns.name }}-- TrnsList(v-slot="{ trns }")- TrnItem(- v-for="trnItem in trns"- @onClick="handleSelectTrn(trnItem.id)"- :category="trnItem.category"- :className="{ _selected: isSelectedTrn(trnItem.id) }"- :id="trnItem.id"- :key="trnItem.id"- :trn="trnItem.trn"- :wallet="trnItem.wallet")-Button(className="_blue _inline _text-center"- :title="$lang.budgets.form.button"+ :title="$t('budgets.form.button')"@onClick="handleCreateBudget")</template>@@ -138,8 +125,8 @@ export default {.inputText__valueheight 40px- font-size 16pxpadding 0 16px+ font-size 16pxbackground var(--c-bg-1)border 1px solid var(--c-bg-7)border-radius 3pxdiff --git a/components/budgets/BudgetItem.vue b/components/budgets/BudgetItem.vueindex 6dc68b82..ddfd0472 100644--- a/components/budgets/BudgetItem.vue+++ b/components/budgets/BudgetItem.vue@@ -78,7 +78,7 @@ export default {.budgetItem__total.sum._right- .sum__title {{ $lang.budgets.stat.total }}+ .sum__title {{ $t('budgets.stat.total') }}.sum__amountAmount(:currency="budget.currency" :value="budget.amount")@@ -88,11 +88,11 @@ export default {.budgetItem__info(@click="isTrnsVisible = !isTrnsVisible").budgetItem__amounts.sum- .sum__title {{ $lang.budgets.stat.left }}+ .sum__title {{ $t('budgets.stat.left') }}.sum__amountAmount(:currency="budget.currency" :value="budget.amount - gotAmount").sum._right- .sum__title {{ $lang.budgets.stat.got }}+ .sum__title {{ $t('budgets.stat.got') }}.sum__amountAmount(:currency="budget.currency" :type="1" :value="gotAmount")diff --git a/components/budgets/Budgets.vue b/components/budgets/Budgets.vueindex 9d13f222..d9e2fd18 100644--- a/components/budgets/Budgets.vue+++ b/components/budgets/Budgets.vue@@ -24,7 +24,7 @@ export default {<template lang="pug">ComponentWrap- template(slot="headerLeft") {{ $lang.budgets.name }}+ template(slot="headerLeft") {{ $t('budgets.name') }}template(slot="contentLeft" v-if="$store.getters['budgets/budgetsTotal']").budgetItem._total@@ -34,7 +34,7 @@ ComponentWrap.budgetItem__total.sum._right- .sum__title {{ $lang.budgets.stat.total }}+ .sum__title {{ $t('budgets.stat.total') }}.sum__amountAmount(:currency="$store.state.currencies.base"@@ -43,14 +43,14 @@ ComponentWrap.budgetItem__info.budgetItem__amounts.sum- .sum__title {{ $lang.budgets.stat.left }}+ .sum__title {{ $t('budgets.stat.left') }}.sum__amountAmount(:currency="$store.state.currencies.base":value="$store.getters['budgets/budgetsTotal'].total - $store.getters['budgets/budgetsTotal'].incomes").sum._right- .sum__title {{ $lang.budgets.stat.got }}+ .sum__title {{ $t('budgets.stat.got') }}.sum__amountAmount(:currency="$store.state.currencies.base"diff --git a/components/categories/form/CategoryForm.vue b/components/categories/form/CategoryForm.vueindex 9438940e..2975a881 100644--- a/components/categories/form/CategoryForm.vue+++ b/components/categories/form/CategoryForm.vue@@ -121,7 +121,7 @@ export default {if (!this.category.name) {this.$notify({title: '😮',- text: this.$lang.categories.form.name.error+ text: this.$t('categories.form.name.error')})return false}@@ -132,7 +132,7 @@ export default {if (this.categoryId !== categoryId) {this.$notify({title: '😮',- text: this.$lang.categories.form.name.exist+ text: this.$t('categories.form.name.exist')})return false}@@ -140,7 +140,7 @@ export default {else {this.$notify({title: '😮',- text: this.$lang.categories.form.name.exist+ text: this.$t('categories.form.name.exist')})return false}@@ -157,8 +157,8 @@ export default {ComponentWraptemplate(slot="headerLeft")template(v-if="!categoryId")- div {{ $lang.categories.createNewTitle }}- template(v-else) {{ $lang.categories.editTitle }}+ div {{ $t('categories.createNewTitle') }}+ template(v-else) {{ $t('categories.editTitle') }}template(slot="content").form@@ -166,10 +166,10 @@ ComponentWrap.inputTextinput(type="text"- :placeholder="$lang.categories.form.name.placeholder"+ :placeholder="$t('categories.form.name.placeholder')"v-model="category.name").inputText__value- .inputText__label {{ $lang.categories.form.name.label }}+ .inputText__label {{ $t('categories.form.name.label') }}//- can not change root category if inside this category already has some categoriestemplate(v-if="this.$store.getters['categories/getChildCategoriesIds'](categoryId).length === 0 && $store.getters['categories/hasCategories']")@@ -186,27 +186,27 @@ ComponentWrap.inputModal__name {{ $store.state.categories.items[category.parentId].name }}template(v-else).inputModal__icon: .mdi.mdi-folder-star- .inputModal__name {{ $lang.categories.form.parent.no }}- .inputModal__label {{ $lang.categories.form.parent.label }}+ .inputModal__name {{ $t('categories.form.parent.no') }}+ .inputModal__label {{ $t('categories.form.parent.label') }}.form__btns.form__btns__i.form-line(@click="showColors = true").inputModal._flex.inputModal__value: .inputModal__color(:style="{ background: category.color }")- .inputModal__label {{ $lang.categories.form.color.label }}+ .inputModal__label {{ $t('categories.form.color.label') }}.form__btns__i.form-line(@click="showIcons = true").inputModal._flex.inputModal__icon: div(:class="category.icon", :style="{ color: category.color }")- .inputModal__label {{ $lang.categories.form.icon.label }}+ .inputModal__label {{ $t('categories.form.icon.label') }}template(v-if="$store.getters['categories/getChildCategoriesIds'](categoryId).length").form-line._p0._cleanCheckbox(v-model="applyChildColor"- :title="$lang.categories.form.childColor"+ :title="$t('categories.form.childColor')":alt="true")@@ -214,12 +214,12 @@ ComponentWrap.form-line._p0._cleanCheckbox(v-model="category.showInLastUsed"- :title="$lang.categories.form.lastUsed"+ :title="$t('categories.form.lastUsed')":alt="true").form-line._p0._cleanCheckbox(v-model="category.showInQuickSelector"- :title="$lang.categories.form.quickSelector"+ :title="$t('categories.form.quickSelector')":alt="true")//- colors@@ -229,7 +229,7 @@ ComponentWrap)ModalBottom(:center="true"- :title="$lang.categories.form.color.placeholder"+ :title="$t('categories.form.color.placeholder')"@onClose="showColors = false").inputText@@ -242,7 +242,7 @@ ComponentWrap@click="handleColorSelect(color)").customColor- .customColor__title {{ $lang.categories.form.color.custom }}+ .customColor__title {{ $t('categories.form.color.custom') }}input.customColor__value(v-model="category.color" type="color")//- parent@@ -253,12 +253,12 @@ ComponentWrapModalBottom(key="parent":center="true"- :title="$lang.categories.form.parent.label"+ :title="$t('categories.form.parent.label')"@onClose="showParents = false").padding-bottomModalButton(- :name="$lang.categories.form.parent.no"+ :name="$t('categories.form.parent.no')"icon="mdi mdi-folder-star"@onClick="() => handleParenCategorySelect(0)")CategoriesView(@@ -273,7 +273,7 @@ ComponentWrap)ModalBottom(:center="true"- :title="$lang.categories.form.icon.placeholder"+ :title="$t('categories.form.icon.placeholder')"@onClose="showIcons = false").icons@@ -292,7 +292,7 @@ ComponentWrap.colButton(:class="['_text-center _blue _ml-big', { _inline: $store.state.ui.pc }]"- :title="$lang.categories.form.save"+ :title="$t('categories.form.save')"@onClick="handleSubmit")</template>diff --git a/components/categories/modal/CategoryModal.vue b/components/categories/modal/CategoryModal.vueindex 1ab69f95..3e3d438d 100644--- a/components/categories/modal/CategoryModal.vue+++ b/components/categories/modal/CategoryModal.vue@@ -104,7 +104,7 @@ export default {<template lang="pug">divPortal(- v-if="$store.state.categories.modal.id"+ v-if="$store.state.categories.modal.show"to="modal")ModalBottom(@@ -113,26 +113,27 @@ div@afterClose="$store.commit('categories/setCategoryModalId', null)")template(slot="header")- .modalBottom__header__title {{ category.name }}- .modalBottom__child(v-if="childCategoriesIds.length > 0") {{ childCategoriesIds.length }}- .modalBottom__icon- Icon(- :icon="category.icon"- :background="category.color || $store.state.ui.defaultBgColor"- :round="true"- :big="true")+ .categoryWrap+ .categoryIcon+ Icon(+ :icon="category.icon"+ :background="category.color || $store.state.ui.defaultBgColor"+ :round="true"+ :big="true"+ )+ .modalBottom__header__title {{ category.name }}template(slot="btns")ModalButton(- :name="$lang.base.delete"+ :name="$t('base.delete')"icon="mdi mdi-delete"@onClick="handleDeleteClick")ModalButton(- :name="$lang.base.edit"+ :name="$t('base.edit')"icon="mdi mdi-pencil"@onClick="handleEditClick")ModalButton(- :name="$lang.base.filter"+ :name="$t('base.filter')"icon="mdi mdi-filter-outline"@onClick="handleSetFilterCategory")@@ -149,3 +150,21 @@ div@onClose="showModalConfirm = false"@onConfirm="handleDeleteConfirm")</template>++<style lang="stylus" scoped>+.categoryWrap+ flex-grow 1+ display flex+ align-items center+ justify-content center+ flex-flow column+ margin-top -38px+ margin-bottom -10px++.categoryIcon+ flex-grow 1+ display flex+ align-items center+ justify-content center+ padding-bottom 12px+</style>diff --git a/components/currencies/CurrencyModal.vue b/components/currencies/CurrencyModal.vueindex e9029f43..8977ceb3 100644--- a/components/currencies/CurrencyModal.vue+++ b/components/currencies/CurrencyModal.vue@@ -16,7 +16,7 @@ Portal()ModalBottom(:center="true"- title="Select base currency"+ :title="$t('currency.selectBaseTitle')"@onClose="$store.commit('currencies/hideBaseCurrenciesModal')").inputTextdiff --git a/components/currencies/currencies.styl b/components/currencies/currencies.stylindex dad7a322..46337211 100644--- a/components/currencies/currencies.styl+++ b/components/currencies/currencies.styl@@ -1,13 +1,8 @@.currencies- display flex- flex-wrap wrap-&__itemflex 1- text-align center- margin 0 -1px -1px 0- padding $m7 $m7- border 1px solid var(--c-bg-6)+ padding $m6+ border-bottom 1px solid var(--c-bg-6)&:hover@media $media-laptopdiff --git a/components/dashboard/Dashboard.vue b/components/dashboard/Dashboard.vueindex 879aaa32..ec09ebe4 100644--- a/components/dashboard/Dashboard.vue+++ b/components/dashboard/Dashboard.vue@@ -22,7 +22,9 @@ export default {<template lang="pug">.dashboard(v-show="$store.state.ui.activeTab === 'stat'")- StatChartsLine+ .dashboard__wrap+ StatChartsLine+DashboardNavStatSummaryPcDashboardFilter@@ -32,27 +34,27 @@ export default {.startSomething.options__item(v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']")Button._grey._center(- :title="$lang.createTrn"+ :title="$t('createTrn')"@onClick="$store.dispatch('trnForm/openTrnForm', { action: 'create' })").options__item(v-if="!$store.getters['wallets/hasWallets'] && !$store.getters['categories/hasCategories']")- h4 {{ $lang.welcome.firstRun.text }}+ h4 {{ $t('welcome.firstRun.text') }}Button._blue._center(size="xl"- :title="$lang.welcome.firstRun.btn"+ :title="$t('welcome.firstRun.btn')"@onClick="$router.push('/welcome')").options__item(v-if="$store.state.demo.hasDemo").options__or.options__or__border- .options__or__text {{ $lang.welcome.or }}+ .options__or__text {{ $t('welcome.or') }}- h4 {{ $lang.welcome.demo.text }}+ h4 {{ $t('welcome.demo.text') }}Button._blue._center(size="xl"- :title="$lang.welcome.demo.btn"+ :title="$t('welcome.demo.btn')"@onClick="$store.dispatch('demo/createDemo')")diff --git a/components/dashboard/DashboardNav.vue b/components/dashboard/DashboardNav.vueindex 7f2432fe..4d2ed195 100644--- a/components/dashboard/DashboardNav.vue+++ b/components/dashboard/DashboardNav.vue@@ -25,34 +25,39 @@ export default {template(slot="content")ContextMenuItem(icon="mdi mdi-weather-sunset-up"- :title="$lang.dates.day.simple"+ :title="$t('dates.day.simple')":selected="$store.state.filter.period === 'day'"@onClick="$store.dispatch('filter/setPeriod', 'day')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")+ @onClose="visiblePeriodMenu = !visiblePeriodMenu"+ )ContextMenuItem(icon="mdi mdi-calendar-week"- :title="$lang.dates.week.simple"+ :title="$t('dates.week.simple')":selected="$store.state.filter.period === 'week'"@onClick="$store.dispatch('filter/setPeriod', 'week')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")+ @onClose="visiblePeriodMenu = !visiblePeriodMenu"+ )ContextMenuItem(icon="mdi mdi-calendar"- :title="$lang.dates.month.simple"+ :title="$t('dates.month.simple')":selected="$store.state.filter.period === 'month'"@onClick="$store.dispatch('filter/setPeriod', 'month')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")+ @onClose="visiblePeriodMenu = !visiblePeriodMenu"+ )ContextMenuItem(icon="mdi mdi-calendar-star"- :title="$lang.dates.year.simple"+ :title="$t('dates.year.simple')":selected="$store.state.filter.period === 'year'"@onClick="$store.dispatch('filter/setPeriod', 'year')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")+ @onClose="visiblePeriodMenu = !visiblePeriodMenu"+ )ContextMenuItem(icon="mdi mdi-database"- :title="$lang.dates.all"+ :title="$t('dates.all')":selected="$store.state.filter.period === 'all'"@onClick="$store.dispatch('filter/setPeriod', 'all')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")+ @onClose="visiblePeriodMenu = !visiblePeriodMenu"+ ).periodNav__group._align-right@@ -70,41 +75,46 @@ export default {template(slot="opener")Dropdown._noBd(:active="visibleContextMenu"- :title="$lang.settings.customize")+ :title="$t('settings.customize')"+ )template(slot="content")ContextMenuItem(- icon="mdi mdi-chart-bar-stacked"- title="Periods chart"+ :title="$t('stat.customize.showPeriodsChart')":showCheckbox="true":checkboxValue="$store.state.ui.statGraphsVisibility === 'visible'"- @onClick="$store.dispatch('ui/toogleShowStatGraphs')")+ icon="mdi mdi-chart-bar-stacked"+ @onClick="$store.dispatch('ui/toogleShowStatGraphs')"+ )ContextMenuItem(icon="mdi mdi-folder-star"- title="Cats chart"+ :title="$t('stat.customize.showCategorisChart')":showCheckbox="true":checkboxValue="$store.state.ui.catsChart === 'visible'"@onClick="$store.dispatch('ui/toogleVisibleCatsChart')")ContextMenuItem(- icon="mdi mdi-chart-gantt"- title="Cats stat"+ :title="$t('stat.customize.showCategorisList')":showCheckbox="true":checkboxValue="$store.state.ui.statItems === 'visible'"- @onClick="$store.dispatch('ui/toogleVisibilityStatItems')")+ icon="mdi mdi-chart-gantt"+ @onClick="$store.dispatch('ui/toogleVisibilityStatItems')"+ ).context-menu-sepContextMenuItem(+ :title="$t('theme.change')"icon="mdi mdi-palette"- title="Change theme"- @onClick="$store.dispatch('ui/changeTheme')")+ @onClick="$store.dispatch('ui/changeTheme')"+ )ContextMenuItem(+ :title="$t('currency.selectBaseTitle')"icon="mdi mdi-currency-usd"- title="Change base currency"@onClick="$store.commit('currencies/showBaseCurrenciesModal')"- @onClose="visibleContextMenu = !visibleContextMenu")+ @onClose="visibleContextMenu = !visibleContextMenu"+ )</template><style lang="stylus" scoped>diff --git a/components/dashboard/DashboardStatControl.vue b/components/dashboard/DashboardStatControl.vueindex 22314d1f..7445d356 100644--- a/components/dashboard/DashboardStatControl.vue+++ b/components/dashboard/DashboardStatControl.vue@@ -9,27 +9,27 @@ export default {.tabs.tabItem(@click="$store.commit('dashboard/setDashboardActiveTab', 'stat')"- :class="{ _active: $store.state.dashboard.activeTab === 'stat' }") Stat+ :class="{ _active: $store.state.dashboard.activeTab === 'stat' }") {{ $t('stat.shortTitle') }}.tabItem(@click="$store.commit('dashboard/setDashboardActiveTab', 'history')"- :class="{ _active: $store.state.dashboard.activeTab === 'history' }") History+ :class="{ _active: $store.state.dashboard.activeTab === 'history' }") {{ $t('trns.history') }}.tabItem(@click="$store.commit('dashboard/setDashboardActiveTab', 'balance')"- :class="{ _active: $store.state.dashboard.activeTab === 'balance' }") Balance-- //- .tabItem(- //- @click="$store.commit('dashboard/setDashboardActiveTab', 'overview')"- //- :class="{ _active: $store.state.dashboard.activeTab === 'overview' }") Overview+ :class="{ _active: $store.state.dashboard.activeTab === 'balance' }") {{ $t('stat.balanceTitle') }}.tabs.tabItem(- @click="$store.dispatch('filter/setPeriodPrev')"- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isFirstPeriodSelected'] }") Next {{ this.$store.state.filter.period }}- .tabItem(+ :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isLastPeriodSelected'] }"@click="$store.dispatch('filter/setPeriodNext')"- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isLastPeriodSelected'] }") Last {{ this.$store.state.filter.period }}+ ) {{ $t('buttons.prevTitle') }} {{ $t(`dates.${$store.state.filter.period}.simple`) }}++ .tabItem(+ :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isFirstPeriodSelected'] }"+ @click="$store.dispatch('filter/setPeriodPrev')"+ ) {{ $t('buttons.nextTitle') }} {{ $t(`dates.${$store.state.filter.period}.simple`) }}+</template><style lang="stylus" scoped>diff --git a/components/groups/GroupForm.vue b/components/groups/GroupForm.vueindex 17bf5a30..3e4ac75d 100644--- a/components/groups/GroupForm.vue+++ b/components/groups/GroupForm.vue@@ -65,18 +65,18 @@ export default {<template lang="pug">.form- .form__title {{ $lang.groups.form.title }}+ .form__title {{ $t('groups.form.title') }}.form__group(ref="groupNameRef")- .inputText__label {{ $lang.groups.form.name }}+ .inputText__label {{ $t('groups.form.name') }}.inputTextinput.inputText__value(type="text"- :placeholder="`${$lang.groups.form.name}...`"+ :placeholder="`${$t('groups.form.name')}...`"v-model="groupName")Button(className="_new"- :title="$lang.groups.form.button"+ :title="$t('groups.form.button')"@onClick="handleCreateGroup")</template>diff --git a/components/groups/GroupItem.vue b/components/groups/GroupItem.vueindex 513bd799..f7819f8d 100644--- a/components/groups/GroupItem.vue+++ b/components/groups/GroupItem.vue@@ -91,7 +91,7 @@ export default {//- total.groupItem__total.sum._right- .sum__title {{ $lang.groups.stat.total }}+ .sum__title {{ $t('groups.stat.total') }}.sum__amountAmount(:currency="group.currency" :value="totalAmount")@@ -100,13 +100,13 @@ export default {.groupItem__amounts//- expenses.sum- .sum__title {{ $lang.groups.stat.expenses }}+ .sum__title {{ $t('groups.stat.expenses') }}.sum__amountAmount(:currency="group.currency" :type="0" :value="gotAmount.expenses")//- incomes.sum._right- .sum__title {{ $lang.groups.stat.incomes }}+ .sum__title {{ $t('groups.stat.incomes') }}.sum__amountAmount(:currency="group.currency" :type="1" :value="gotAmount.incomes")diff --git a/components/groups/Groups.vue b/components/groups/Groups.vueindex 034cdf6c..628f7883 100644--- a/components/groups/Groups.vue+++ b/components/groups/Groups.vue@@ -30,7 +30,7 @@ export default {<template lang="pug">ComponentWraptemplate(slot="headerLeft")- div {{ $lang.groups.name }}+ div {{ $t('groups.name') }}template(slot="contentLeft")//- pre {{ groups }}diff --git a/components/lang/LangDropdown.vue b/components/lang/LangDropdown.vueindex 95426c4d..7b9691c9 100644--- a/components/lang/LangDropdown.vue+++ b/components/lang/LangDropdown.vue@@ -8,7 +8,9 @@ export default {computed: {currentLanguageName () {- switch (this.$store.state.lang.lang) {+ console.log(this.$i18n.locale)++ switch (this.$i18n.locale) {case 'ru':return '🇷🇺 Russian - Русский'default:@@ -20,10 +22,7 @@ export default {methods: {changeLang (lang) {this.visibleDropdown = false- setTimeout(() => {- this.$store.dispatch('lang/setLang', lang)- this.$setLang(lang)- }, 100)+ this.$store.dispatch('lang/setLang', lang)}}}@@ -34,11 +33,14 @@ divContextMenu(:position="{ left: true, top: true }":visible="visibleDropdown"- @onClickOpener="visibleDropdown = !visibleDropdown")+ @onClickOpener="visibleDropdown = !visibleDropdown"+ )+template(slot="opener")Dropdown(:active="visibleDropdown"- :title="currentLanguageName")+ :title="currentLanguageName"+ )template(slot="content")ContextMenuItem(title="🇷🇺 Russian - Русский (Не полный)"diff --git a/components/layout/Layout.vue b/components/layout/Layout.vueindex 13aff86f..a073fa93 100644--- a/components/layout/Layout.vue+++ b/components/layout/Layout.vue@@ -5,7 +5,7 @@ export default {<template lang="pug">.layout- LazyLayoutMobile2(v-if="$store.state.ui.mobile")+ LazyLayoutMobile(v-if="$store.state.ui.mobile")LazyLayoutPc(v-if="$store.state.ui.pc")</template>diff --git a/components/layout/LayoutMobile.vue b/components/layout/LayoutMobile.vueindex 8b2cb30f..75b6ada1 100644--- a/components/layout/LayoutMobile.vue+++ b/components/layout/LayoutMobile.vue@@ -7,13 +7,42 @@ export default {data () {return {- slider: null+ slider: null,+ visibleContextMenu: false,++ selectedPeriodAmount: {+ label: '',+ incomes: '',+ expenses: ''+ },++ periods: [{+ slug: 'day',+ name: this.$t('dates.day.simple')+ }, {+ slug: 'week',+ name: this.$t('dates.week.simple')+ }, {+ slug: 'month',+ name: this.$t('dates.month.simple')+ }, {+ slug: 'year',+ name: this.$t('dates.year.simple')+ }]}},computed: {activeTab () {return this.$store.state.ui.activeTab+ },++ stat () {+ return this.$store.getters['stat/statCurrentPeriod']+ },++ periodName () {+ return this.$store.state.filter.period}},@@ -30,14 +59,18 @@ export default {},methods: {+ clickHandler () {+ const index = this.slider.activeIndex+ index === 0 && this.slider.slideNext()+ },+handleShowWalletModal (id) {this.$store.commit('wallets/showWalletModal')this.$store.commit('wallets/setWalletModalId', id)},- clickHandler () {- const index = this.slider.activeIndex- index === 0 && this.slider.slideNext()+ changePeriod (period) {+ this.$store.dispatch('filter/setPeriod', period)}}}@@ -45,114 +78,202 @@ export default {<template lang="pug">.wrap- .swiper-container(ref="slider")- .swiper-wrapper- .swiper-slide._sidebar- Menu(@onClickMenuCalback="slider.slideNext()")- .block- WalletsTotal- .menu__wallets- WalletsList(:limit="6")-- .swiper-slide._static- .handler(@click="clickHandler")-- .layoutMobile- //------------------------------------------------- //- content- //------------------------------------------------- .layoutMobile__content- .tabs.swiper-no-swiping- //- wallets- transition(name="animation-tab")- .tab(v-show="activeTab === 'wallets'")- ComponentWrap(:contentPadding="false")- template(slot="content")- WalletsTotal- WalletsList(- @onClick="(id) => handleShowWalletModal(id)"- )-- template(slot="bottom")- .flex- .col- Button(- className="_inline _small"- :title="$lang.wallets.new"- @onClick="$store.dispatch('ui/setActiveTab', 'createWallet')")- .col- Button(- className="_inline _small"- :title="$lang.base.sort"- @onClick="$store.dispatch('ui/setActiveTab', 'walletsSort')")-- //- wallets sort- transition(name="animation-tab")- .tab(v-if="activeTab === 'walletsSort'")- WalletsSort-- //- categories- transition(name="animation-tab")- .tab(v-show="activeTab === 'categories'")- ComponentWrap(:contentPadding="false")- template(slot="headerLeft") {{ $lang.categories.name }}-- template(slot="content")- CategoriesList(- :style="{ paddingTop: '16px' }"- @onClick="(id) => $store.dispatch('categories/showCategoryModal', id)")-- template(slot="bottom")- Button(- className="_inline _small"- :title="$lang.categories.new"- @onClick="$store.dispatch('ui/setActiveTab', 'createCategory')")-- //- stat- transition(name="animation-tab")- .tab(v-show="activeTab === 'stat'")- LayoutMobile2-- //- trns- transition(name="animation-tab")- .tab(v-if="activeTab === 'trns'")- TrnsList-- //- Settings- transition(name="animation-tab")- .tab(v-if="activeTab === 'settings'")- Settings-- //- create category- transition(name="animation-tab")- .tab(v-if="activeTab === 'createCategory'")- CategoryForm-- //- create wallet- transition(name="animation-tab")- .tab(v-if="activeTab === 'createWallet'")- WalletForm-- transition(name="animation-tab")- .tab(v-if="activeTab === 'groups'")- Groups-- transition(name="animation-tab")- .tab(v-if="activeTab === 'budgets'")- Budgets-- //------------------------------------------------- //- menu- //------------------------------------------------- .layoutMobile__menu- LayoutMobileMenu-- //- modals- CategoryModal+ .layoutMobile+ .layoutMobile__content+ .swiper-container(ref="slider")+ .swiper-wrapper+ //- Wallets+ .swiper-slide+ ComponentWrap(:contentPadding="false")+ template(slot="content")+ WalletsTotal+ WalletsList3(+ @onClick="(id) => handleShowWalletModal(id)"+ )++ template(slot="bottom")+ .flex+ .col+ Button(+ :title="$t('wallets.new')"+ className="_inline _small"+ @onClick="$store.dispatch('ui/setActiveTab', 'createWallet')"+ )+ .col+ Button(+ :title="$t('base.sort')"+ className="_inline _small"+ @onClick="$store.dispatch('ui/setActiveTab', 'walletsSort')"+ )++ //- Stat+ //------------------------------------------------------------------------------+ .swiper-slide+ .page+ .page__wrap+ .page__nav+ h1: Date+ .page__customize+ ContextMenu(+ :position="{ right: '0px', top: '0px' }"+ :visible="visibleContextMenu"+ @onClickOpener="visibleContextMenu = !visibleContextMenu")++ template(slot="opener")+ .opener+ .mdi.mdi-tune++ template(slot="content")+ ContextMenuItem(+ :title="$t('stat.customize.showPeriodsChart')"+ :showCheckbox="true"+ :checkboxValue="$store.state.ui.statGraphsVisibility === 'visible'"+ icon="mdi mdi-chart-bar-stacked"+ @onClick="$store.dispatch('ui/toogleShowStatGraphs')"+ )++ ContextMenuItem(+ :title="$t('stat.customize.showCategorisChart')"+ :showCheckbox="true"+ :checkboxValue="$store.state.ui.catsChart === 'visible'"+ icon="mdi mdi-folder-star"+ @onClick="$store.dispatch('ui/toogleVisibleCatsChart')"+ )++ ContextMenuItem(+ :title="$t('stat.customize.showCategorisList')"+ :showCheckbox="true"+ :checkboxValue="$store.state.ui.statItems === 'visible'"+ icon="mdi mdi-chart-gantt"+ @onClick="$store.dispatch('ui/toogleVisibilityStatItems')"+ )++ .context-menu-sep++ ContextMenuItem(+ :title="$t('theme.change')"+ icon="mdi mdi-palette"+ @onClick="$store.dispatch('ui/changeTheme')"+ )++ .page__content+ .chartBar(v-show="$store.state.ui.statGraphsVisibility === 'visible'")+ ChartMenu2+ StatChartsLine2++ .switcher(:class="{ _round: $store.state.ui.statGraphsVisibility === 'hidden' }")+ .switcher__content+ .switcher__item._arrow(+ v-if="$store.state.ui.statGraphsVisibility === 'hidden'"+ :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isLastPeriodSelected'] }"+ @click="$store.dispatch('filter/setPeriodNext')"+ ): .mdi.mdi-chevron-left++ .switcher__item(+ v-for="periodItem in periods"+ :key="periodItem.slug"+ :class="{ _active: $store.state.filter.period === periodItem.slug }"+ @click="changePeriod(periodItem.slug)"+ ) {{ periodItem.name }}++ .switcher__item._arrow(+ v-if="$store.state.ui.statGraphsVisibility === 'hidden'"+ :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isFirstPeriodSelected'] }"+ @click="$store.dispatch('filter/setPeriodPrev')"+ ): .mdi.mdi-chevron-right++ StatMobile2++ //- Categories+ .swiper-slide+ ComponentWrap(:contentPadding="false")+ template(slot="headerLeft") {{ $t('categories.name') }}++ template(slot="content")+ CategoriesList(+ :style="{ paddingTop: '16px' }"+ @onClick="(id) => $store.dispatch('categories/showCategoryModal', id)"+ )++ template(slot="bottom")+ .flex+ .col+ Button(+ :title="$t('categories.new')"+ className="_inline _small"+ @onClick="$store.dispatch('ui/setActiveTab', 'createCategory')"+ )++ .layoutMobile__menu+ LayoutMobileMenu(:slider="slider")++ //- Modals+ CategoryModal(:slider="slider")CurrencyModalTrnFormTrnModal- WalletModal+ WalletModal(:slider="slider")+ CategoryStatModal++ //- Caegory Form: create or edit+ //------------------------------------------------------------------------------+ Portal(+ v-if="activeTab === 'menu'"+ to="modal"+ )+ ModalBottom(+ key="menu"+ @onClose="$store.dispatch('ui/setActiveTab', 'stat')"+ )+ Menu++ //- Caegory Form: create or edit+ //------------------------------------------------------------------------------+ Portal(+ v-if="activeTab === 'createCategory'"+ to="modal"+ )+ ModalBottom(+ key="createCategory"+ @onClose="$store.dispatch('ui/setActiveTab', 'stat')"+ )+ CategoryForm++ //- Settings+ //------------------------------------------------------------------------------+ Portal(+ v-if="activeTab === 'settings'"+ to="modal"+ )+ ModalBottom(@onClose="$store.dispatch('ui/setActiveTab', 'stat')")+ Settings(v-if="activeTab === 'settings'")++ //- Wallet Form: create or edit+ //------------------------------------------------------------------------------+ Portal(+ v-if="activeTab === 'createWallet'"+ to="modal"+ )+ ModalBottom(+ :key="$store.state.wallets.editId"+ @onClose="$store.dispatch('ui/setActiveTab', 'stat')"+ )+ WalletForm++ //- Wallet Sort+ //------------------------------------------------------------------------------+ Portal(+ v-if="activeTab === 'walletsSort'"+ to="modal"+ )+ ModalBottom(+ @onClose="$store.dispatch('ui/setActiveTab', 'stat')"+ )+ template(#default="{ closeModal }")+ WalletsSort(+ v-if="activeTab === 'walletsSort'"+ @closeModal="closeModal"+ )</template><style lang="stylus" scoped>@@ -162,6 +283,110 @@ export default {@import "~assets/stylus/variables/fonts"@import "~assets/stylus/variables/scroll"+.opener+ opacity .6+ padding 8px 0 0 0+ font-size 20px++.page+ overflow hidden+ position relative+ width 100%+ height 100%++ &__nav+ z-index 100+ opacity .95+ position sticky+ top 0+ padding $m7+ background var(--c-bg-2)++ &__wrap+ overflow hidden+ overflow-y auto+ scrollbar()+ position relative+ height 100%++ h1+ padding-bottom 0+ font-size 18px++ &__content+ padding 0 $m7++ &__customize+ z-index 20+ position absolute+ top $m5+ right $m7++.chartBar+ position relative+ margin 0 -8px+ padding 8px+ padding-top 0+ background var(--c-bg-3)+ border-left 1px solid var(--c-bg-4)+ border-right 1px solid var(--c-bg-4)+ border-radius 8px 8px 0 0++.switcher+ position relative+ display flex+ align-items center+ margin 0 -8px++ &._round+ overflow hidden+ border-radius 8px++ &._sb+ z-index 15+ justify-content space-between++ &__name+ flex-grow 1+ color var(--c-font-3)+ font-size 10px+ text-transform uppercase++ &__content+ overflow hidden+ display flex+ align-items stretch+ justify-content space-between+ background var(--c-bg-4)+ border-radius 0 0 8px 8px+ flex-grow 1++ &__item+ opacity .6+ flex-grow 1+ display flex+ align-items center+ justify-content center+ min-width 48px+ padding $m6 $m7+ font-size 12px+ text-align center+ border-radius $m9++ +media-hover()+ background var(--c-bg-3)++ &._arrow+ padding $m5 $m6+ font-size 18px++ &._active+ opacity 1+ background var(--c-bg-8)++ &._disable+ opacity .3+.blockmargin-bottom 8pxbackground var(--c-bg-3)@@ -171,16 +396,10 @@ export default {display gridgrid-template-rows 1fr minmax(30px, min-content)height 100%+ background var(--c-bg-2)-.handler- z-index 200- position absolute- left 0- top 0- width 100%- height 100%- background alpha(#000, .9)- transition background 250ms+ &__content+ overflow hidden.swiper-slide-active.handler@@ -194,40 +413,18 @@ export default {._sidebaroverflow hiddenoverflow-y auto- scrollbar()z-index 10- max-width 70vwheight 100%+ max-width 70vwbackground var(--c-bg-4)border-right 1px solid var(--c-bg-1)+ scrollbar().wrap- position absolute- left 0- top 0- width 100%- height 100%- overflow hidden--.tabsoverflow hidden- position relative- width 100%- max-width 620px- height 100%- margin 0 auto- background var(--c-bg-2)--.tab- overflow-x hidden- overflow-y scroll- scrollbar()position absolute- left 0top 0+ left 0width 100%height 100%-- &._padding-top- // padding-top $m7</style>diff --git a/components/layout/LayoutMobile2.vue b/components/layout/LayoutMobile2.vuedeleted file mode 100644index 88259bef..00000000--- a/components/layout/LayoutMobile2.vue+++ /dev/null@@ -1,413 +0,0 @@-<script>-import Swiper from 'swiper'-import 'swiper/swiper-bundle.min.css'--export default {- name: 'LayoutMobile',-- data () {- return {- slider: null,- visibleContextMenu: false,-- selectedPeriodAmount: {- label: '',- incomes: '',- expenses: ''- },-- periods: [{- slug: 'day',- name: this.$lang.dates.day.simple- }, {- slug: 'week',- name: this.$lang.dates.week.simple- }, {- slug: 'month',- name: this.$lang.dates.month.simple- }, {- slug: 'year',- name: this.$lang.dates.year.simple- }]- }- },-- computed: {- activeTab () {- return this.$store.state.ui.activeTab- },-- stat () {- return this.$store.getters['stat/statCurrentPeriod']- },-- periodName () {- return this.$store.state.filter.period- }- },-- mounted () {- this.slider = this.slider = new Swiper(this.$refs.slider, {- slidesPerView: 'auto',- initialSlide: 1,- resistanceRatio: 0,- touchReleaseOnEdges: true,- shortSwipes: false,- longSwipesRatio: 0.1,- longSwipesMs: 60- })- },-- methods: {- clickHandler () {- const index = this.slider.activeIndex- index === 0 && this.slider.slideNext()- },-- handleShowWalletModal (id) {- this.$store.commit('wallets/showWalletModal')- this.$store.commit('wallets/setWalletModalId', id)- },-- changePeriod (period) {- this.$store.dispatch('filter/setPeriod', period)- }- }-}-</script>--<template lang="pug">-.wrap- .layoutMobile- .layoutMobile__content- .swiper-container(ref="slider")- .swiper-wrapper- //- Wallets- .swiper-slide- ComponentWrap(:contentPadding="false")- template(slot="content")- WalletsTotal- WalletsList3(- @onClick="(id) => handleShowWalletModal(id)"- )-- template(slot="bottom")- .flex- .col- Button(- :title="$lang.wallets.new"- className="_inline _small"- @onClick="$store.dispatch('ui/setActiveTab', 'createWallet')"- )- .col- Button(- :title="$lang.base.sort"- className="_inline _small"- @onClick="$store.dispatch('ui/setActiveTab', 'walletsSort')"- )-- //- Stat- //------------------------------------------------------------------------------- .swiper-slide- .page- .page__wrap- .page__nav- h1: Date- .page__customize- ContextMenu(- :position="{ right: '0px', top: '0px' }"- :visible="visibleContextMenu"- @onClickOpener="visibleContextMenu = !visibleContextMenu")-- template(slot="opener")- .opener- .mdi.mdi-tune-- template(slot="content")- ContextMenuItem(- icon="mdi mdi-chart-bar-stacked"- title="Periods chart"- :showCheckbox="true"- :checkboxValue="$store.state.ui.statGraphsVisibility === 'visible'"- @onClick="$store.dispatch('ui/toogleShowStatGraphs')")-- ContextMenuItem(- icon="mdi mdi-folder-star"- title="Cats chart"- :showCheckbox="true"- :checkboxValue="$store.state.ui.catsChart === 'visible'"- @onClick="$store.dispatch('ui/toogleVisibleCatsChart')")-- ContextMenuItem(- icon="mdi mdi-chart-gantt"- title="Cats stat"- :showCheckbox="true"- :checkboxValue="$store.state.ui.statItems === 'visible'"- @onClick="$store.dispatch('ui/toogleVisibilityStatItems')")-- .context-menu-sep-- ContextMenuItem(- icon="mdi mdi-palette"- title="Change theme"- @onClick="$store.dispatch('ui/changeTheme')")-- .page__content- .chartBar(v-show="$store.state.ui.statGraphsVisibility === 'visible'")- ChartMenu2- StatChartsLine2-- .switcher- .switcher__content- .switcher__item._arrow(- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isLastPeriodSelected'] }"- @click="$store.dispatch('filter/setPeriodNext')"- ): .mdi.mdi-chevron-left- .switcher__item(- v-for="periodItem in periods"- :key="periodItem.slug"- :class="{ _active: $store.state.filter.period === periodItem.slug }"- @click="changePeriod(periodItem.slug)"- ) {{ periodItem.name }}- .switcher__item._arrow(- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isFirstPeriodSelected'] }"- @click="$store.dispatch('filter/setPeriodPrev')"- ): .mdi.mdi-chevron-right-- StatMobile2-- //- Categories- .swiper-slide- ComponentWrap(:contentPadding="false")- template(slot="headerLeft") {{ $lang.categories.name }}-- template(slot="content")- CategoriesList(- :style="{ paddingTop: '16px' }"- @onClick="(id) => $store.dispatch('categories/showCategoryModal', id)"- )-- template(slot="bottom")- .flex- .col- Button(- :title="$lang.categories.new"- className="_inline _small"- @onClick="$store.dispatch('ui/setActiveTab', 'createCategory')"- )-- .swiper-slide._sidebar- .menuWrap- Menu(- @onClickMenuCalback="slider.slideNext()"- :slider="slider"- )-- .layoutMobile__menu- LayoutMobileMenu2(:slider="slider")-- //- Modals- CategoryModal(:slider="slider")- CurrencyModal- TrnForm- TrnModal- WalletModal(:slider="slider")- CategoryStatModal-- //- Caegory Form: create or edit- //------------------------------------------------------------------------------- Portal(- v-if="activeTab === 'createCategory'"- to="modal"- )- ModalBottom(- key="createCategory"- @onClose="$store.dispatch('ui/setActiveTab', 'stat')"- )- CategoryForm-- //- Settings- //------------------------------------------------------------------------------- Portal(- v-if="activeTab === 'settings'"- to="modal"- )- ModalBottom(@onClose="$store.dispatch('ui/setActiveTab', 'stat')")- Settings(v-if="activeTab === 'settings'")-- //- Wallet Form: create or edit- //------------------------------------------------------------------------------- Portal(- v-if="activeTab === 'createWallet'"- to="modal"- )- ModalBottom(- :key="$store.state.wallets.editId"- @onClose="$store.dispatch('ui/setActiveTab', 'stat')"- )- WalletForm-- //- Wallet Sort- //------------------------------------------------------------------------------- Portal(- v-if="activeTab === 'walletsSort'"- to="modal"- )- ModalBottom(- @onClose="$store.dispatch('ui/setActiveTab', 'stat')"- )- template(#default="{ closeModal }")- WalletsSort(- v-if="activeTab === 'walletsSort'"- @closeModal="closeModal"- )-</template>--<style lang="stylus" scoped>-@import "~assets/stylus/variables/animations"-@import "~assets/stylus/variables/margins"-@import "~assets/stylus/variables/media"-@import "~assets/stylus/variables/fonts"-@import "~assets/stylus/variables/scroll"--.opener- opacity .6- padding 8px 0 0 0- font-size 20px--.page- overflow hidden- position relative- width 100%- height 100%-- &__nav- z-index 100- opacity .95- position sticky- top 0- padding $m7- background var(--c-bg-2)-- &__wrap- overflow hidden- overflow-y auto- scrollbar()- position relative- height 100%-- h1- padding-bottom 0- font-size 18px-- &__content- padding 0 $m7-- &__customize- z-index 20- position absolute- top $m5- right $m7--.chartBar- position relative- margin 0 -8px- padding 8px- padding-top 0- background var(--c-bg-3)- border-left 1px solid var(--c-bg-4)- border-right 1px solid var(--c-bg-4)- border-radius 8px 8px 0 0--.switcher- position relative- display flex- align-items center- margin 0 -8px-- &._sb- z-index 15- justify-content space-between-- &__name- flex-grow 1- color var(--c-font-3)- font-size 10px- text-transform uppercase-- &__content- overflow hidden- display flex- align-items stretch- justify-content space-between- background var(--c-bg-4)- border-radius 0 0 8px 8px- flex-grow 1-- &__item- opacity .6- flex-grow 1- display flex- align-items center- justify-content center- min-width 48px- padding $m6 $m7- font-size 12px- text-align center- border-radius $m9-- +media-hover()- background var(--c-bg-3)-- &._arrow- padding $m5 $m6- font-size 18px-- &._active- opacity 1- background var(--c-bg-8)-- &._disable- opacity .3--.block- margin-bottom 8px- background var(--c-bg-3)- border-bottom 1px solid var(--c-bg-2)--.layoutMobile- display grid- grid-template-rows 1fr minmax(30px, min-content)- height 100%- background var(--c-bg-2)-- &__content- overflow hidden--.swiper-slide-active- .handler- width 16px- background none- transition background 0ms--.swiper-container- height 100%--._sidebar- overflow hidden- overflow-y auto- z-index 10- height 100%- max-width 70vw- background var(--c-bg-4)- border-right 1px solid var(--c-bg-1)- scrollbar()--.wrap- overflow hidden- position absolute- top 0- left 0- width 100%- height 100%-</style>diff --git a/components/layout/LayoutMobileMenu.vue b/components/layout/LayoutMobileMenu.vueindex 69b2384c..b44bc135 100644--- a/components/layout/LayoutMobileMenu.vue+++ b/components/layout/LayoutMobileMenu.vue@@ -1,30 +1,39 @@<script>export default {+ name: 'LayoutMobileMenu2',++ props: {+ slider: {+ type: Object,+ required: true+ }+ },+computed: {activeTab () {return this.$store.state.ui.activeTab},menu () {return {+ stat: {+ icon: 'mdi mdi-poll',+ id: 'stat',+ name: this.$t('stat.shortTitle')+ },wallets: {icon: 'mdi mdi-credit-card-multiple',id: 'wallets',- name: this.$lang.wallets.name+ name: this.$t('wallets.name')},categories: {icon: 'mdi mdi-folder-star',id: 'categories',- name: this.$lang.categories.shortTitle- },- stat: {- icon: 'mdi mdi-poll',- id: 'stat',- name: this.$lang.stat.shortTitle+ name: this.$t('categories.shortTitle')},- history: {- icon: 'mdi mdi-history',- id: 'history',- name: this.$lang.trns.shortTitle+ menu: {+ icon: 'mdi mdi-menu',+ id: 'menu',+ name: this.$t('trns.shortTitle')}}}@@ -32,33 +41,39 @@ export default {methods: {getClassName (tab) {- if (this.$store.state.ui.activeTab === 'stat') {- if (tab === this.$store.state.ui.stat.activeTab) {- return {- _active: true- }- }- }- else if (this.$store.state.ui.activeTab === tab) {- return {- _active: true- }+ if (this.slider) {+ const index = this.slider.activeIndex+ if (tab === 'wallets' && index === 0) { return true }+ if (tab === 'stat' && index === 1) { return true }+ if (tab === 'categories' && index === 2) { return true }}},handleSetActiveTab (tab) {switch (tab) {+ case 'wallets':+ // this.$store.dispatch('ui/setActiveTab', 'stat')+ // this.$store.dispatch('ui/setActiveTabStat', 'stat')+ this.slider.slideTo(0)+ breakcase 'stat':- this.$store.dispatch('ui/setActiveTab', 'stat')- this.$store.dispatch('ui/setActiveTabStat', 'stat')+ // this.$store.dispatch('ui/setActiveTab', 'stat')+ // this.$store.dispatch('ui/setActiveTabStat', 'stat')+ this.slider.slideTo(1)+ break+ case 'categories':+ // this.$store.dispatch('ui/setActiveTab', 'stat')+ // this.$store.dispatch('ui/setActiveTabStat', 'history')+ this.slider.slideTo(2)break- case 'history':- this.$store.dispatch('ui/setActiveTab', 'stat')- this.$store.dispatch('ui/setActiveTabStat', 'history')+ case 'menu':+ console.log('menu')+ this.$store.dispatch('ui/setActiveTab', 'menu')breakdefault:- this.$store.dispatch('ui/setActiveTab', tab)+ // this.$store.dispatch('ui/setActiveTab', tab)+ this.slider.slideTo(0)}- this.$router.push('/')+ // this.$router.push('/')}}}@@ -67,23 +82,20 @@ export default {<template lang="pug">.menu.menu__wrap- //- .menu__row(v-show="activeTab === 'stat'")- //- PeriodNavMobile-.menu__row+ //- Wallets.menu__item(- :class="getClassName(menu.wallets.id)"+ :class="{ _active: getClassName(menu.wallets.id) }"@click="handleSetActiveTab(menu.wallets.id)").menu__item__icon: div(:class="menu.wallets.icon")- //- .menu__item__text {{ menu.wallets.name }}+ //- Stat.menu__item(- :class="getClassName(menu.categories.id)"- @click="handleSetActiveTab(menu.categories.id)"+ :class="{ _active: getClassName(menu.stat.id) }"+ @click="handleSetActiveTab(menu.stat.id)")- .menu__item__icon: div(:class="menu.categories.icon")- //- .menu__item__text {{ menu.categories.name }}+ .menu__item__icon: div(:class="menu.stat.icon").openTrnForm(@click="$store.dispatch('trnForm/openTrnForm', { action: 'create' })")svg(@@ -92,19 +104,19 @@ export default {)path(d='M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z')+ //- Categories.menu__item(- :class="getClassName(menu.stat.id)"- @click="handleSetActiveTab(menu.stat.id)"+ :class="{ _active: getClassName(menu.categories.id) }"+ @click="handleSetActiveTab(menu.categories.id)")- .menu__item__icon: div(:class="menu.stat.icon")- //- .menu__item__text {{ menu.stat.name }}+ .menu__item__icon: div(:class="menu.categories.icon")+ //- History.menu__item(- :class="getClassName(menu.history.id)"- @click="handleSetActiveTab(menu.history.id)"+ :class="{ _active: getClassName(menu.menu.id) }"+ @click="handleSetActiveTab(menu.menu.id)")- .menu__item__icon: div(:class="menu.history.icon")- //- .menu__item__text {{ menu.history.name }}+ .menu__item__icon: div(:class="menu.menu.icon")</template><style lang="stylus" scoped>diff --git a/components/layout/LayoutMobileMenu2.vue b/components/layout/LayoutMobileMenu2.vuedeleted file mode 100644index 4e96e462..00000000--- a/components/layout/LayoutMobileMenu2.vue+++ /dev/null@@ -1,211 +0,0 @@-<script>-export default {- name: 'LayoutMobileMenu2',-- props: {- slider: {- type: Object,- required: true- }- },-- computed: {- activeTab () {- return this.$store.state.ui.activeTab- },- menu () {- return {- stat: {- icon: 'mdi mdi-poll',- id: 'stat',- name: this.$lang.stat.shortTitle- },- wallets: {- icon: 'mdi mdi-credit-card-multiple',- id: 'wallets',- name: this.$lang.wallets.name- },- categories: {- icon: 'mdi mdi-folder-star',- id: 'categories',- name: this.$lang.categories.shortTitle- },- history: {- icon: 'mdi mdi-menu',- id: 'history',- name: this.$lang.trns.shortTitle- }- }- }- },-- methods: {- getClassName (tab) {- // if ()- // if (this.$store.state.ui.activeTab === 'stat') {- // if (tab === this.$store.state.ui.stat.activeTab) {- // return {- // _active: true- // }- // }- // }- // else if (this.$store.state.ui.activeTab === tab) {- // return {- // _active: true- // }- // }- },- handleSetActiveTab (tab) {- switch (tab) {- case 'wallets':- // this.$store.dispatch('ui/setActiveTab', 'stat')- // this.$store.dispatch('ui/setActiveTabStat', 'stat')- this.slider.slideTo(0)- break- case 'stat':- // this.$store.dispatch('ui/setActiveTab', 'stat')- // this.$store.dispatch('ui/setActiveTabStat', 'stat')- this.slider.slideTo(1)- break- case 'history':- // this.$store.dispatch('ui/setActiveTab', 'stat')- // this.$store.dispatch('ui/setActiveTabStat', 'history')- this.slider.slideTo(3)- break- case 'categories':- // this.$store.dispatch('ui/setActiveTab', 'stat')- // this.$store.dispatch('ui/setActiveTabStat', 'history')- this.slider.slideTo(2)- break- default:- // this.$store.dispatch('ui/setActiveTab', tab)- this.slider.slideTo(0)- }- // this.$router.push('/')- }- }-}-</script>--<template lang="pug">-.menu- .menu__wrap- //- .menu__row(v-show="activeTab === 'stat'")- //- PeriodNavMobile-- .menu__row- //- Wallets- .menu__item(- :class="getClassName(menu.wallets.id)"- @click="handleSetActiveTab(menu.wallets.id)"- )- .menu__item__icon: div(:class="menu.wallets.icon")- //- .menu__item__text {{ menu.wallets.name }}-- //- Stat- .menu__item(- :class="getClassName(menu.stat.id)"- @click="handleSetActiveTab(menu.stat.id)"- )- .menu__item__icon: div(:class="menu.stat.icon")- //- .menu__item__text {{ menu.stat.name }}-- .openTrnForm(@click="$store.dispatch('trnForm/openTrnForm', { action: 'create' })")- svg(- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 24 24"- )- path(d='M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z')-- //- Categories- .menu__item(- :class="getClassName(menu.categories.id)"- @click="handleSetActiveTab(menu.categories.id)"- )- .menu__item__icon: div(:class="menu.categories.icon")- //- .menu__item__text {{ menu.categories.name }}-- //- History- .menu__item(- :class="getClassName(menu.history.id)"- @click="handleSetActiveTab(menu.history.id)"- )- .menu__item__icon: div(:class="menu.history.icon")- //- .menu__item__text {{ menu.history.name }}-</template>--<style lang="stylus" scoped>-@import "~assets/stylus/variables/animations"-@import "~assets/stylus/variables/margins"-@import "~assets/stylus/variables/media"--.create-btn- flex-grow 1- padding-left $m7--.customize- display flex- justify-content flex-end- flex-grow 1- padding-right $m7--.openTrnForm- flex-grow 1- cursor pointer- display flex- align-items center- justify-content center- padding 17px 0 16px 0- border-radius 8px- anim()-- +media-hover()- background var(--c-bg-1)-- svg- width 24px- height 24px- fill #0094FF--.menu- background var(--c-bg-3)-- &__wrap- display grid- max-width 620px- margin 0 auto-- /.light-mode &- background var(--c-bg-4)-- &__row- display flex- align-items center- justify-content center-- &__item- display flex- align-items center- justify-content center- flex-grow 1- flex-flow column- padding 16px 0- color var(--c-font-4)- anim()-- &:active- background var(--c-bg-1)-- &._active- color var(--c-font-1)-- /.light-mode &- color var(--c-font-5)-- &__icon- font-size 26px-- &__text- margin-top $m5- font-size 12px-</style>diff --git a/components/layout/LayoutMobileStat.vue b/components/layout/LayoutMobileStat.vuedeleted file mode 100644index 2bb591b1..00000000--- a/components/layout/LayoutMobileStat.vue+++ /dev/null@@ -1,32 +0,0 @@-<script>-export default {- methods: {- handleShowWalletModal (id) {- this.$store.commit('wallets/showWalletModal')- this.$store.commit('wallets/setWalletModalId', id)- }- }-}-</script>--<template lang="pug">-.layoutStat- .layoutStat__wallets(v-show="$store.state.ui.stat.walletsVisibility === 'visible'")- WalletsList(- :limit="3"- ui="widget"- @onClick="id => handleShowWalletModal(id)")-- .layoutStat__chart(v-show="$store.state.ui.statGraphsVisibility === 'visible' && ($store.state.filter.period !== 'all')")- StatChartsLine-- .layoutStat__summary- StatMobile-</template>--<style lang="stylus" scoped>-.layoutStat- overflow hidden- height 100%- overflow-y auto-</style>diff --git a/components/layout/LayoutPc.vue b/components/layout/LayoutPc.vueindex a83a5453..c45cba89 100644--- a/components/layout/LayoutPc.vue+++ b/components/layout/LayoutPc.vue@@ -48,7 +48,7 @@ export default {//------------------------------------------------LayoutPcTab(:show="activeTab === 'categories'")ComponentWrap- template(slot="headerLeft") {{ $lang.categories.title }}+ template(slot="headerLeft") {{ $t('categories.title') }}template(slot="content")CategoriesList.dashboardItems(@@ -59,14 +59,14 @@ export default {Button(className="_blue _inline"icon="mdi mdi-plus"- :title="$lang.categories.new"+ :title="$t('categories.new')"@onClick="$store.dispatch('ui/setActiveTab', 'createCategory')")//- wallets//------------------------------------------------LayoutPcTab(:show="activeTab === 'wallets'")ComponentWrap- template(slot="headerLeft") {{ $lang.wallets.title }}+ template(slot="headerLeft") {{ $t('wallets.title') }}template(slot="content")WalletsList3.dashboardItems(@@ -79,12 +79,12 @@ export default {Button(className="_inline _blue"icon="mdi mdi-plus"- :title="$lang.wallets.new"+ :title="$t('wallets.new')"@onClick="$store.dispatch('ui/setActiveTab', 'createWallet')").colButton(className="_inline _blue"- :title="$lang.base.sort"+ :title="$t('base.sort')"icon="mdi mdi-arrow-split-horizontal"@onClick="$store.dispatch('ui/setActiveTab', 'walletsSort')")diff --git a/components/layout/LayoutPcSidebar.vue b/components/layout/LayoutPcSidebar.vueindex 30361ec4..b64c35b9 100644--- a/components/layout/LayoutPcSidebar.vue+++ b/components/layout/LayoutPcSidebar.vue@@ -34,20 +34,22 @@ export default {template(slot="content")ContextMenuItem(+ :title="$t('theme.change')"icon="mdi mdi-palette"- title="Change theme"- @onClick="$store.dispatch('ui/changeTheme')")+ @onClick="$store.dispatch('ui/changeTheme')"+ )ContextMenuItem(icon="mdi mdi-cog-outline"- :title="$lang.settings.open"+ :title="$t('settings.open')"@onClick="$store.dispatch('ui/setActiveTab', 'settings')"@onClose="visibleSettingsMenu = !visibleSettingsMenu").context-menu-sepContextMenuItem(+ :title="$t('userLogout')"icon="mdi mdi-logout"- title="Sign Out"@onClick="$store.dispatch('user/signOut')"- @onClose="visibleSettingsMenu = !visibleSettingsMenu")+ @onClose="visibleSettingsMenu = !visibleSettingsMenu"+ ).sidebar__menu__item(:class="{ _active: activeTab === 'wallets'}"diff --git a/components/layout/PeriodNavMobile.vue b/components/layout/PeriodNavMobile.vuedeleted file mode 100644index c0c741bd..00000000--- a/components/layout/PeriodNavMobile.vue+++ /dev/null@@ -1,115 +0,0 @@-<script>-export default {- data () {- return {- visiblePeriodMenu: false- }- }-}-</script>--<template lang="pug">-.periodNav- .periodNav__link(- @click="$store.dispatch('filter/setPeriodPrev')"- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isFirstPeriodSelected'] }"- )- .mdi.mdi-chevron-left-- .periodNav__item._grow- ContextMenu(- :position="{ left: true, bottom: true }"- :visible="visiblePeriodMenu"- @onClickOpener="visiblePeriodMenu = !visiblePeriodMenu"- )- template(slot="opener")- Dropdown(:active="visiblePeriodMenu")- template(slot="title"): Date-- .customize- StatCustomizeMenuMobile(- icon="mdi mdi-tune"- :position="{ right: true, bottom: true }"- )-- .periodNav__link(- @click="$store.dispatch('filter/setPeriodNext')"- :class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isLastPeriodSelected'] }"- )- .mdi.mdi-chevron-right-- BaseModal(- :show="visiblePeriodMenu"- title="Select period"- @onClose="visiblePeriodMenu = false"- )- ContextMenuItem(- icon="mdi mdi-weather-sunset-up"- :title="$lang.dates.day.simple"- :selected="$store.state.filter.period === 'day'"- @onClick="$store.dispatch('filter/setPeriod', 'day')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")- ContextMenuItem(- icon="mdi mdi-calendar-week"- :title="$lang.dates.week.simple"- :selected="$store.state.filter.period === 'week'"- @onClick="$store.dispatch('filter/setPeriod', 'week')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")- ContextMenuItem(- icon="mdi mdi-calendar"- :title="$lang.dates.month.simple"- :selected="$store.state.filter.period === 'month'"- @onClick="$store.dispatch('filter/setPeriod', 'month')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")- ContextMenuItem(- icon="mdi mdi-calendar-star"- :title="$lang.dates.year.simple"- :selected="$store.state.filter.period === 'year'"- @onClick="$store.dispatch('filter/setPeriod', 'year')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")- ContextMenuItem(- icon="mdi mdi-database"- :title="$lang.dates.all"- :selected="$store.state.filter.period === 'all'"- @onClick="$store.dispatch('filter/setPeriod', 'all')"- @onClose="visiblePeriodMenu = !visiblePeriodMenu")-</template>--<style lang="stylus" scoped>-@import "~assets/stylus/variables/margins"-@import "~assets/stylus/variables/media"--.periodNav- display flex- align-items stretch- justify-content space-between- width 100%- background var(--c-bg-3)- border-top 1px solid var(--c-bg-2)- // border-bottom 1px solid var(--c-bg-2)-- &__link- display flex- align-items center- justify-content center- padding $m7 $m7- color var(--c-font-3)- font-size 32px-- +media-hover()- background var(--c-bg-1)-- &._disable- opacity 0-- &__item- display flex- align-items center- justify-content center- padding 0 $m7--.customize- margin-left 20px- @media $media-phone-sm- display none-</style>diff --git a/components/layout/component/ComponentWrap.vue b/components/layout/component/ComponentWrap.vueindex 794be8fc..c2666576 100644--- a/components/layout/component/ComponentWrap.vue+++ b/components/layout/component/ComponentWrap.vue@@ -96,10 +96,15 @@ export default {grid-template-rows minmax(min-content, auto) minmax(50px, min-content)&-main- height 100%- scrollbar()overflow hidden+ height 100%overflow-y auto+ scrollbar()++ +media-tablet("less")+ display flex+ flex-flow column+ justify-content center&-leftmargin-bottom 16pxdiff --git a/components/layout/sidebar/Menu.vue b/components/layout/sidebar/Menu.vueindex 1a4400cf..58be06c1 100644--- a/components/layout/sidebar/Menu.vue+++ b/components/layout/sidebar/Menu.vue@@ -1,12 +1,5 @@<script>export default {- props: {- slider: {- type: Object,- default: () => {}- }- },-computed: {activeTab () {return this.$store.state.ui.activeTab@@ -16,45 +9,49 @@ export default {return {trnForm: {icon: 'mdi mdi-plus',- name: this.$lang.createTrn,- isOpen: false+ name: this.$t('createTrn'),+ isOpen: false,+ private: this.$store.state.ui.mobile},stat: {icon: 'mdi mdi-poll',- name: this.$lang.stat.shortTitle,- isOpen: false+ name: this.$t('stat.shortTitle'),+ isOpen: false,+ private: this.$store.state.ui.mobile},wallets: {icon: 'mdi mdi-credit-card-multiple',- name: this.$lang.wallets.name,- isOpen: true+ name: this.$t('wallets.name'),+ isOpen: true,+ private: this.$store.state.ui.mobile},categories: {icon: 'mdi mdi-folder-star',- name: this.$lang.categories.name,- isOpen: false+ name: this.$t('categories.name'),+ isOpen: false,+ private: this.$store.state.ui.mobile},budgets: {icon: 'mdi mdi-hand-saw',- name: this.$lang.budgets.name,+ name: this.$t('budgets.name'),isOpen: false,private: true},groups: {icon: 'mdi mdi-folder-multiple-outline',- name: this.$lang.groups.name,+ name: this.$t('groups.name'),isOpen: false,private: true},users: {icon: 'mdi mdi-account-multiple',- name: 'Users',+ name: this.$t('users.title'),isOpen: false,private: true},settings: {icon: 'mdi mdi-cog-outline',- name: this.$lang.settings.title,+ name: this.$t('settings.title'),isOpen: true}}@@ -65,6 +62,7 @@ export default {handleClickMenu (menuId) {if (menuId === 'users') {this.$router.push('/users')+ this.$store.dispatch('ui/setActiveTab', 'stat')return}else if (menuId === 'trnForm') {@@ -82,25 +80,6 @@ export default {this.$listeners.onClickMenuCalback()}- if (this.slider) {- switch (menuId) {- case 'wallets':- this.slider.slideTo(0)- break- case 'stat':- this.slider.slideTo(1)- break- case 'history':- this.slider.slideTo(3)- break- case 'categories':- this.slider.slideTo(2)- break- default:- this.slider.slideTo(0)- }- }-this.$store.dispatch('ui/setActiveTab', menuId)}}@@ -139,8 +118,8 @@ item-bg-active()display gridgrid-template-columns 24px 1fr 24pxgrid-column-gap 20px- padding 16px 16pxalign-items center+ padding 16px 16px+media-laptop()padding 16px 20px@@ -159,9 +138,9 @@ item-bg-active()&__iconalign-self centerjustify-self center+ color var(--c-font-3)font-size 20pxgrid-column 1 / 2- color var(--c-font-3)&__textgrid-column 2 / 3@@ -175,11 +154,11 @@ item-bg-active()display flexalign-items centerjustify-content center- margin -10px 0width 40pxheight 40px+ margin -10px 0margin-right -14pxjustify-self end- font-size 22pxcolor var(--c-font-4)+ font-size 22px</style>diff --git a/components/layout/sidebar/MenuItem.vue b/components/layout/sidebar/MenuItem.vuedeleted file mode 100644index e69de29b..00000000diff --git a/components/modal/ModalBottom.vue b/components/modal/ModalBottom.vueindex 5a927d49..ad4ba67d 100644--- a/components/modal/ModalBottom.vue+++ b/components/modal/ModalBottom.vue@@ -86,7 +86,6 @@ export default {v-if="isShowed"ref="scrollDragger")- .modalBottom__line//- Empty Header//--------------------------------------div(@@ -145,8 +144,7 @@ export default {</style><style lang="stylus">-@import "~assets/stylus/variables/margins"-@import "~assets/stylus/variables/media"+@import "~assets/stylus/variables".modalBottomz-index 4@@ -177,16 +175,7 @@ export default {@media $media-laptopmax-width 460pxmargin 100px-- &__line- position absolute- top -12px- left 50%- width 60px- height 6px- background var(--c-bg-8)- border-radius 4px- transform translateX(-50%)+ border-radius $m7&__scrolloverflow hidden@@ -198,6 +187,7 @@ export default {@media $media-laptoppadding $m9+ border-radius 0 0 $m7 $m7^[0]._paddingless &padding 0@@ -206,13 +196,15 @@ export default {background var(--c-bg-2)&__header+ flex-grow 1position relativedisplay flexalign-items centerpadding $m7- color var(--c-font-1)+ color var(--c-font-2)+ fontFamilyNunito()background var(--c-bg-2)- border-radius $m6 $m6 0 0+ border-radius $m7 $m7 0 0/.light-mode &color var(--c-font-4)@@ -239,7 +231,10 @@ export default {padding 0&__title- font-size 18px+ font-size 28px+ font-weight 700+ text-align center+ flex-grow 1&__iconposition absolutediff --git a/components/settings/Settings.vue b/components/settings/Settings.vueindex a312ca59..bd4c7d51 100644--- a/components/settings/Settings.vue+++ b/components/settings/Settings.vue@@ -26,68 +26,64 @@ export default {<template lang="pug">ComponentWrap(:contentPadding="false")- template(slot="headerLeft") {{ $lang.settings.title }}+ template(slot="headerLeft") {{ $t('settings.title') }}template(slot="content").settings.settings__group- .settings__subHeader {{ $lang.trnForm.title }}- .settings__item- Button._bdb(- :checkboxValue="$store.state.ui.lastUsedCatsInTrnForm === 'visible'"- :showCheckbox="true"- :title="$lang.trnForm.lastUsedCats"- icon="mdi mdi-folder-star"- @onClick="$store.dispatch('ui/toogleLastUsedCatsInTrnForm')"- )-- .settings__group- .settings__subHeader {{ $lang.settings.lang }}+ .settings__subHeader {{ $t('settings.lang') }}.settings__itemLangDropdown.settings__group- .settings__subHeader {{ $lang.settings.app }}+ .settings__subHeader {{ $t('settings.app') }}.settings__itemButton._bdb(icon="mdi mdi-palette"- title="Change theme"- @onClick="$store.dispatch('ui/changeTheme')")+ :title="$t('theme.change')"+ @onClick="$store.dispatch('ui/changeTheme')"+ )+.settings__itemButton._bdb(+ :title="$t('userLogout')"icon="mdi mdi-logout"- title="Sign Out"- @onClick="$store.dispatch('user/signOut')")+ @onClick="$store.dispatch('user/signOut')"+ ).settings__group._paddingTop- .settings__subHeader {{ $lang.settings.delete }}- .settings__desc {{ $lang.alerts.willDeleteEverything }}+ .settings__subHeader {{ $t('settings.delete') }}+ .settings__desc {{ $t('alerts.willDeleteEverything') }}.settings__itemButton._bdb(+ :title="$t('settings.deleteButton')"icon="mdi mdi-delete"- title="Delete my data"- @onClick="confirmRemoveUserData = true")+ @onClick="confirmRemoveUserData = true"+ ).settings__group(v-if="$store.state.demo.hasDemo")- .settings__subHeader {{ $lang.settings.demo }}- .settings__desc {{ $lang.alerts.willDeleteEverything }}+ .settings__subHeader {{ $t('settings.demo') }}+ .settings__desc {{ $t('alerts.willDeleteEverything') }}.settings__itemButton._bdb(+ :title="$t('settings.loadDemoButton')"icon="mdi mdi-test-tube"- title="Load demo"- @onClick="confirmCreateDemo = true")+ @onClick="confirmCreateDemo = true"+ ).settings__group- .appVersion Version {{ version }}+ .thanksTo {{ $t('app.thanks') }}+ .appVersion {{ $t('app.version') }} {{ version }}ModalBottomConfirm(- description="This will delete all your wallets, categories and trns"+ :description="$t('alerts.willDeleteEverything')":show="confirmCreateDemo"@onClose="confirmCreateDemo = false"- @onConfirm="generateDemo")+ @onConfirm="generateDemo"+ )ModalBottomConfirm(- description="This will delete all your wallets, categories and trns"+ :description="$t('alerts.willDeleteEverything')":show="confirmRemoveUserData"@onClose="confirmRemoveUserData = false"@onConfirm="removeUserData"@@ -133,7 +129,12 @@ ComponentWrap(:contentPadding="false")font-weight 500padding-bottom 16px+.thanksTo+ padding-bottom $m5+ color var(--c-font-2)+ font-size 14px+.appVersioncolor var(--c-font-3)- font-size 14px+ font-size 10px</style>diff --git a/components/shared/button/Button.vue b/components/shared/button/Button.vueindex 2f90eb09..9276bd0a 100644--- a/components/shared/button/Button.vue+++ b/components/shared/button/Button.vue@@ -123,12 +123,7 @@ export default {&._borderBottommargin-bottom 0- padding-right $m6- padding-left $m6- border-bottom 1px solid var(--c-bg-7)-- &:last-child- border-bottom 0+ padding $m7 0&._borderdisplay flex@@ -171,7 +166,9 @@ export default {margin 0 auto@media $media-laptop+ display inline-flexwidth auto+ margin 0&._centeralign-items centerdiff --git a/components/shared/copyright/Copyright.vue b/components/shared/copyright/Copyright.vueindex 20cf0856..55285acf 100644--- a/components/shared/copyright/Copyright.vue+++ b/components/shared/copyright/Copyright.vue@@ -6,9 +6,9 @@ export default {<template lang="pug">a(href="https://ilko.me").copyright- | {{ $lang.app.madeBy.text }}+ | {{ $t('app.madeBy.text') }}.copyright__heart.mdi.mdi-heart- | {{ $lang.app.madeBy.name }}+ | {{ $t('app.madeBy.name') }}</template><style lang="stylus" scoped>diff --git a/components/shared/date/Date.vue b/components/shared/date/Date.vueindex 9fe534d1..ee3c3512 100644--- a/components/shared/date/Date.vue+++ b/components/shared/date/Date.vue@@ -12,7 +12,7 @@ export default {switch (filterPeriod) {case 'day':if (today.isSame(filterDate, 'day')) {- return this.$lang.dates.day.current+ return this.$t('dates.day.current')}else if (today.subtract(1, filterPeriod).isSame(filterDate, 'day')) {return 'Yesterday'@@ -27,7 +27,7 @@ export default {case 'week':if (today.isSame(filterDate, 'week')) {- return this.$lang.dates.week.current+ return this.$t('dates.week.current')}else if (today.subtract(1, filterPeriod).isSame(filterDate, 'week')) {return 'Last week'@@ -39,7 +39,7 @@ export default {case 'month':if (today.isSame(filterDate, 'month')) {- return this.$lang.dates.month.current+ return this.$t('dates.month.current')}else if (today.subtract(1, filterPeriod).isSame(filterDate, 'month')) {return 'Last month'diff --git a/components/shared/inputs/Checkbox.vue b/components/shared/inputs/Checkbox.vueindex 30254f83..6fae5632 100644--- a/components/shared/inputs/Checkbox.vue+++ b/components/shared/inputs/Checkbox.vue@@ -27,8 +27,8 @@ label.checkbox(:class="{ _alt: alt }")).checkbox__helper.checkbox__toogle- .checkbox__toogle__item._on {{ $lang.base.on }}- .checkbox__toogle__item._off {{ $lang.base.off }}+ .checkbox__toogle__item._on {{ $t('base.on') }}+ .checkbox__toogle__item._off {{ $t('base.off') }}.checkbox__title(v-if="title") {{ title }}</template>diff --git a/components/stat/StatChartDonut.vue b/components/stat/StatChartDonut.vueindex b96bd5eb..07963fbb 100644--- a/components/stat/StatChartDonut.vue+++ b/components/stat/StatChartDonut.vue@@ -129,19 +129,19 @@ export default {const periodTotal = this.$store.getters['trns/getTotalOfTrnsIds'](trnsIds)// return- incomesData.push({+ incomesData.unshift({date: periodDate,y: Number(`${periodTotal.incomes.toFixed()}`)})- expensesData.push({+ expensesData.unshift({date: periodDate,y: Number(`${periodTotal.expenses.toFixed()}`)})- totalData.push({+ totalData.unshift({date: periodDate,y: Number(`${(totalStart.total + balanceTotal.total).toFixed()}`)})- categories.push(name)+ categories.unshift(name)}return {@@ -153,13 +153,13 @@ export default {data: totalData}, {visible: true,- // type: 'spline',+ type: 'spline',name: 'Incomes',color: 'var(--c-incomes-1)',data: incomesData}, {visible: true,- // type: 'spline',+ type: 'spline',name: 'Expenses',color: 'var(--c-expenses-1)',data: expensesDatadiff --git a/components/stat/StatChartsLine.vue b/components/stat/StatChartsLine.vueindex e6b979f7..020d4d50 100644--- a/components/stat/StatChartsLine.vue+++ b/components/stat/StatChartsLine.vue@@ -2,6 +2,8 @@import dayjs from 'dayjs'export default {+ name: 'StatChartsLine2',+computed: {periods () {return this.$store.state.chart.periods@@ -168,13 +170,11 @@ export default {</script><template lang="pug">-.charts(v-show="$store.state.ui.statGraphsVisibility === 'visible'")+.charts.swiper-no-swipingtemplate(v-if="$store.state.filter.period === 'all'").charts__allData Change period to see chart- template(v-if="$store.state.filter.period !== 'all'")- .charts__nav(v-if="$store.state.ui.mobile")- ChartMenu+ template(v-if="$store.state.filter.period !== 'all'").charts__content//- groupedtemplate(v-if="periods[filterPeriod].grouped")@@ -191,7 +191,6 @@ export default {:maxAmountValue="maxAmountValue":period="period"parentClassName=".charts__items")- .chart-space//- simpletemplate(v-else)@@ -218,44 +217,24 @@ export default {.chartsz-index 5position relative- background var(--c-bg-2)- border-bottom 1px solid var(--c-bg-1)-- @media $media-laptop- opacity .7- min-height 120px- anim-all()-- &:hover- @media $media-laptop- opacity 1+ padding $m6&__allData+ opacity .7display flexalign-items centerjustify-content centerfont-size 14px- opacity .7-- @media $media-laptop- min-height 178px&__items- cursor grab- scrollbar()overflow hiddenoverflow-x autodisplay flex- margin-bottom -1px-- @media $media-laptop- padding 0 60px+ flex-direction row-reverse+ scrollbar()&._grouped- padding 0 $m7-- @media $media-laptop- padding 0 60px+ padding 0 $m4&__navz-index 2@@ -263,41 +242,39 @@ export default {right $m7bottom $m7- @media $media-laptop- right $mb2-.chart-groupposition relative- flex-grow 0- margin-right 40px+ flex-grow 1+ margin-left 20px+ padding-left 20px+ border-left 1px solid var(--c-bg-4)&:last-child- margin-right 0+ margin-left 0+ padding-left 0border 0&__nameopacity .7position absolute+ right 0width 100%height 42px- padding-top $m7+ padding-top 0padding-bottom $m4font-secondary()font-size 14px+ text-align centertext-transform uppercasewhite-space nowrapletter-spacing .5px- @media $media-laptop- padding-top $m8- font-size 18px-&__contentdisplay flex+ flex-direction row-reverse+ padding-top 20px.chart-space&:last-childmin-width 40px- @media $media-laptop- min-width $m10</style>diff --git a/components/stat/StatChartsLine2.vue b/components/stat/StatChartsLine2.vueindex 3690fdb4..66a41c2b 100644--- a/components/stat/StatChartsLine2.vue+++ b/components/stat/StatChartsLine2.vue@@ -186,17 +186,18 @@ export default {.chart-group__contenttemplate(v-for="period in periodGroups")- ChartItem2(+ ChartItem(:key="period.date":maxAmountValue="maxAmountValue":period="period"- parentClassName=".charts__items")+ parentClassName=".charts__items"+ )//- simpletemplate(v-else).charts__itemstemplate(v-for="period in periodsValues")- ChartItem2(+ ChartItem(:key="period.date":maxAmountValue="maxAmountValue":period="period"diff --git a/components/stat/StatCustomizeMenuMobile.vue b/components/stat/StatCustomizeMenuMobile.vueindex 8e0864ad..c6379de0 100644--- a/components/stat/StatCustomizeMenuMobile.vue+++ b/components/stat/StatCustomizeMenuMobile.vue@@ -43,12 +43,12 @@ divtemplate(v-else)Dropdown._inline(:active="visibleCustomizeMenu"- :title="$lang.settings.customize"+ :title="$t('settings.customize')")BaseModal(:show="visibleCustomizeMenu"- :title="$lang.settings.customize"+ :title="$t('settings.customize')"@onClose="visibleCustomizeMenu = !visibleCustomizeMenu")ContextMenuItem(@@ -62,8 +62,8 @@ divContextMenuItem(:checkboxValue="$store.state.ui.statGraphsVisibility === 'visible'":showCheckbox="true"+ :title="$t('stat.customize.showPeriodsChart')"icon="mdi mdi-chart-bar-stacked"- title="Periods chart"@onClick="$store.dispatch('ui/toogleShowStatGraphs')")@@ -101,7 +101,7 @@ div.context-menu-sepContextMenuItem(- :title="$t('theme.toogle')"+ :title="$t('theme.change')"icon="mdi mdi-palette"@onClick="$store.dispatch('ui/changeTheme')")diff --git a/components/stat/StatItem.vue b/components/stat/StatItem.vueindex edc63787..211a2cfd 100644--- a/components/stat/StatItem.vue+++ b/components/stat/StatItem.vue@@ -1,5 +1,7 @@<script>export default {+ name: 'StatItem2',+props: {category: {type: Object,@@ -60,7 +62,9 @@ export default {methods: {toogleShowInside (categoryId) {- this.showInside = !this.showInside+ this.$store.commit('stat/setCategoryModalId', categoryId)+ this.$store.commit('stat/setCategoryModalShow', true)+ // this.showInside = !this.showInside}}}@@ -73,7 +77,7 @@ export default {.statItem__content.statItem__graph: .statItem__graph__in(:style="styles")- .statItem__icon(@click.stop="() => $store.dispatch('filter/handleSetFilterCategory', categoryId)")+ .statItem__icon(@click.stop="showInside = !showInside")Icon(:background="category.color":icon="category.icon"@@ -88,7 +92,7 @@ export default {template(v-if="showInside").statItem__inside(@click.stop="")template(v-if="showChildCategories")- StatItemChildCats(:categoryId="categoryId", :type="type")+ StatItemChildCats2(:categoryId="categoryId", :type="type")template(v-else)TrnsList(@@ -123,7 +127,7 @@ export default {&._activepadding 0margin-bottom 30px- background var(--c-bg-3)+ background var(--c-bg-2)border 1px solid var(--c-bg-7)&:first-childdiff --git a/components/stat/StatItem2.vue b/components/stat/StatItem2.vuedeleted file mode 100644index 211a2cfd..00000000--- a/components/stat/StatItem2.vue+++ /dev/null@@ -1,189 +0,0 @@-<script>-export default {- name: 'StatItem2',-- props: {- category: {- type: Object,- required: true- },- categoryId: {- type: String,- required: true- },- currency: {- type: String,- required: true- },- total: {- type: Number,- required: true- },- biggest: {- type: Number,- required: true- },- type: {- type: Number,- required: true- }- },-- data () {- return {- showInside: false- }- },-- computed: {- showChildCategories () {- const childCategoriesIds = this.$store.getters['categories/getChildCategoriesIds'](this.categoryId)-- const childCatsIdsWithTrns = []- for (const childCategoryId of childCategoriesIds) {- const trnsIds = this.$store.getters['trns/getTrnsIdsByFilter']({- categoryId: childCategoryId,- type: this.type- })- if (trnsIds.length > 0) { childCatsIdsWithTrns.push(childCategoryId) }- }-- if (childCatsIdsWithTrns.length > 0) { return true }- return false- },-- styles () {- return {- width: `${Math.abs(this.total) / Math.abs(this.biggest) * 100}%`,- background: this.category.color- }- }- },-- methods: {- toogleShowInside (categoryId) {- this.$store.commit('stat/setCategoryModalId', categoryId)- this.$store.commit('stat/setCategoryModalShow', true)- // this.showInside = !this.showInside- }- }-}-</script>--<template lang="pug">-.statItem(- @click="toogleShowInside(categoryId)"- :class="{ _active: showInside }")-- .statItem__content- .statItem__graph: .statItem__graph__in(:style="styles")- .statItem__icon(@click.stop="showInside = !showInside")- Icon(- :background="category.color"- :icon="category.icon"- :round="true")-- .statItem__name {{ category.name }}- .statItem__amount- Amount(- :currency="currency"- :value="total")-- template(v-if="showInside")- .statItem__inside(@click.stop="")- template(v-if="showChildCategories")- StatItemChildCats2(:categoryId="categoryId", :type="type")-- template(v-else)- TrnsList(- ui="stat"- :incomes="type === 1"- :expenses="type === 0"- :categoryId="categoryId")-</template>--<style lang="stylus" scoped>-@import "~assets/stylus/variables"--.statItem- overflow hidden- cursor pointer- position relative- margin (- 10px) 0- margin-bottom 10px- padding 10px- border 1px solid transparent- border-radius $m5-- &:hover- @media $media-laptop- z-index 2- background var(--c-bg-1)- border 1px solid var(--c-bg-5)-- /.light-mode &- background var(--c-bg-3)-- &._active- padding 0- margin-bottom 30px- background var(--c-bg-2)- border 1px solid var(--c-bg-7)-- &:first-child- margin-top (- 10px)-- &__content- display grid- grid-template-columns minmax(10px, max-content) 1fr minmax(10px, max-content)- grid-template-rows repeat(2, minmax(10px, max-content))- grid-column-gap 20px-- ^[0]._active &- padding 10px 10px- background var(--c-bg-5)- border-bottom 1px solid var(--c-bg-7)-- /.light-mode &- background var(--c-bg-10)- border-bottom 1px solid var(--c-bg-5)-- &__graph- overflow hidden- grid-column 2 / -1- grid-row 2 / -1- align-self center- margin-top 6px- background var(--c-bg-8)- border-radius 2px-- &__in- height 4px- min-width 2px-- &__name- overflow hidden- align-self center- color var(--c-font-4)- font-size 16px- white-space nowrap- text-overflow ellipsis-- ^[0]._active &- color var(--c-font-2)-- &__icon- width 32px- grid-column 1 / 2- grid-row 1 / -1-- &:active- opacity .8-- @media $media-laptop- &:hover- transform scale(1.3)-- &__amount- align-self center-</style>diff --git a/components/stat/StatMobile.vue b/components/stat/StatMobile.vueindex 2fc64ef9..7db184ea 100644--- a/components/stat/StatMobile.vue+++ b/components/stat/StatMobile.vue@@ -75,14 +75,14 @@ export default {.startSomething.options__item(v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']")Button._grey._center(- :title="$lang.createTrn"+ :title="$t('createTrn')"@onClick="$store.dispatch('trnForm/openTrnForm', { action: 'create' })").options__item(v-if="$store.state.demo.hasDemo")Button._blue._center(size="xl"- :title="$lang.welcome.demo.btn"+ :title="$t('welcome.demo.btn')"@onClick="$router.push('/welcome')")@@ -90,7 +90,8 @@ export default {//------------------------------------------------EmptyData(v-if="isEmptyData && $store.getters['trns/hasTrns']"- :text="$lang.stat.empty")+ :text="$t('stat.empty')"+ )//- history//------------------------------------------------@@ -103,7 +104,7 @@ export default {.statGroup(v-if="statCurrentPeriod.incomes.categoriesIds.length").statItem-header.statItem-total- .statItem-total__title._incomes {{ $lang.money.incomes }}+ .statItem-total__title._incomes {{ $t('money.incomes') }}.statItem-total__amountAmount(:currency="$store.state.currencies.base"@@ -112,12 +113,13 @@ export default {.statItem-average(v-if="$store.state.stat.showedPeriods > 1").statItem-average__title.statItem-average__title-icon: .mdi.mdi-chart-timeline- .statItem-average__title-text {{ $lang.money.average }}+ .statItem-average__title-text {{ $t('money.average') }}.statItem-average__amountAmount(:currency="$store.state.currencies.base":small="true":value="$store.getters['stat/statAverage'].incomes")+//- incomes: cats charts.stat__charts(v-show="$store.state.ui.catsChart === 'visible'")PeriodCatsChart(type="incomes")@@ -139,7 +141,7 @@ export default {.statGroup(v-if="statCurrentPeriod.expenses.categoriesIds.length").statItem-header.statItem-total- .statItem-total__title._expenses {{ $lang.money.expenses }}+ .statItem-total__title._expenses {{ $t('money.expenses') }}.statItem-total__amountAmount(:currency="$store.state.currencies.base"@@ -148,7 +150,7 @@ export default {.statItem-average(v-if="$store.state.stat.showedPeriods > 1").statItem-average__title.statItem-average__title-icon: .mdi.mdi-chart-timeline- .statItem-average__title-text {{ $lang.money.average }}+ .statItem-average__title-text {{ $t('money.average') }}.statItem-average__amountAmount(:currency="$store.state.currencies.base"@@ -179,7 +181,7 @@ export default {.statGroup(v-if="statCurrentPeriod.incomes.categoriesIds.length").statItem-header.statItem-total- .statItem-total__title._incomes {{ $lang.money.incomes }}+ .statItem-total__title._incomes {{ $t('money.incomes') }}.statItem-total__amountAmount(:currency="$store.state.currencies.base"@@ -188,7 +190,7 @@ export default {.statItem-average(v-if="$store.state.stat.showedPeriods > 1").statItem-average__title.statItem-average__title-icon: .mdi.mdi-chart-timeline- .statItem-average__title-text {{ $lang.money.average }}+ .statItem-average__title-text {{ $t('money.average') }}.statItem-average__amountAmount(:currency="$store.state.currencies.base"@@ -214,7 +216,7 @@ export default {.statGroup(v-if="statCurrentPeriod.expenses.categoriesIds.length").statItem-header.statItem-total- .statItem-total__title._expenses {{ $lang.money.expenses }}+ .statItem-total__title._expenses {{ $t('money.expenses') }}.statItem-total__amountAmount(:currency="$store.state.currencies.base"@@ -223,7 +225,7 @@ export default {.statItem-average(v-if="$store.state.stat.showedPeriods > 1").statItem-average__title.statItem-average__title-icon: .mdi.mdi-chart-timeline- .statItem-average__title-text {{ $lang.money.average }}+ .statItem-average__title-text {{ $t('money.average') }}.statItem-average__amountAmount(:currency="$store.state.currencies.base"diff --git a/components/stat/StatMobile2.vue b/components/stat/StatMobile2.vueindex bedf02bf..721b5ca9 100644--- a/components/stat/StatMobile2.vue+++ b/components/stat/StatMobile2.vue@@ -94,7 +94,7 @@ export default {@click="view = 'incomes'").statItem-total- .statItem-total__title {{ $lang.money.incomes }}+ .statItem-total__title {{ $t('money.incomes') }}.statItem-total__amountAmount(size="md"@@ -107,7 +107,7 @@ export default {@click="view = 'expenses'").statItem-total- .statItem-total__title {{ $lang.money.expenses }}+ .statItem-total__title {{ $t('money.expenses') }}.statItem-total__amountAmount(size="md"@@ -120,7 +120,7 @@ export default {@click="view = 'trns'").statItem-total- .statItem-total__title {{ $lang.trns.shortTitle }}+ .statItem-total__title {{ $t('trns.shortTitle') }}.statItem-total__amountAmount(size="md"@@ -175,7 +175,7 @@ export default {//------------------------------------------------EmptyData(v-if="isEmptyData && $store.getters['trns/hasTrns']"- :text="$lang.stat.empty"+ :text="$t('stat.empty')")</template>diff --git a/components/stat/StatSummaryMobile.vue b/components/stat/StatSummaryMobile.vueindex aae7bec6..449debb5 100644--- a/components/stat/StatSummaryMobile.vue+++ b/components/stat/StatSummaryMobile.vue@@ -18,7 +18,7 @@ export default {.summary.summary__item._incomes(@click="$store.dispatch('ui/setActiveTabStat', 'incomes')")template(v-if="statAverage.incomes > 0 || period === 'all'")- .summary__item__title._incomes {{ $lang.money.incomes }}+ .summary__item__title._incomes {{ $t('money.incomes') }}.summary__item__amountAmount(:center="true"@@ -31,7 +31,7 @@ export default {.summary__item._total(@click="$store.dispatch('ui/setActiveTabStat', 'stat')")template(v-if="statAverage.total !== 0")template(v-if="stat.incomes.total > 0 || stat.expenses.total > 0")- .summary__item__title {{ $lang.money.total }}+ .summary__item__title {{ $t('money.total') }}.summary__item__amountAmount(:center="true"@@ -42,7 +42,7 @@ export default {.summary__item._expenses(@click="$store.dispatch('ui/setActiveTabStat', 'expenses')")template(v-if="statAverage.expenses > 0 || period === 'all'")- .summary__item__title._expenses {{ $lang.money.expenses }}+ .summary__item__title._expenses {{ $t('money.expenses') }}.summary__item__amountAmount(:center="true"diff --git a/components/stat/StatSummaryMobile2.vue b/components/stat/StatSummaryMobile2.vueindex b0f9cbc6..600657af 100644--- a/components/stat/StatSummaryMobile2.vue+++ b/components/stat/StatSummaryMobile2.vue@@ -20,7 +20,7 @@ export default {.summary.summary__item._incomes(@click="$store.dispatch('ui/setActiveTabStat', 'incomes')")template(v-if="statAverage.incomes > 0 || period === 'all'")- .summary__item__title._incomes {{ $lang.money.incomes }}+ .summary__item__title._incomes {{ $t('money.incomes') }}.summary__item__amountAmount(:center="true"@@ -33,7 +33,7 @@ export default {.summary__item._total(@click="$store.dispatch('ui/setActiveTabStat', 'stat')")template(v-if="statAverage.total !== 0")template(v-if="stat.incomes.total > 0 || stat.expenses.total > 0")- .summary__item__title {{ $lang.money.total }}+ .summary__item__title {{ $t('money.total') }}.summary__item__amountAmount(:center="true"@@ -44,7 +44,7 @@ export default {.summary__item._expenses(@click="$store.dispatch('ui/setActiveTabStat', 'expenses')")template(v-if="statAverage.expenses > 0 || period === 'all'")- .summary__item__title._expenses {{ $lang.money.expenses }}+ .summary__item__title._expenses {{ $t('money.expenses') }}.summary__item__amountAmount(:center="true"diff --git a/components/stat/StatSummaryPc.vue b/components/stat/StatSummaryPc.vueindex f94ee381..3e3bb7d5 100644--- a/components/stat/StatSummaryPc.vue+++ b/components/stat/StatSummaryPc.vue@@ -24,7 +24,7 @@ export default {.summary__item(:class="{ _expenses: statAverage.expenses > 0 || period === 'all' }")template(v-if="statAverage.expenses > 0 || period === 'all'").summary__row- .summary__title._expenses {{ $lang.money.expenses }}+ .summary__title._expenses {{ $t('money.expenses') }}.summary__amountAmount(:big="true"@@ -35,7 +35,7 @@ export default {.summary__row(v-if="period !== 'all' && statAverage.expenses > 0").summary__average.summary__average__icon: .mdi.mdi-chart-timeline- .summary__average__title {{ $lang.money.average }}+ .summary__average__title {{ $t('money.average') }}.summary__amount._averageAmount(:currency="$store.state.currencies.base"@@ -46,7 +46,7 @@ export default {.summary__item(:class="{ _total: statAverage.total !== 0 || period === 'all' }")template(v-if="statAverage.total !== 0 || period === 'all'").summary__row- .summary__title {{ $lang.money.total }}+ .summary__title {{ $t('money.total') }}.summary__amountAmount(:big="true"@@ -57,7 +57,7 @@ export default {.summary__row.summary__average.summary__average__icon: .mdi.mdi-chart-timeline- .summary__average__title {{ $lang.money.average }}+ .summary__average__title {{ $t('money.average') }}.summary__amount._averageAmount(:currency="$store.state.currencies.base"@@ -68,7 +68,7 @@ export default {.summary__item(:class="{ _incomes: statAverage.incomes > 0 || period === 'all' }")template(v-if="statAverage.incomes > 0 || period === 'all'").summary__row- .summary__title._incomes {{ $lang.money.incomes }}+ .summary__title._incomes {{ $t('money.incomes') }}.summary__amountAmount(:big="true"@@ -80,7 +80,7 @@ export default {.summary__row.summary__average.summary__average__icon: .mdi.mdi-chart-timeline- .summary__average__title {{ $lang.money.average }}+ .summary__average__title {{ $t('money.average') }}.summary__amount._averageAmount(:currency="$store.state.currencies.base"diff --git a/components/stat/chart/ChartItem2.vue b/components/stat/chart/ChartItem2.vueindex d3cc872d..d8488ea1 100644--- a/components/stat/chart/ChartItem2.vue+++ b/components/stat/chart/ChartItem2.vue@@ -2,7 +2,7 @@import dayjs from 'dayjs'export default {- name: 'ChartItem2',+ name: 'ChartItem',props: {period: {@@ -138,28 +138,25 @@ export default {display none&._week- padding-left $m4padding-right $m4+ padding-left $m4&._month- padding-left $m4padding-right $m4+ padding-left $m4&._year- padding-left $m4padding-right $m4-- &._grouped- // min-width 0+ padding-left $m4&._grouped._day- padding-left 2pxpadding-right 2px+ padding-left 2px&._grouped._week&._grouped._month- padding-left 2pxpadding-right 2px+ padding-left 2px&:hoverbackground var(--c-bg-3)@@ -169,9 +166,9 @@ export default {background var(--c-bg-4)&__name+ padding-top 4pxtext-align centertypo-small-upper(10px)- padding-top 4pxwhite-space nowrap&__graph@@ -184,13 +181,19 @@ export default {justify-content flex-endheight 78px+ +media-ipad()+ height 98px+^[0]._grouped &height 58px+ +media-ipad()+ height 78px+&-linewidth 6px- margin 0 1pxmin-height 1px+ margin 0 1pxborder-radius 6px&._expensesdiff --git a/components/stat/chart/ChartMenu.vue b/components/stat/chart/ChartMenu.vueindex b5feaf24..b1fdebe9 100644--- a/components/stat/chart/ChartMenu.vue+++ b/components/stat/chart/ChartMenu.vue@@ -64,27 +64,30 @@ ContextMenu(template(slot="opener")Dropdown._noBd(:active="visibleContextMenu"- title="Chart")+ :title="$t('chart.title')"+ )template(slot="content")template(v-if="filterPeriod !== 'year'")ContextMenuItem(icon="mdi mdi-ungroup"- :title="periods[filterPeriod].grouped ? 'Simple charts' : 'Grouped charts'"+ :title="periods[filterPeriod].grouped ? $t('chart.view.groupedTitle') : $t('chart.view.simpleTitle')"@onClick="toogleChartsView")ContextMenuItem(icon="mdi mdi-plus"- :title="periods[filterPeriod].grouped ? 'Add group' : 'Add period'"- @onClick="addPeriodOrGroup")+ :title="periods[filterPeriod].grouped ? $t('chart.view.addGroupButton') : $t('chart.view.addPeriodButton')"+ @onClick="addPeriodOrGroup"+ )ContextMenuItem(v-if="(periods[filterPeriod].grouped && periods[filterPeriod].showedGroups > 1) || (!periods[filterPeriod].grouped && periods[filterPeriod].showedPeriods > 1)"icon="mdi mdi-minus"- :title="periods[filterPeriod].grouped ? 'Remove group' : 'Remove period'"- @onClick="removePeriodOrGroup")+ :title="periods[filterPeriod].grouped ? $t('chart.view.removeGroupButton') : $t('chart.view.removePeriodButton')"+ @onClick="removePeriodOrGroup"+ )template(slot="desc")- template(v-if="periods[filterPeriod].grouped") Showed {{ periods[filterPeriod].showedGroups }} groups- template(v-else) Showed {{ periods[filterPeriod].showedPeriods }} periods+ template(v-if="periods[filterPeriod].grouped") {{ $t('chart.view.showed') }} {{ periods[filterPeriod].showedGroups }} {{ $t('chart.view.groupsName') }}+ template(v-else) {{ $t('chart.view.showed') }} {{ periods[filterPeriod].showedPeriods }} {{ $t('chart.view.periodsName') }}</template>diff --git a/components/stat/chart/ChartMenu2.vue b/components/stat/chart/ChartMenu2.vueindex fd20d8dd..dc903f93 100644--- a/components/stat/chart/ChartMenu2.vue+++ b/components/stat/chart/ChartMenu2.vue@@ -65,8 +65,8 @@ export default {<template lang="pug">.switcher.switcher__name(@click="toogleView")- template(v-if="periods[filterPeriod].grouped") {{ periods[filterPeriod].showedGroups }} groups- template(v-else) {{ periods[filterPeriod].showedPeriods }} {{ periodName }}+ template(v-if="periods[filterPeriod].grouped") {{ periods[filterPeriod].showedGroups }} {{ $t('chart.view.groupsName') }}+ template(v-else) {{ periods[filterPeriod].showedPeriods }} {{ $t(`dates.${periodName}.simple`) }}.switcher__content(:class="{ _active: visibleContextMenu}").switcher__item(@@ -75,12 +75,12 @@ export default {): .mdi.mdi-dots-horizontaltemplate(v-if="visibleContextMenu")- .switcher__item(@click="toogleView") View+ .switcher__item(@click="toogleView") {{ $t('chart.view.toogle') }}.switcher__item(v-if="(periods[filterPeriod].grouped && periods[filterPeriod].showedGroups > 1) || (!periods[filterPeriod].grouped && periods[filterPeriod].showedPeriods > 1)"@click="removePeriodOrGroup"- ) Remove- .switcher__item(@click="addPeriodOrGroup") Add+ ) {{ $t('chart.view.remove') }}+ .switcher__item(@click="addPeriodOrGroup") {{ $t('chart.view.add') }}.switcher__item(@click="visibleContextMenu = !visibleContextMenu"): .mdi.mdi-closediff --git a/components/trnForm/TrnForm.vue b/components/trnForm/TrnForm.vueindex 4bfc90df..3976332c 100644--- a/components/trnForm/TrnForm.vue+++ b/components/trnForm/TrnForm.vue@@ -106,13 +106,7 @@ export default {try {const isFormValid = this.validateForm()if (isFormValid) {- // if (this.$store.state.trnForm.values.trnId) {- // this.$store.commit('trnForm/closeTrnForm')- // }-this.showSuccess()- // setTimeout(() => {- // }, 200)setTimeout(() => {this.isTransfer@@ -303,12 +297,12 @@ export default {//- Laptoptemplate(v-if="$store.state.ui.pc")TrnFormHeader- TrnFormHeaderTransfer+ TrnFormHeaderTransfer(v-if="isTransfer")TrnFormCalendarTrnFormAmountInput(@onFormSubmit="handleSubmitForm")template(v-if="$store.getters['categories/quickSelectorCategoriesIds'].length").trnForm__quickCats- .formTitle Favorite categories+ .formTitle {{ $t('categories.favoriteTitle') }}CategoriesView(:ids="$store.getters['categories/quickSelectorCategoriesIds']"ui="_flat"@@ -316,6 +310,7 @@ export default {@onClick="categoryId => $store.commit('trnForm/setTrnFormValues', { categoryId })")+ //- Mobiletemplate(v-if="$store.state.ui.mobile")TrnFormAmount(@handleMath="handleMath"@@ -327,7 +322,7 @@ export default {@onFormSubmit="handleSubmitForm")TrnFormHeader- TrnFormHeaderTransfer(v-if="$store.getters['wallets/walletsSortedIds'].length > 1")+ TrnFormHeaderTransfer(v-if="isTransfer").swiper-slide(:style="{ minHeight: `${$store.state.trnForm.height}px` }")template(v-if="slider")@@ -347,32 +342,6 @@ export default {TrnFormModalTrn</template>-<style lang="stylus">-@import "~assets/stylus/variables/margins"--.trnForm- &__quickWallets- padding-bottom 16px-- .walletsWidget- opacity .6- display grid- grid-template-columns repeat(3, minmax(auto, 1fr))- grid-column-gap 12px- grid-row-gap 12px- padding 0 16px- padding-top 12px-- .walletItemWidget- overflow hidden- border-radius $m4--.formWallets- .walletsWidget- padding-top 0--</style>-<style lang="stylus" scoped>@import "~assets/stylus/variables/animations"@import "~assets/stylus/variables/margins"@@ -408,8 +377,4 @@ export default {@media $media-laptopborder-radius 16px-- // &__scroll- // @media $media-laptop- // min-height 600px</style>diff --git a/components/trnForm/TrnFormAmount.vue b/components/trnForm/TrnFormAmount.vueindex 9466369a..8e650423 100644--- a/components/trnForm/TrnFormAmount.vue+++ b/components/trnForm/TrnFormAmount.vue@@ -62,9 +62,9 @@ export default {.trnFormAmount__content.trnFormAmount__type- template(v-if="amountType === 0") {{ $lang.money.expenses }}- template(v-if="amountType === 1") {{ $lang.money.incomes }}- template(v-if="amountType === 2 && $store.getters['wallets/walletsSortedIds'].length > 1") {{ $lang.money.transfer }}+ template(v-if="amountType === 0") {{ $t('money.expenses') }}+ template(v-if="amountType === 1") {{ $t('money.incomes') }}+ template(v-if="amountType === 2 && $store.getters['wallets/walletsSortedIds'].length > 1") {{ $t('money.transfer') }}.trnFormAmount__value {{ amountString }}.trnFormAmount__evaluation {{ $store.state.trnForm.values.amountEvaluation }}diff --git a/components/trnForm/TrnFormAmountInput.vue b/components/trnForm/TrnFormAmountInput.vueindex 388212c6..04fcdc13 100644--- a/components/trnForm/TrnFormAmountInput.vue+++ b/components/trnForm/TrnFormAmountInput.vue@@ -121,18 +121,18 @@ export default {.trnFormAmountPc__type._expenses(@click="() => setAmountType(0)":class="{ _active: amountType === 0 }"- ) {{ $lang.money.expenses }}+ ) {{ $t('money.expenses') }}.trnFormAmountPc__type._incomes(@click="() => setAmountType(1)":class="{ _active: amountType === 1 }"- ) {{ $lang.money.incomes }}+ ) {{ $t('money.incomes') }}.trnFormAmountPc__type(v-if="$store.getters['wallets/walletsSortedIds'].length > 1"@click="() => setAmountType(2)":class="{ _active: amountType === 2 }"- ) Transfer+ ) {{ $t('trnForm.transferTitle') }}.trnFormAmountPc__inputinput.trnFormAmountPc__input__value(@@ -166,7 +166,7 @@ export default {)Button(v-else- :title="$store.state.trnForm.values.amountType === 2 ? 'Create transfer' : 'Create transaction'"+ :title="$store.state.trnForm.values.amountType === 2 ? $t('trnForm.createTransferButton') : $t('trnForm.createTrnButton')"className="_blue _text-center"size="lg"@onClick="$emit('onFormSubmit')"diff --git a/components/trnForm/TrnFormHeaderTransfer.vue b/components/trnForm/TrnFormHeaderTransfer.vueindex 8d56030a..bf9173d6 100644--- a/components/trnForm/TrnFormHeaderTransfer.vue+++ b/components/trnForm/TrnFormHeaderTransfer.vue@@ -1,8 +1,19 @@<script>export default {+ fetch () {+ this.$store.commit('trnForm/setTrnFormTransfer', {+ tranferType: 'from',+ walletId: this.walletFromId+ })+ this.$store.commit('trnForm/setTrnFormTransfer', {+ tranferType: 'to',+ walletId: this.walletToId+ })+ },+computed: {walletFromId () {- return this.$store.state.trnForm.transfer.from || this.$store.getters['wallets/walletsSortedIds'][0]+ return this.$store.state.trnForm.values.walletId || this.$store.getters['wallets/walletsSortedIds'][0]},walletFrom () {return this.$store.state.wallets.items[this.walletFromId]@@ -13,17 +24,6 @@ export default {walletTo () {return this.$store.state.wallets.items[this.walletToId]}- },-- created () {- this.$store.commit('trnForm/setTrnFormTransfer', {- tranferType: 'from',- walletId: this.walletFromId- })- this.$store.commit('trnForm/setTrnFormTransfer', {- tranferType: 'to',- walletId: this.walletToId- })}}</script>@@ -31,7 +31,6 @@ export default {<template lang="pug">.trnFormHeader(v-if="$store.getters['wallets/walletsSortedIds'].length > 1"- v-show="this.$store.state.trnForm.values.amountType === 2")//- Wallet fromtemplate(v-if="walletFrom")diff --git a/components/trnForm/TrnFormModalCats.vue b/components/trnForm/TrnFormModalCats.vueindex b1c62b4d..2d5743b6 100644--- a/components/trnForm/TrnFormModalCats.vue+++ b/components/trnForm/TrnFormModalCats.vue@@ -61,7 +61,7 @@ export default {<template lang="pug">TrnFormModal(:show="$store.state.trnForm.modal.categories"- :title="$lang.categories.name"+ :title="$t('categories.name')":position="$store.state.ui.mobile ? 'bottom' : null"noPadding@onClose="$store.commit('trnForm/toogleTrnFormModal', 'categories')"@@ -71,22 +71,22 @@ TrnFormModal(.switcher__item(:class="{ _active: slider.activeIndex === 0 }"@click="slider.slideTo(0)"- ) Last used+ ) {{ $t('categories.lastUsedTitle') }}.switcher__item(:class="{ _active: slider.activeIndex === 1 }"@click="slider.slideTo(1)"- ) Favorites+ ) {{ $t('categories.favoriteTitle') }}.switcher__item(:class="{ _active: slider.activeIndex === 2 }"@click="slider.slideTo(2)"- ) All+ ) {{ $t('categories.allTitle') }}.swiper-container(ref="slider").swiper-wrapper.swiper-slide.scrollBlock.waitForScroll(- v-if="$store.state.ui.lastUsedCatsInTrnForm === 'visible' && $store.getters['categories/lastUsedCategoriesIdsByDate'].length > 0"+ v-if="$store.getters['categories/lastUsedCategoriesIdsByDate'].length > 0":style="modalStyle").marginBottomdiff --git a/components/trnForm/TrnFormModalDescription.vue b/components/trnForm/TrnFormModalDescription.vueindex 9b3c2e6e..7e881e71 100644--- a/components/trnForm/TrnFormModalDescription.vue+++ b/components/trnForm/TrnFormModalDescription.vue@@ -44,7 +44,7 @@ export default {TrnFormModal(v-if="show":show="show"- :title="$lang.trnForm.description.title"+ :title="$t('trnForm.description.title')":position="$store.state.ui.mobile ? 'bottom' : null"@onClose="$store.commit('trnForm/toogleTrnFormModal', 'description')")@@ -52,20 +52,20 @@ TrnFormModal(.description__filedtextarea.textarea(v-model="description"- :placeholder="$lang.trnForm.description.placeholder"+ :placeholder="$t('trnForm.description.placeholder')").description__action.description__action-cancelButton(className="_grey _inline"- :title="$lang.base.cancel"+ :title="$t('base.cancel')"@onClick="handleCancel").description__action-okButton(className="_blue _inline"- :title="$lang.base.save"+ :title="$t('base.save')"@onClick="handleSave")</template>diff --git a/components/trnForm/TrnFormModalTrn.vue b/components/trnForm/TrnFormModalTrn.vueindex 6e677a7d..5de8dfa7 100644--- a/components/trnForm/TrnFormModalTrn.vue+++ b/components/trnForm/TrnFormModalTrn.vue@@ -111,19 +111,6 @@ TrnFormModal(@import "~assets/stylus/variables/margins".trnFormWalletsList- .walletsWidget- display grid- grid-template-columns repeat(2, minmax(auto, 1fr))- grid-column-gap 12px- grid-row-gap 12px- padding 0 16px-- .walletItemWidget- overflow hidden- cursor pointer- padding $m6- border-radius $m4-.walletsList__toogleborder-top 0padding-bottom 0diff --git a/components/trnForm/TrnFormModalWallets.vue b/components/trnForm/TrnFormModalWallets.vueindex 508de739..01d8be2c 100644--- a/components/trnForm/TrnFormModalWallets.vue+++ b/components/trnForm/TrnFormModalWallets.vue@@ -13,7 +13,7 @@ export default {TrnFormModal(v-if="$store.state.trnForm.modal.wallets":show="$store.state.trnForm.modal.wallets"- :title="$lang.wallets.title"+ :title="$t('wallets.title')":position="$store.state.ui.mobile ? 'bottom' : null"@onClose="$store.commit('trnForm/toogleTrnFormModal', 'wallets')")@@ -31,22 +31,9 @@ TrnFormModal(@import "~assets/stylus/variables/margins".trnFormWalletsList- .walletsWidget- display grid- grid-template-columns repeat(2, minmax(auto, 1fr))- grid-column-gap 12px- grid-row-gap 12px- padding 0 16px-- .walletItemWidget- overflow hidden- cursor pointer- padding $m6- border-radius $m4-.walletsList__toogle- border-top 0- padding-bottom 0margin 0+ padding-bottom 0text-align center+ border-top 0</style>diff --git a/components/trnForm/TrnFormTrns.vue b/components/trnForm/TrnFormTrns.vueindex 2a770969..6880fa16 100644--- a/components/trnForm/TrnFormTrns.vue+++ b/components/trnForm/TrnFormTrns.vue@@ -168,7 +168,7 @@ export default {.trnsList__pages(v-if="!isShowedAllTrns")Button(:class="['_text-center _border _inline']"- :title="$lang.trns.more"+ :title="$t('trns.more')"@onClick="showMoreTrns")</template>diff --git a/components/trns/list/TrnsList.vue b/components/trns/list/TrnsList.vueindex e6b0be16..71d1d1e2 100644--- a/components/trns/list/TrnsList.vue+++ b/components/trns/list/TrnsList.vue@@ -136,7 +136,7 @@ export default {.trnsList__pages(v-if="!isShowedAllTrns")Button(:class="['_text-center _border _inline']"- :title="$lang.trns.more"+ :title="$t('trns.more')"@onClick="showMoreTrns")</template>diff --git a/components/trns/modal/TrnModal.vue b/components/trns/modal/TrnModal.vueindex ad3e82d7..7f7feb4e 100644--- a/components/trns/modal/TrnModal.vue+++ b/components/trns/modal/TrnModal.vue@@ -201,9 +201,6 @@ Portal(.marginBottommargin-bottom $m7-.moreActions- padding-top $m8-.itemdisplay flexwidth 100%diff --git a/components/wallets/form/WalletForm.vue b/components/wallets/form/WalletForm.vueindex 5b9b7eb1..fd08d8bd 100644--- a/components/wallets/form/WalletForm.vue+++ b/components/wallets/form/WalletForm.vue@@ -87,7 +87,7 @@ export default {if (!this.wallet.name) {this.$notify({title: '😮',- text: this.$lang.wallets.form.name.error+ text: this.$t('wallets.form.name.error')})return false}@@ -96,7 +96,7 @@ export default {if (!this.wallet.currency) {this.$notify({title: '😮',- text: this.$lang.wallets.form.currency.error+ text: this.$t('wallets.form.currency.error')})return false}@@ -107,7 +107,7 @@ export default {if (this.walletId !== walletId) {this.$notify({title: '😮',- text: this.$lang.wallets.form.name.exist+ text: this.$t('wallets.form.name.exist')})return false}@@ -115,7 +115,7 @@ export default {else {this.$notify({title: '😮',- text: this.$lang.wallets.form.name.exist+ text: this.$t('wallets.form.name.exist')})return false}@@ -131,8 +131,8 @@ export default {<template lang="pug">ComponentWraptemplate(slot="headerLeft")- template(v-if="!walletId") {{ $lang.wallets.createNewTitle }}- template(v-else) {{ $lang.wallets.editTitle }}+ template(v-if="!walletId") {{ $t('wallets.createNewTitle') }}+ template(v-else) {{ $t('wallets.editTitle') }}template(slot="content").form@@ -140,11 +140,11 @@ ComponentWrap.inputTextinput(type="text"- :placeholder="$lang.wallets.form.name.placeholder"+ :placeholder="$t('wallets.form.name.placeholder')"v-model="wallet.name"v-focus.lazy="$store.state.ui.pc").inputText__value- .inputText__label {{ $lang.wallets.form.name.label }}+ .inputText__label {{ $t('wallets.form.name.label') }}.form__btns.form__btns__i@@ -152,18 +152,18 @@ ComponentWrap.inputModal._flex.inputModal__value {{ wallet.currency }}.inputModal__content- .inputModal__label {{ $lang.wallets.form.currency.label }}+ .inputModal__label {{ $t('wallets.form.currency.label') }}.form__btns__i.form-line(@click="showColors = true").inputModal._flex.inputModal__value: .inputModal__color(:style="{ background: wallet.color }")- .inputModal__label {{ $lang.wallets.form.color.label }}+ .inputModal__label {{ $t('wallets.form.color.label') }}.form-line._p0._cleanCheckbox(v-model="wallet.countTotal"- :title="$lang.wallets.form.total.placeholder"+ :title="$t('wallets.form.total.placeholder')":alt="true")//- colors@@ -173,7 +173,7 @@ ComponentWrap)ModalBottom(:center="true"- :title="$lang.wallets.form.color.placeholder"+ :title="$t('wallets.form.color.placeholder')"@onClose="showColors = false").inputText@@ -185,7 +185,7 @@ ComponentWrap@click="handleColorSelect(color)"v-for="color in colors").customColor- .customColor__title {{ $lang.wallets.form.color.custom }}+ .customColor__title {{ $t('wallets.form.color.custom') }}input.customColor__value(v-model="wallet.color" type="color")//- currencies@@ -195,7 +195,7 @@ ComponentWrap)ModalBottom(:center="true"- :title="$lang.wallets.form.currency.placeholder"+ :title="$t('wallets.form.currency.placeholder')"@onClose="showCurrencies = false").inputText@@ -210,7 +210,7 @@ ComponentWrap.colButton(:class="['_text-center _blue', { _inline: $store.state.ui.pc }]"- :title="$lang.wallets.form.save"+ :title="$t('wallets.form.save')"@onClick="handleSubmit")</template>diff --git a/components/wallets/item/WalletItem.vue b/components/wallets/item/WalletItem.vueindex d3714cd6..a2caaef1 100644--- a/components/wallets/item/WalletItem.vue+++ b/components/wallets/item/WalletItem.vue@@ -8,6 +8,10 @@ export default {id: {type: String,required: true+ },+ showBase: {+ type: Boolean,+ default: true}},@@ -15,14 +19,13 @@ export default {className () {return {walletItem: !this.ui,- walletItemWidget: this.ui === 'widget',walletItemTile: this.ui === 'tile',walletItemLine: this.ui === 'line'}},styles () {return {- background: (this.ui === 'widget' || this.ui === 'tile' || this.ui === 'line') && (this.wallet.color || this.$store.state.ui.defaultBgColor)+ background: (this.ui === 'tile' || this.ui === 'line') && (this.wallet.color || this.$store.state.ui.defaultBgColor)}},@@ -56,27 +59,15 @@ div(@click="handleClick")- //- widget- template(v-if="ui === 'widget'"-)- .walletItemWidget__name {{ wallet.name }}- .walletItemWidget__amount- Amount(- :alwaysShowSymbol="true"- :currency="wallet.currency"- :showBase="false"- :value="wallet.total"- )-//- tile- template(v-else-if="ui === 'tile' || ui === 'line'"-)+ template(v-if="ui === 'tile' || ui === 'line'").walletItemTile__name {{ wallet.name }}.walletItemTile__amountAmount(- :alwaysShowSymbol="true":currency="wallet.currency"+ :showBase="showBase":value="wallet.total"+ alwaysShowSymbolvertical="left")@@ -87,14 +78,14 @@ div(Icon(:abbr="wallet.name":background="wallet.color || $store.state.ui.defaultBgColor"- :medium="true"+ medium).walletItem__name {{ wallet.name }}.walletItem__amountAmount(- :alwaysShowSymbol="true":currency="wallet.currency":value="wallet.total"+ alwaysShowSymbol).walletItem__line</template>diff --git a/components/wallets/item/walletItem.styl b/components/wallets/item/walletItem.stylindex 508ab735..3a1820f3 100644--- a/components/wallets/item/walletItem.styl+++ b/components/wallets/item/walletItem.styl@@ -66,27 +66,6 @@color var(--c-font-4)fs-m()-.walletItemWidget- flex 1 1 0- padding 8px $m7- text-align right-- &__name- padding-bottom $m4- color var(--c-font-1)- font-size 12px-- &__amount- .amount- font-size 16px- color var(--c-font-1)-- .amount__symbol- margin-top $m1-- .amount__wrap._small- display none-.walletItemTileoverflow hiddenposition relativediff --git a/components/wallets/list/WalletsList.vue b/components/wallets/list/WalletsList.vueindex a8cdfa55..d2fb2c7b 100644--- a/components/wallets/list/WalletsList.vue+++ b/components/wallets/list/WalletsList.vue@@ -28,7 +28,6 @@ export default {className () {return {walletsList: !this.ui,- walletsWidget: this.ui === 'widget',walletsTiles: this.ui === 'tile',walletsLine: this.ui === 'line'}@@ -70,6 +69,6 @@ export default {).walletsList__toogle(v-if="showToogle && $store.getters['wallets/walletsSortedIds'].length > limit" @click="toogleWallets")- template(v-if="stateLimit > 0") {{ this.$lang.wallets.showAll }}- template(v-else) {{ this.$lang.wallets.showOnly }} {{ limit }}+ template(v-if="stateLimit > 0") {{ $t('wallets.showAll') }}+ template(v-else) {{ $t('wallets.showOnly') }} {{ limit }}</template>diff --git a/components/wallets/list/WalletsList3.vue b/components/wallets/list/WalletsList3.vueindex 75f03ef3..67321862 100644--- a/components/wallets/list/WalletsList3.vue+++ b/components/wallets/list/WalletsList3.vue@@ -63,8 +63,8 @@ export default {).walletsList__toogle(v-if="showToogle && $store.getters['wallets/walletsSortedIds'].length > limit" @click="toogleWallets")- template(v-if="stateLimit > 0") {{ this.$lang.wallets.showAll }}- template(v-else) {{ this.$lang.wallets.showOnly }} {{ limit }}+ template(v-if="stateLimit > 0") {{ this.$t('wallets.showAll') }}+ template(v-else) {{ this.$t('wallets.showOnly') }} {{ limit }}</template><style lang="stylus" scoped>diff --git a/components/wallets/list/walletsList.styl b/components/wallets/list/walletsList.stylindex c68836b0..b72b82ae 100644--- a/components/wallets/list/walletsList.styl+++ b/components/wallets/list/walletsList.styl@@ -39,12 +39,6 @@@media $media-laptopcolor var(--c-font-2)-.walletsWidget- z-index 2- position relative- overflow hidden- display flex-.walletsTilesdisplay gridgrid-template-columns repeat(3, 1fr)@@ -53,8 +47,8 @@padding 0 $m7.walletsLine- scrollbar()- display flexoverflow hidden+ display flexoverflow-x autopadding 0 $m7+ scrollbar()diff --git a/components/wallets/modal/WalletModal.vue b/components/wallets/modal/WalletModal.vueindex 2e0c8e26..73d23804 100644--- a/components/wallets/modal/WalletModal.vue+++ b/components/wallets/modal/WalletModal.vue@@ -81,7 +81,7 @@ export default {<template lang="pug">Portal(- v-if="$store.state.wallets.modal.id"+ v-if="$store.state.wallets.modal.show"to="modal")ModalBottom(@@ -98,15 +98,15 @@ Portal(template(slot="btns")ModalButton(- :name="$lang.base.delete"+ :name="$t('base.delete')"icon="mdi mdi-delete"@onClick="handleDeleteClick")ModalButton(- :name="$lang.base.edit"+ :name="$t('base.edit')"icon="mdi mdi-pencil"@onClick="handleEditClick")ModalButton(- :name="$lang.base.filter"+ :name="$t('base.filter')"icon="mdi mdi-filter-outline"@onClick="handleSetFilterWallet")diff --git a/components/wallets/sort/WalletsSort.vue b/components/wallets/sort/WalletsSort.vueindex 1b53f665..f749fe07 100644--- a/components/wallets/sort/WalletsSort.vue+++ b/components/wallets/sort/WalletsSort.vue@@ -43,7 +43,7 @@ export default {<template lang="pug">ComponentWrap(:contentPadding="$store.state.ui.pc")- template(slot="headerLeft") {{ $lang.wallets.sortTitle }}+ template(slot="headerLeft") {{ $t('wallets.sortTitle') }}template(slot="content")WalletsList2(@@ -68,7 +68,7 @@ ComponentWrap(:contentPadding="$store.state.ui.pc").colButton(className="_small _blue _text-center"- :title="$lang.base.save"+ :title="$t('base.save')"@onClick="saveWalletsOrder")</template>@@ -84,8 +84,8 @@ item-main-text()fs-m()item-icon()- font-size 22pxcolor var(--c-font-5)+ font-size 22px&:activeitem-bg-active()diff --git a/components/wallets/total/WalletsTotal.vue b/components/wallets/total/WalletsTotal.vueindex 77a527da..2303987e 100644--- a/components/wallets/total/WalletsTotal.vue+++ b/components/wallets/total/WalletsTotal.vue@@ -39,7 +39,7 @@ export default {v-if="$store.getters['wallets/hasWallets']").walletsTotal__item(v-if="totalInWallets.other !== 0")- .walletsTotal__title {{ $lang.money.all }}+ .walletsTotal__title {{ $t('money.all') }}.walletsTotal__valueAmount(:currency="$store.state.currencies.base"@@ -49,7 +49,7 @@ export default {).walletsTotal__item- .walletsTotal__title {{ $lang.money.wallets }}+ .walletsTotal__title {{ $t('money.wallets') }}.walletsTotal__valueAmount(:currency="$store.state.currencies.base"diff --git a/layouts/default.vue b/layouts/default.vueindex 12b0e2ab..538876e1 100644--- a/layouts/default.vue+++ b/layouts/default.vue@@ -9,23 +9,11 @@ export default {return { height: `${this.$store.state.ui.height}px` }},- lang () {- return this.$store.state.lang.lang- },-isProduction () {return process.env.NODE_ENV === 'production'}},- watch: {- lang (newValue, oldValue) {- if (newValue !== oldValue) {- this.$setLang(newValue)- }- }- },-async mounted () {this.getPageDimensions()window.addEventListener('resize', debounce(this.getPageDimensions, 600))@@ -83,8 +71,7 @@ export default {</template><style lang="stylus">-@import "~assets/stylus/variables/fonts"-@import "~assets/stylus/common/notifications"+@import "~assets/stylus/variables"*box-sizing border-box@@ -99,14 +86,13 @@ htmlbodyoverflow hidden+ overscroll-behavior-y containmargin 0color var(--c-font-2)font-primary()font-size 14pxline-height 1letter-spacing 0- overscroll-behavior-y contain- // background var(--c-bg-1)background var(--c-bg-1)user-select none</style>diff --git a/layouts/error.vue b/layouts/error.vueindex 6c7e5317..fd2172dd 100644--- a/layouts/error.vue+++ b/layouts/error.vue@@ -26,7 +26,7 @@ export default {</template><style lang="stylus">-@import "~assets/stylus/variables/margins"+@import "~assets/stylus/variables".containerpadding $m9diff --git a/locales/en-US.js b/locales/en-US.jsindex 39b07774..f3586f09 100644--- a/locales/en-US.js+++ b/locales/en-US.js@@ -6,20 +6,301 @@ export default {},theme: {- toogle: 'Change theme'+ change: 'Change theme'},trnForm: {+ transferTitle: 'Transfer',+ createTrnButton: 'Create transaction',+ createTransferButton: 'Create transfer',titleEditTrn: 'Edit transaction',titleCreateTrn: 'Create new transaction',filterWalletAndCategory: 'Wallet & Category',filterWallet: 'Wallet only',- filterAll: 'Everything'+ filterAll: 'Everything',+ title: 'Transaction form',+ lastUsedCats: 'Show last used categories',+ description: {+ title: 'Description',+ placeholder: 'Write description...'+ }},+ app: {+ thanks: 'Trnaks to @TheCarolissy and @TihomirovPro 🚀🤘',+ version: 'Version',+ desc: 'Powerful personal finance application',+ welcome: 'Welcome to Finapp',+ lang: {+ select: 'Select lang',+ en: 'English',+ ru: 'Русский'+ },+ theme: {+ select: 'Select theme',+ dark: 'Dark',+ light: 'Light'+ },+ madeBy: {+ text: 'Made with',+ name: 'by Ilya Komichev'+ }+ },++ userLogout: 'Logout',+ loginWithGoogle: 'Login with Google',+ changeTheme: 'Change theme',+ createTrn: 'Create transaction',+base: {sure: 'Are you sure?',yes: 'Yes',- no: 'No'+ no: 'No',+ sort: 'Sort',+ save: 'Save',+ cancel: 'Cancel',+ on: 'On',+ off: 'Off',+ edit: 'Edit',+ delete: 'Delete',+ filter: 'Filter'+ },++ welcome: {+ firstRun: {+ text: 'Start with create base configuration of application',+ btn: 'Start'+ },+ create: {+ text: 'Start creating your own wallets, categories',+ btn: 'Create'+ },+ or: 'or',+ demo: {+ text: 'Load app with created wallets, categories and transactions',+ btn: 'Start demo'+ },+ createFirstWallet: {+ text: "Let's start with create first Wallet",+ btn: 'Create wallet'+ },+ createFirstCategory: {+ text: "Great! Now Let's create first category",+ btn: 'Create category'+ }+ },++ settings: {+ title: 'Settings',+ lang: 'Language',+ options: 'Options',+ open: 'Open settings',+ customize: 'Сustomize',+ app: 'Application',+ delete: 'Delete',+ demo: 'Demo',+ deleteButton: 'Delete my data',+ loadDemoButton: 'Load demo data'+ },++ wallets: {+ title: 'Wallets',+ name: 'Wallets',+ new: 'New wallet',+ showAll: 'show all wallets',+ showOnly: 'show only',+ sortTitle: 'Sort wallets',+ createNewTitle: 'Create new wallet',+ editTitle: 'Edit wallet',+ form: {+ name: {+ label: 'Wallet name',+ placeholder: 'Write wallet name...',+ error: 'Write wallet name',+ exist: 'Wallet with same name is exist'+ },+ color: {+ label: 'Color',+ placeholder: 'Select color',+ error: 'Select color',+ custom: 'Custom color'+ },+ currency: {+ label: 'Currency',+ placeholder: 'Select currency',+ error: 'Select currency'+ },+ total: {+ placeholder: 'Count amount in total balance'+ },+ save: 'Save'+ }+ },++ currency: {+ selectBaseTitle: 'Select base currency'+ },++ categories: {+ title: 'Categories',+ name: 'Categories',+ shortTitle: 'Cats',+ new: 'New category',+ allTitle: 'All',+ lastUsedTitle: 'Last used',+ favoriteTitle: 'Favorite categories',+ createNewTitle: 'Create new category',+ editTitle: 'Edit category',+ form: {+ name: {+ label: 'Category name',+ placeholder: 'Write category name...',+ error: 'Write category name',+ exist: 'Category with same name is exist'+ },+ parent: {+ no: 'No parent',+ label: 'Parent category',+ placeholder: 'Select parent category'+ },+ color: {+ label: 'Color',+ placeholder: 'Select color',+ error: 'Select color',+ custom: 'Custom color'+ },+ icon: {+ label: 'Icon',+ placeholder: 'Select icon'+ },+ lastUsed: 'Show in last used categories',+ quickSelector: 'Show in trnForm quick selector',+ childColor: 'Apply color to all child categories',+ save: 'Save'+ }+ },++ stat: {+ shortTitle: 'Stat',+ balanceTitle: 'Balance',+ empty: 'No stat for this period',+ customize: {+ showPeriodsChart: 'Show periods chart',+ showCategorisChart: 'Show categories chart',+ showCategorisList: 'Show categories list'+ }+ },++ chart: {+ title: 'Chart',+ view: {+ add: 'Add',+ remove: 'Remove',+ toogle: 'Toogle chart view',+ showed: 'Showed',+ groupsName: 'groups',+ periodsName: 'periods',+ simpleTitle: 'Simple chart',+ groupedTitle: 'Griuped chart',+ addGroupButton: 'Add group',+ addPeriodButton: 'Add period',+ removeGroupButton: 'Remove group',+ removePeriodButton: 'Remove period'+ }+ },++ trns: {+ shortTitle: 'Trns',+ history: 'History',+ more: 'Show more'+ },++ create: {+ title: 'Create'+ },++ money: {+ incomes: 'Incomes',+ expenses: 'Expenses',+ transfer: 'Transfer',+ total: 'Total',+ average: 'Average',+ also: 'Also',+ wallets: 'Wallets',+ all: 'Total'+ },++ dates: {+ day: {+ current: 'Today',+ today: 'Today',+ yesterday: 'Yesterday',+ simple: 'Day'+ },+ week: {+ current: 'This week',+ simple: 'Week'+ },+ month: {+ current: 'This month',+ simple: 'Month'+ },+ year: {+ current: 'This year',+ simple: 'Year'+ },+ all: 'Show all'+ },++ alerts: {+ willDeleteEverything: 'This will delete all your wallets, categories and trns.'+ },++ buttons: {+ nextTitle: 'Next',+ prevTitle: 'Prev',+ nextStep: 'Next step'+ },++ budgets: {+ id: 'budgets',+ name: 'Budgets',+ form: {+ title: 'Create new budget',+ name: 'Budget name',+ amount: 'Budget amount',+ button: 'Create'+ },+ trns: {+ name: 'Budget transactions'+ },+ stat: {+ left: 'Left',+ got: 'Got',+ total: 'Total'+ }+ },++ groups: {+ id: 'groups',+ name: 'Groups',+ form: {+ title: 'Create new group',+ name: 'Group name',+ amount: 'Group amount',+ button: 'Create'+ },+ trns: {+ name: 'Group transactions'+ },+ stat: {+ expenses: 'Epenses',+ incomes: 'Incomes',+ total: 'Total'+ }+ },++ users: {+ title: 'Users'}}diff --git a/locales/en.json b/locales/en.jsondeleted file mode 100644index 37a8bba9..00000000--- a/locales/en.json+++ /dev/null@@ -1,243 +0,0 @@-{- "app": {- "desc": "Powerful personal finance application",- "welcome": "Welcome to Finapp",- "lang": {- "select": "Select lang",- "en": "English",- "ru": "Русский"- },- "theme": {- "select": "Select theme",- "dark": "Dark",- "light": "Light"- },- "madeBy": {- "text": "Made with",- "name": "by Ilya Komichev"- }- },-- "userLogout": "Logout",- "loginWithGoogle": "Login with Google",- "changeTheme": "Change theme",- "createTrn": "Create transaction",-- "base": {- "sort": "Sort",- "save": "Save",- "cancel": "Cancel",- "on": "On",- "off": "Off",- "edit": "Edit",- "delete": "Delete",- "filter": "Filter"- },-- "welcome": {- "firstRun": {- "text": "Start with create base configuration of application",- "btn": "Start"- },- "create": {- "text": "Start creating your own wallets, categories",- "btn": "Create"- },- "or": "or",- "demo": {- "text": "Load app with created wallets, categories and transactions",- "btn": "Start demo"- },- "createFirstWallet": {- "text": "Let's start with create first Wallet",- "btn": "Create wallet"- },- "createFirstCategory":{- "text": "Great! Now Let's create first category",- "btn": "Create category"- }- },-- "settings": {- "title": "Settings",- "lang": "Language",- "options": "Options",- "open": "Open settings",- "customize": "Сustomize",- "app": "Application",- "delete": "Delete",- "demo": "Demo"- },-- "wallets": {- "title": "Wallets",- "name": "Wallets",- "new": "New wallet",- "showAll": "show all wallets",- "showOnly": "show only",- "sortTitle": "Sort wallets",- "createNewTitle": "Create new wallet",- "editTitle": "Edit wallet",- "form": {- "name": {- "label": "Wallet name",- "placeholder": "Write wallet name...",- "error": "Write wallet name",- "exist": "Wallet with same name is exist"- },- "color": {- "label": "Color",- "placeholder": "Select color",- "error": "Select color",- "custom": "Custom color"- },- "currency": {- "label": "Currency",- "placeholder": "Select currency",- "error": "Select currency"- },- "total": {- "placeholder": "Count amount in total balance"- },- "save": "Save"- }- },-- "categories": {- "title": "Categories",- "name": "Categories",- "shortTitle": "Cats",- "new": "New category",- "createNewTitle": "Create new category",- "editTitle": "Edit category",- "form": {- "name": {- "label": "Category name",- "placeholder": "Write category name...",- "error": "Write category name",- "exist": "Category with same name is exist"- },- "parent": {- "no": "No parent",- "label": "Parent category",- "placeholder": "Select parent category"- },- "color": {- "label": "Color",- "placeholder": "Select color",- "error": "Select color",- "custom": "Custom color"- },- "icon": {- "label": "Icon",- "placeholder": "Select icon"- },- "lastUsed": "Show in last used categories",- "quickSelector": "Show in trnForm quick selector",- "childColor": "Apply color to all child categories",- "save": "Save"- }- },-- "stat": {- "shortTitle": "Stat",- "empty": "No stat for this period"- },-- "trns": {- "shortTitle": "Trns",- "history": "History",- "more": "Show more"- },-- "create": {- "title": "Create"- },-- "trnForm": {- "title": "Transaction form",- "lastUsedCats": "Last used categories",- "description": {- "title": "Description",- "placeholder": "Write description..."- }- },-- "money": {- "incomes": "Incomes",- "expenses": "Expenses",- "transfer": "Transfer",- "total": "Total",- "average": "Average",- "also": "Also",- "wallets": "Wallets",- "all": "Total"- },-- "dates": {- "day": {- "current": "Today",- "simple": "Day"- },- "week": {- "current": "This week",- "simple": "Week"- },- "month": {- "current": "This month",- "simple": "Month"- },- "year": {- "current": "This year",- "simple": "Year"- },- "all": "Show all"- },-- "alerts": {- "willDeleteEverything": "This will delete all your wallets, categories and trns"- },-- "buttons": {- "nextStep": "Next step"- },--- "budgets": {- "id": "budgets",- "name": "Budgets",- "form": {- "title": "Create new budget",- "name": "Budget name",- "amount": "Budget amount",- "button": "Create"- },- "trns": {- "name": "Budget transactions"- },- "stat": {- "left": "Left",- "got": "Got",- "total": "Total"- }- },-- "groups": {- "id": "groups",- "name": "Groups",- "form": {- "title": "Create new group",- "name": "Group name",- "amount": "Group amount",- "button": "Create"- },- "trns": {- "name": "Group transactions"- },- "stat": {- "expenses": "Epenses",- "incomes": "Incomes",- "total": "Total"- }- }-}diff --git a/locales/ru-RU.js b/locales/ru-RU.jsindex ac43408e..a9903f35 100644--- a/locales/ru-RU.js+++ b/locales/ru-RU.js@@ -7,20 +7,302 @@ export default {},theme: {- toogle: 'Сменить цвет оформления'+ change: 'Сменить цвет оформления'},trnForm: {+ transferTitle: 'Перевод',+ createTrnButton: 'Создать транзакцию',+ createTransferButton: 'Создать перевод',titleEditTrn: 'Редактирование транзакции',titleCreateTrn: 'Создание транзакции',filterWalletAndCategory: 'Кошелек и Категория',filterWallet: 'Только Кошелек',- filterAll: 'Все'+ filterAll: 'Все',+ title: 'Создание транзакции',+ lastUsedCats: 'Показывать последние использованные категории',+ description: {+ title: 'Описание',+ placeholder: 'Напишите описание...'+ }},+ app: {+ thanks: 'Спасибо @TheCarolissy и @TihomirovPro 🚀🤘',+ version: 'Версия',+ desc: 'Приложение для учета личных финансов',+ welcome: 'Добро пожаловать в Финапку',+ lang: {+ select: 'Выберите язык',+ en: 'English',+ ru: 'Русский'+ },+ theme: {+ change: 'Сменить тему',+ select: 'Выберите тему',+ dark: 'Темная',+ light: 'Светлая'+ },+ madeBy: {+ text: 'Разработал',+ name: 'Илья Комичев'+ }+ },++ userLogout: 'Выход',+ loginWithGoogle: 'Войти через Google',+ changeTheme: 'Сменить оформление',+ createTrn: 'Создать транзакцию',+base: {sure: 'Ты уверен?',yes: 'Да',- no: 'Нет'+ no: 'Нет',+ sort: 'Сортировка',+ save: 'Сохранить',+ cancel: 'Отмена',+ on: 'Да',+ off: 'Нет',+ edit: 'Редактировать',+ delete: 'Удалить',+ filter: 'Фильтровать'+ },++ welcome: {+ firstRun: {+ text: 'Пройти первоначальную настройку приложения',+ btn: 'Начать'+ },+ create: {+ text: 'Начнем с создания первого кошелька и категории',+ btn: 'Создать'+ },+ or: 'или',+ demo: {+ text: 'Загрузить приложение с заранее созданными кошельками и категориями',+ btn: 'Открыть демо режим'+ },+ createFirstWallet: {+ text: 'Создадим первый кошелек',+ btn: 'Создать'+ },+ createFirstCategory: {+ text: 'Отлично! Теперь создадим категорию',+ btn: 'Создать'+ }+ },++ settings: {+ title: 'Настройки',+ lang: 'Язык приложения',+ options: 'Опции',+ open: 'Открыть настройки',+ customize: 'Внешний вид',+ app: 'Приложение',+ delete: 'Удаление данных',+ demo: 'Демо режим',+ deleteButton: 'Удалить все мои данные',+ loadDemoButton: 'Загрузить демо данные'+ },++ wallets: {+ title: 'Кошельки',+ name: 'Кошельки',+ new: 'Новый кошелек',+ showAll: 'показать все кошельки',+ showOnly: 'показать только',+ sortTitle: 'Сортировать кошельки',+ createNewTitle: 'Создание кошелька',+ editTitle: 'Редактирование кошелек',+ form: {+ name: {+ label: 'Имя кошелька',+ placeholder: 'Напишите имя кошелька...',+ error: 'Напишите имя кошелька',+ exist: 'Кошелек с таким именем уже существует'+ },+ color: {+ label: 'Цвет',+ placeholder: 'Выберите цвет',+ error: 'Выберите цвет',+ custom: 'Кастомный цвет'+ },+ currency: {+ label: 'Валюта',+ placeholder: 'Выберите валюту',+ error: 'Выберите валюту'+ },+ total: {+ placeholder: 'Считать в общем балансе'+ },+ save: 'Сохранить'+ }+ },++ currency: {+ selectBaseTitle: 'Выбрать основную валюту'+ },++ categories: {+ title: 'Категории',+ name: 'Категории',+ shortTitle: 'Категории',+ new: 'Новая категория',+ allTitle: 'Все',+ lastUsedTitle: 'Недавние',+ favoriteTitle: 'Любимые категории',+ createNewTitle: 'Создание категории',+ editTitle: 'Редактирование категории',+ form: {+ name: {+ label: 'Имя категории',+ placeholder: 'Напишите имя категории...',+ error: 'Напишите имя категории',+ exist: 'Категория с таким именем уже существует'+ },+ parent: {+ no: 'Корневая категория',+ label: 'Категория',+ placeholder: 'Выберите категрию'+ },+ color: {+ label: 'Цвет',+ placeholder: 'Выберите цвет',+ error: 'Выберите цвет',+ custom: 'Кастомный цвет'+ },+ icon: {+ label: 'Иконка',+ placeholder: 'Выберите иконку'+ },+ lastUsed: 'Показывать в списке последних использованных категорий',+ quickSelector: 'Добавить в быстрый выбор при создании транзакции',+ childColor: 'Применить цвет ко всем дочерних категориям',+ save: 'Сохранить'+ }+ },++ stat: {+ shortTitle: 'Статистика',+ balanceTitle: 'Баланс',+ empty: 'Статистики за выбранный период нетю :)',+ customize: {+ showPeriodsChart: 'Показывать график периодов',+ showCategorisChart: 'Показывать график категорий',+ showCategorisList: 'Показывать список категорий'+ }+ },++ chart: {+ title: 'График',+ view: {+ add: 'Добавить',+ remove: 'Удалить',+ toogle: 'Изменить график',+ showed: 'Показано',+ groupsName: 'групп',+ periodsName: 'период',+ simpleTitle: 'Простой график',+ groupedTitle: 'График с группами',+ addGroupButton: 'Добавить группу',+ addPeriodButton: 'Добавить период',+ removeGroupButton: 'Удалить группу',+ removePeriodButton: 'Удалить период'+ }+ },++ trns: {+ shortTitle: 'Транзакции',+ history: 'История',+ more: 'Показать еще'+ },++ create: {+ title: 'Создать'+ },++ money: {+ incomes: 'Доход',+ expenses: 'Расход',+ transfer: 'Перевод',+ total: 'Итого',+ average: 'Среднее',+ also: 'Еще',+ wallets: 'Кошельки',+ all: 'Всего'+ },++ dates: {+ day: {+ current: 'Сегодня',+ today: 'Сегодня',+ yesterday: 'Вчера',+ simple: 'День'+ },+ week: {+ current: 'Текущая неделя',+ simple: 'Неделя'+ },+ month: {+ current: 'Текущий месяц',+ simple: 'Месяц'+ },+ year: {+ current: 'Текущий год',+ simple: 'Год'+ },+ all: 'Показать всё'+ },++ alerts: {+ willDeleteEverything: 'Все кошельки, категории и транзакции будут удалены.'+ },++ buttons: {+ nextTitle: 'Следующий',+ prevTitle: 'Предыдущий',+ nextStep: 'Далее'+ },++ budgets: {+ id: 'budgets',+ name: 'Проекты',+ form: {+ title: 'Создать новый проект',+ name: 'Имя проекта',+ amount: 'Стоимость проекта',+ button: 'Создать проект'+ },+ trns: {+ name: 'Транзакции проекта'+ },+ stat: {+ left: 'Осталось',+ got: 'Получено',+ total: 'Всего'+ }+ },++ groups: {+ id: 'groups',+ name: 'Группы',+ form: {+ title: 'Create new group',+ name: 'Group name',+ amount: 'Group amount',+ button: 'Create'+ },+ trns: {+ name: 'Group transactions'+ },+ stat: {+ expenses: 'Рассход',+ incomes: 'Доход',+ total: 'Итого'+ }+ },++ users: {+ title: 'Пользователи'}}diff --git a/locales/ru.json b/locales/ru.jsondeleted file mode 100644index c3d02533..00000000--- a/locales/ru.json+++ /dev/null@@ -1,242 +0,0 @@-{- "app": {- "desc": "Приложение для учета личных финансов",- "welcome": "Добро пожаловать в Финапку",- "lang": {- "select": "Выберите язык",- "en": "English",- "ru": "Русский"- },- "theme": {- "select": "Выберите тему",- "dark": "Темная",- "light": "Светлая"- },- "madeBy": {- "text": "Разработал",- "name": "Илья Комичев"- }- },-- "userLogout": "Выход",- "loginWithGoogle": "Войти через Google",- "changeTheme": "Сменить оформление",- "createTrn": "Создать транзакцию",-- "base": {- "sort": "Сортировка",- "save": "Сохранить",- "cancel": "Отмена",- "on": "Да",- "off": "Нет",- "edit": "Редактировать",- "delete": "Удалить",- "filter": "Фильтровать"- },-- "welcome": {- "firstRun": {- "text": "Пройти первоначальную настройку приложения",- "btn": "Начать"- },- "create": {- "text": "Начнем с создания первого кошелька и категории",- "btn": "Создать"- },- "or": "или",- "demo": {- "text": "Загрузить приложение с заранее созданными кошельками и категориями",- "btn": "Открыть демо режим"- },- "createFirstWallet": {- "text": "Создадим первый кошелек",- "btn": "Создать"- },- "createFirstCategory":{- "text": "Отлично! Теперь создадим категорию",- "btn": "Создать"- }- },-- "settings": {- "title": "Настройки",- "lang": "Язык приложения",- "options": "Опции",- "open": "Открыть настройки",- "customize": "Внешний вид",- "app": "Приложение",- "delete": "Удаление данных",- "demo": "Демо режим"- },-- "wallets": {- "title": "Кошельки",- "name": "Кошельки",- "new": "Новый кошелек",- "showAll": "показать все кошельки",- "showOnly": "показать только",- "sortTitle": "Сортировать кошельки",- "createNewTitle": "Создание кошелька",- "editTitle": "Редактирование кошелек",- "form": {- "name": {- "label": "Имя кошелька",- "placeholder": "Напишите имя кошелька...",- "error": "Напишите имя кошелька",- "exist": "Кошелек с таким именем уже существует"- },- "color": {- "label": "Цвет",- "placeholder": "Выберите цвет",- "error": "Выберите цвет",- "custom": "Кастомный цвет"- },- "currency": {- "label": "Валюта",- "placeholder": "Выберите валюту",- "error": "Выберите валюту"- },- "total": {- "placeholder": "Считать в общем балансе"- },- "save": "Сохранить"- }- },-- "categories": {- "title": "Категории",- "name": "Категории",- "shortTitle": "Категории",- "new": "Новая категория",- "createNewTitle": "Создание категории",- "editTitle": "Редактирование категории",- "form": {- "name": {- "label": "Имя категории",- "placeholder": "Напишите имя категории...",- "error": "Напишите имя категории",- "exist": "Категория с таким именем уже существует"- },- "parent": {- "no": "Корневая категория",- "label": "Категория",- "placeholder": "Выберите категрию"- },- "color": {- "label": "Цвет",- "placeholder": "Выберите цвет",- "error": "Выберите цвет",- "custom": "Кастомный цвет"- },- "icon": {- "label": "Иконка",- "placeholder": "Выберите иконку"- },- "lastUsed": "Показывать в списке последних использованных категорий",- "quickSelector": "Добавить в быстрый выбор при создании транзакции",- "childColor": "Применить цвет ко всем дочерних категориям",- "save": "Сохранить"- }- },-- "stat": {- "shortTitle": "Статистика",- "empty": "Статистики за выбранный период нетю :)"- },-- "trns": {- "shortTitle": "Транзакции",- "history": "История",- "more": "Показать еще"- },-- "create": {- "title": "Создать"- },-- "trnForm": {- "title": "Создание транзакции",- "lastUsedCats": "Последние категории",- "description": {- "title": "Описание",- "placeholder": "Напишите описание..."- }- },-- "money": {- "incomes": "Доход",- "expenses": "Расход",- "transfer": "Перевод",- "total": "Итого",- "average": "Среднее",- "also": "Еще",- "wallets": "Кошельки",- "all": "Всего"- },-- "dates": {- "day": {- "current": "Сегодня",- "simple": "День"- },- "week": {- "current": "Текущая неделя",- "simple": "Неделя"- },- "month": {- "current": "Текущий месяц",- "simple": "Месяц"- },- "year": {- "current": "Текущий год",- "simple": "Год"- },- "all": "Показать всё"- },-- "alerts": {- "willDeleteEverything": "Все кошельки, категории и транзакции будут удалены"- },-- "buttons": {- "nextStep": "Далее"- },-- "budgets": {- "id": "budgets",- "name": "Проекты",- "form": {- "title": "Создать новый проект",- "name": "Имя проекта",- "amount": "Стоимость проекта",- "button": "Создать проект"- },- "trns": {- "name": "Транзакции проекта"- },- "stat": {- "left": "Осталось",- "got": "Получено",- "total": "Всего"- }- },-- "groups": {- "id": "groups",- "name": "Группы",- "form": {- "title": "Create new group",- "name": "Group name",- "amount": "Group amount",- "button": "Create"- },- "trns": {- "name": "Group transactions"- },- "stat": {- "expenses": "Рассход",- "incomes": "Доход",- "total": "Итого"- }- }-}diff --git a/nuxt.config.js b/nuxt.config.jsindex 9ba4e9ff..0a260164 100644--- a/nuxt.config.js+++ b/nuxt.config.js@@ -48,7 +48,7 @@ export default {],link: [{rel: 'stylesheet',- href: 'https://fonts.googleapis.com/css?family=Roboto:400,500,700|Unica+One|Nunito:400,700,800&display=swap&subset=cyrillic'+ href: 'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Unica+One|Nunito:400,700,800&display=swap&subset=cyrillic'}, {rel: 'stylesheet',href: 'https://cdn.materialdesignicons.com/5.0.45/css/materialdesignicons.min.css'@@ -78,8 +78,7 @@ export default {plugins: [{ src: '~/plugins/initAppFromCache' },{ src: '~/plugins/dayjs' },- { src: '~/plugins/notifications' },- { src: '~/plugins/vueLang' }+ { src: '~/plugins/notifications' }],loading: false,@@ -130,8 +129,6 @@ export default {* https://i18n.nuxtjs.org/*/i18n: {- defaultLocale: 'en',- strategy: 'no_prefix',locales: [{code: 'en',file: 'en-US.js'@@ -139,6 +136,14 @@ export default {code: 'ru',file: 'ru-RU.js'}],+ strategy: 'no_prefix',+ defaultLocale: 'en',+ detectBrowserLanguage: {+ useCookie: true,+ cookieKey: 'i18n_redirected',+ alwaysRedirect: false+ },+ seo: false,lazy: true,langDir: 'locales/'},diff --git a/package.json b/package.jsonindex c4b47806..3677b856 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "finapp",- "version": "3.1.3",+ "version": "3.2.0","scripts": {"dev": "cross-env NUXT_HOST=0.0.0.0 nuxt","build": "nuxt build",@@ -28,7 +28,6 @@"swiper": "^6.2.0","vue-cleave-component": "^2.1.3","vue-focus": "^2.1.0",- "vue-lang": "^0.2.5","vue-notification": "^1.3.20","vuedraggable": "^2.24.1","vuejs-datepicker": "^1.6.2"diff --git a/pages/login.vue b/pages/login.vueindex 886dfa0b..0d14e511 100644--- a/pages/login.vue+++ b/pages/login.vue@@ -37,7 +37,6 @@ export default {changeLang (lang) {this.$store.dispatch('lang/setLang', lang)- this.$setLang(lang)}}}@@ -56,7 +55,7 @@ export default {:class="{ _active: $store.state.lang.lang === 'en' }") EN- .themeChanger(@click="$store.dispatch('ui/changeTheme')") {{ $lang.changeTheme }}+ .themeChanger(@click="$store.dispatch('ui/changeTheme')") {{ $t('changeTheme') }}.tab__contentAppName@@ -69,7 +68,7 @@ export default {)transition(name="fadeIn").loginButton__spiner(v-if="loading"): Spiner- .loginButton__text {{ $lang.loginWithGoogle }}+ .loginButton__text {{ $t('loginWithGoogle') }}</template><style lang="stylus" scoped>diff --git a/pages/stat.vue b/pages/stat.vuedeleted file mode 100644index 405e0f84..00000000--- a/pages/stat.vue+++ /dev/null@@ -1,70 +0,0 @@-<script>-export default {- name: 'StatPage',-- data () {- return {- visibleContextMenu: false,-- selectedPeriodAmount: {- label: '',- incomes: '',- expenses: ''- },-- periods: [{- slug: 'day',- name: this.$lang.dates.day.simple- }, {- slug: 'week',- name: this.$lang.dates.week.simple- }, {- slug: 'month',- name: this.$lang.dates.month.simple- }, {- slug: 'year',- name: this.$lang.dates.year.simple- }]- }- },-- computed: {- stat () {- return this.$store.getters['stat/statCurrentPeriod']- },-- periodName () {- return this.$store.state.filter.period- }- },-- mounted () {- },-- methods: {- changePeriod (period) {- this.$store.dispatch('filter/setPeriod', period)- }- }-}-</script>--<template lang="pug">-LayoutMobile2- template(#content)--- template(#modals)- CategoryModal- CurrencyModal- TrnForm- TrnModal- WalletModal- CategoryStatModal-</template>--<style lang="stylus" scoped>-@import "~assets/stylus/variables"---</style>diff --git a/pages/users.vue b/pages/users.vueindex 39f17445..500baa54 100644--- a/pages/users.vue+++ b/pages/users.vue@@ -8,13 +8,14 @@ export default {usersUid: {wK0dbJDL8xTdfQiyTOhK5dx11nC2: 'ilkome',empty: 'Empty',+ demoru: 'demoru',nd9fycmgEfMiWKq6cBoui9pszjN2: 'Lesya',kXVGIN19Mhd7WZUeTtZRqUSo2aJ3: 'Jenya','8WDRZqvN2AauTXAl4mGwAGyKbbr1': 'Senya',tDJ0Bozi9iXh51BWZXzPnE2SnrG3: 'Solves',- GB5TxVedunVQuNIqBM4vPwndw9N2: 'Anya',- Z44Qw7tRHVcBUhd6pTDZxW9oWok2: 'Dev',- '9nFJjMSSPMfmTtp8mzaPRoxDDq82': 'Nadya'+ // GB5TxVedunVQuNIqBM4vPwndw9N2: 'Anya',+ Z44Qw7tRHVcBUhd6pTDZxW9oWok2: 'Dev'+ // '9nFJjMSSPMfmTtp8mzaPRoxDDq82': 'Nadya'}}},diff --git a/pages/welcome.vue b/pages/welcome.vueindex f0a641a6..ae1cdd9b 100644--- a/pages/welcome.vue+++ b/pages/welcome.vue@@ -41,7 +41,6 @@ export default {changeLang (lang) {this.$store.dispatch('lang/setLang', lang)- this.$setLang(lang)}}}@@ -56,24 +55,24 @@ export default {.tab.tab__content.header- .header__title {{ $lang.app.welcome }}- .header__desc {{ $lang.app.desc }}- .header__user(@click="$store.dispatch('user/signOut')") {{ $lang.userLogout }} {{ $store.state.user.user.email }}+ .header__title {{ $t('app.welcome') }}+ .header__desc {{ $t('app.desc') }}+ .header__user(@click="$store.dispatch('user/signOut')") {{ $t('userLogout }} {{ $store.state.user.user.email') }}.options.options__item- .options__desc {{ $lang.app.lang.select }}+ .options__desc {{ $t('app.lang.select') }}.themeSelector.themeSelector__item(:class="{ _active: $store.state.lang.lang === 'ru' }"@click="changeLang('ru')"- ) {{ $lang.app.lang.ru }}+ ) {{ $t('app.lang.ru') }}.themeSelector__item(:class="{ _active: $store.state.lang.lang === 'en' }"@click="changeLang('en')"- ) {{ $lang.app.lang.en }}- .options__desc {{ $lang.app.theme.select }}+ ) {{ $t('app.lang.en') }}+ .options__desc {{ $t('app.theme.select') }}.themeSelector.themeSelector__item._dark(@@ -85,7 +84,7 @@ export default {.mdi.mdi-lightbulb-ontemplate(v-else).mdi.mdi-lightbulb-outline- .themeSelector__title {{ $lang.app.theme.dark }}+ .themeSelector__title {{ $t('app.theme.dark') }}.themeSelector__item._light(:class="{ _active: $colorMode.value === 'light' }"@@ -96,10 +95,10 @@ export default {.mdi.mdi-lightbulb-ontemplate(v-else).mdi.mdi-lightbulb-outline- .themeSelector__title {{ $lang.app.theme.light }}+ .themeSelector__title {{ $t('app.theme.light') }}Button._blue._center(- :title="$lang.buttons.nextStep"+ :title="$t('buttons.nextStep')"@onClick="step = 2")transition(name="fadeIn")@@ -107,25 +106,25 @@ export default {.tab.tab__content.header- .header__title {{ $lang.app.welcome }}- .header__desc {{ $lang.app.desc }}- .header__user(@click="$store.dispatch('user/signOut')") {{ $lang.userLogout }} {{ $store.state.user.user.email }}+ .header__title {{ $t('app.welcome') }}+ .header__desc {{ $t('app.desc') }}+ .header__user(@click="$store.dispatch('user/signOut')") {{ $t('userLogout }} {{ $store.state.user.user.email') }}.options.options__item- .options__desc {{ $lang.welcome.create.text }}+ .options__desc {{ $t('welcome.create.text') }}Button._blue._center(- :title="$lang.welcome.create.btn"+ :title="$t('welcome.create.btn')"@onClick="step = 3")template(v-if="$store.state.demo.hasDemo").options__or.options__or__border- .options__or__text {{ $lang.welcome.or }}+ .options__or__text {{ $t('welcome.or') }}.options__item- .options__desc {{ $lang.welcome.demo.text }}+ .options__desc {{ $t('welcome.demo.text') }}Button._grey._center(- :title="$lang.welcome.demo.btn"+ :title="$t('welcome.demo.btn')"@onClick="$store.dispatch('demo/createDemo')")//- wallet@@ -135,14 +134,14 @@ export default {.tab__content.tab__wrap.header- .header__title {{ $lang.app.welcome }}- .header__desc {{ $lang.app.desc }}- .header__user(@click="$store.dispatch('user/signOut')") {{ $lang.userLogout }} {{ $store.state.user.user.email }}+ .header__title {{ $t('app.welcome') }}+ .header__desc {{ $t('app.desc') }}+ .header__user(@click="$store.dispatch('user/signOut')") {{ $t('userLogout }} {{ $store.state.user.user.email') }}- .text {{ $lang.welcome.createFirstWallet.text }}+ .text {{ $t('welcome.createFirstWallet.text') }}.buttonButton._blue._center(- :title="$lang.welcome.createFirstWallet.btn"+ :title="$t('welcome.createFirstWallet.btn')"@onClick="showWalletForm = true")//- category@@ -151,10 +150,10 @@ export default {.tab.tab__content.icon: .mdi.mdi-folder-star- .text {{ $lang.welcome.createFirstCategory.text }}+ .text {{ $t('welcome.createFirstCategory.text') }}.buttonButton._blue._center(- :title="$lang.welcome.createFirstCategory.btn"+ :title="$t('welcome.createFirstCategory.btn')"@onClick="showCategoryForm = true")transition(name="fadeIn")@@ -181,8 +180,8 @@ export default {.stepsdisplay flexwidth 100%- border-radius $m4padding-bottom $m10+ border-radius $m4.stepItemflex-grow 1diff --git a/plugins/dayjs.js b/plugins/dayjs.jsindex 781f9240..5897e833 100644--- a/plugins/dayjs.js+++ b/plugins/dayjs.js@@ -1,18 +1,21 @@import dayjs from 'dayjs'const updateLocale = require('dayjs/plugin/updateLocale')const relativeTime = require('dayjs/plugin/relativeTime')+dayjs.extend(updateLocale)dayjs.extend(relativeTime)dayjs.updateLocale('en', {weekStart: 1-})const weekOfYear = require('dayjs/plugin/weekOfYear')dayjs.extend(weekOfYear)-export default (ctx, inject) => {+export default ({ app }, inject) => {+ const locale = require(`dayjs/locale/${app.i18n.locale}.js`)+ dayjs.locale(locale)+inject('day', (val) => {if (val) { return dayjs(+val) }return dayjs()diff --git a/plugins/vueLang.js b/plugins/vueLang.jsdeleted file mode 100644index 773306de..00000000--- a/plugins/vueLang.js+++ /dev/null@@ -1,9 +0,0 @@-import Vue from 'vue'-import Lang from 'vue-lang'--const locales = {- en: require('~/locales/en.json'),- ru: require('~/locales/ru.json')-}--Vue.use(Lang, { lang: 'en', locales })diff --git a/store/lang/actions.js b/store/lang/actions.jsindex 6fdce42b..5c6ab245 100644--- a/store/lang/actions.js+++ b/store/lang/actions.js@@ -21,7 +21,7 @@ export default {}},- async initLocalLang ({ rootState, commit }) {+ async initLocalLang ({ commit }) {const localLang = await localforage.getItem('finapp.lang')if (localLang) { commit('setLang', localLang) }},diff --git a/store/ui/actions.js b/store/ui/actions.jsindex 43ea047b..9907b62f 100644--- a/store/ui/actions.js+++ b/store/ui/actions.js@@ -4,11 +4,6 @@ export default {async initUi ({ commit, dispatch }) {const uiLocalStore = await localforage.getItem('uiLocalStore')- // visible trnForm last used categories- const lastUsedCatsInTrnForm = await localforage.getItem('ui.lastUsedCatsInTrnForm')- if (lastUsedCatsInTrnForm === 'visible') { commit('setLastUsedCatsInTrnForm', 'visible') }- if (lastUsedCatsInTrnForm === 'hidden') { commit('setLastUsedCatsInTrnForm', 'hidden') }-// uiif (uiLocalStore) {// stat@@ -95,19 +90,6 @@ export default {dispatch('ui/saveUiView', null, { root: true })},- /**- * Toggle last used categories in trnForm on Mobile- */- toogleLastUsedCatsInTrnForm ({ commit, state }) {- let nextStatus- state.lastUsedCatsInTrnForm === 'visible'- ? nextStatus = 'hidden'- : nextStatus = 'visible'-- localforage.setItem('ui.lastUsedCatsInTrnForm', nextStatus)- commit('setLastUsedCatsInTrnForm', nextStatus)- },-/*** Toggle cats chart*/diff --git a/store/ui/index.js b/store/ui/index.jsindex 0d88395b..66d8504a 100644--- a/store/ui/index.js+++ b/store/ui/index.js@@ -8,7 +8,6 @@ const state = () => ({mobile: false,pc: false,catsChart: 'visible',- lastUsedCatsInTrnForm: 'visible',statGraphsVisibility: 'visible',statItems: 'visible',statLastTrnsVisibility: 'hidden',diff --git a/store/ui/mutations.js b/store/ui/mutations.jsindex 9244b8ed..f2e04384 100644--- a/store/ui/mutations.js+++ b/store/ui/mutations.js@@ -21,10 +21,6 @@ export default {state.statGraphsVisibility = 'hidden'},- setLastUsedCatsInTrnForm (state, status) {- state.lastUsedCatsInTrnForm = status- },-setVisibleCatsChart (state, status) {state.catsChart = status},diff --git a/utils/formatDate.js b/utils/formatDate.jsindex 23f5bb69..3386a7bd 100644--- a/utils/formatDate.js+++ b/utils/formatDate.js@@ -4,15 +4,18 @@ const calendar = require('dayjs/plugin/calendar')dayjs.extend(calendar)export const formatDate = (value, type) => {+ // eslint-disable-next-line no-undef+ const currentLocale = $nuxt.$i18n.locale+switch (type) {case 'full':return {day: dayjs(+value).format('D'),weekday: dayjs(+value).calendar(null, {- sameDay: '[Today] ddd',- nextDay: '[Tomorrow] ddd',+ sameDay: `[${currentLocale === 'ru' ? 'Сегодня' : 'Today'}] ddd`,+ nextDay: `[${currentLocale === 'ru' ? 'Завтра' : 'Tomorrow'}] ddd`,nextWeek: 'dddd',- lastDay: '[Yesterday] ddd',+ lastDay: `[${currentLocale === 'ru' ? 'Вчера' : 'Yesterday'}] ddd`,lastWeek: 'dddd',sameElse: 'dddd'}),@@ -29,10 +32,10 @@ export const formatDate = (value, type) => {case 'trnItem':if (dayjs().isSame(+value, 'day')) {- return 'Today'+ return 'dates.day.today'}if (dayjs().isSame(dayjs(+value).add(1, 'day'), 'day')) {- return 'Yesterday'+ return 'dates.day.yesterday'}if (dayjs().isSame(+value, 'year')) {return dayjs(+value).format('DD.MM')