Open source personal finance application
release(4.1.0): TrnForm, Refactor, Styles
Ilya Komichev2809a3d3ba54
diff --git a/assets/stylus/colors-dark.styl b/assets/stylus/colors-dark.stylindex 29181b92..98d90006 100644--- a/assets/stylus/colors-dark.styl+++ b/assets/stylus/colors-dark.styl@@ -1,7 +1,7 @@html.dark- // Base+ // Alert//------------------------------------ --color-red-base #b81414+ --color-alert-base #b81414// Icon//-----------------------------------@@ -22,11 +22,6 @@ html.dark--color-layout-main-up #1b1b1c--color-layout-main theme('colors.dark3')- // Accent- //------------------------------------ --color-accent-base #2c74ff- --color-accent-down #3a7dff-// Colors//-------------------------------------c-red-1 #b81414diff --git a/assets/stylus/colors-light.styl b/assets/stylus/colors-light.stylindex 60254122..e6a8e26a 100644--- a/assets/stylus/colors-light.styl+++ b/assets/stylus/colors-light.styl@@ -1,7 +1,7 @@html// Base//------------------------------------ --color-red-base #b81414+ --color-alert-base #b81414// Icon//-----------------------------------@@ -22,11 +22,6 @@ html--color-layout-main-up theme('colors.neutral.50')--color-layout-main theme('colors.white')- // Accent- //------------------------------------ --color-accent-base #2c74ff- --color-accent-down #3a7dff-// colors//-------------------------------------c-red-1 #b81414diff --git a/components/base/BottomSheet2.vue b/components/base/BottomSheet2.vueindex fc663eb5..a7515851 100644--- a/components/base/BottomSheet2.vue+++ b/components/base/BottomSheet2.vue@@ -346,7 +346,7 @@ const wrapClasses = computed(() => ({</script><template lang="pug">-.z-50.select-none.overflow-hidden.absolute.inset-0.w-full.h-full(+.z-50.pointer-events-none.select-none.overflow-hidden.absolute.inset-0.w-full.h-full(ref="containerRef":class="wrapClasses")@@ -355,6 +355,7 @@ const wrapClasses = computed(() => ({:class="overflowClasses":style="overlayStyles"class=`+ md_invisibleabsolute inset-0 w-full h-fullbg-foreground-main/70`@@ -362,19 +363,19 @@ const wrapClasses = computed(() => ({)//- Drug- .drug(+ #trnForm.drug(ref="drug":class="drugClasses":style="drugStyles"class=`+ pointer-events-autooverflow-hidden- z-10 absolute left-1/2 bottom-0 w-full max-w-5xl h-auto+ z-10 absolute left-1/2 bottom-0 w-full h-auto-translate-x-1/2 translate-y-0bg-foreground-second`@click.stop="")-div(ref="handlerRef")slot(name="handler" :close="close")diff --git a/components/categories/Delete.vue b/components/categories/Delete.vueindex 51e51464..a299157f 100644--- a/components/categories/Delete.vue+++ b/components/categories/Delete.vue@@ -78,7 +78,7 @@ divModalBottomConfirm(:show="isShowDeleteConfirm":description="deleteDescText"- @onClose="isShowDeleteConfirm = false"+ @closed="isShowDeleteConfirm = false"@onConfirm="onDeleteConfirm")</template>diff --git a/components/categories/Form.vue b/components/categories/Form.vueindex e1d412f9..dd5e2a30 100644--- a/components/categories/Form.vue+++ b/components/categories/Form.vue@@ -145,8 +145,8 @@ div//-----------------------------------template(v-if="activeTab === 'data'").mb-4- .pb-2.text-skin-item-base-down.text-sm.leading-none {{ $t('wallets.form.name.label') }}- input.w-full.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-skin-item-base.bg-skin-item-main-bg.border.border-solid.border-skin-item-main-hover.placeholder_text-skin-item-base-down.transition.ease-in-out.focus_text-skin-item-base-up.focus_bg-skin-item-main-hover.focus_border-blue3.focus_outline-none(+ .pb-2.text-item-base-down.text-sm.leading-none {{ $t('wallets.form.name.label') }}+ input.w-full.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-item-base.bg-item-main-bg.border.border-solid.border-item-main-hover.placeholder_text-item-base-down.transition.ease-in-out.focus_text-item-base-up.focus_bg-item-main-hover.focus_border-blue3.focus_outline-none(:placeholder="$t('categories.form.name.placeholder')":value="categoryForm.name"type="text"@@ -206,7 +206,7 @@ divtemplate(v-else-if="color").colorPreview(:style="{ background: color }")- .pb-2.text-sm.text-skin-item-base-down {{ $t('wallets.form.colors.custom') }}+ .pb-2.text-sm.text-item-base-down {{ $t('wallets.form.colors.custom') }}input.cursor-pointer.w-full.h-12.p-0.border-0(v-model="categoryForm.color" type="color")//- Parent@@ -217,8 +217,8 @@ div.p-4 You can not change parent category because edited category has childs categories.template(v-if="isAllowChangeParent")- .cursor-pointer.mb-4.py-3.px-2.gap-x-3.flex-center.rounded-md.text-center.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(- :class="{ '!cursor-default !bg-skin-item-main-active': categoryForm.parentId === 0 }"+ .cursor-pointer.mb-4.py-3.px-2.gap-x-3.flex-center.rounded-md.text-center.bg-item-main-bg.hocus_bg-item-main-hover(+ :class="{ '!cursor-default !bg-item-main-active': categoryForm.parentId === 0 }"@click="emit('updateValue', 'parentId', 0)") {{ $t('categories.form.parent.no') }}@@ -237,20 +237,19 @@ div.cursor-pointer.w-10.h-10.rounded-full.flex-center.border-2.border-transparent(v-for="icon in iconGroup":key="icon"- :class="{ 'border-skin-accent-base': icon === categoryForm.icon }"+ :class="{ 'border-accent-2': icon === categoryForm.icon }":style="{ background: categoryForm.color }"@click="emit('updateValue', 'icon', icon)")- .text-2xl.text-skin-icon-base(:class="icon")+ .text-2xl.text-icon-base(:class="icon")//- Save//---------------------------------- .pt-4.pb-6- SharedButton(- :class="['_text-center _blue2 _ml-big', { _inline: $store.state.ui.pc }]"- :title="$t('wallets.form.save')"- @onClick="onSave"- )+ .pt-4.pb-6.flex-center+ UiButtonBlue(+ maxWidth+ @click="onSave"+ ) {{ $t('base.save') }}</template><style lang="stylus" scoped>diff --git a/components/categories/Item.vue b/components/categories/Item.vueindex 9dbf7cdf..eeda1c0f 100644--- a/components/categories/Item.vue+++ b/components/categories/Item.vue@@ -9,11 +9,14 @@ const props = defineProps<{isHideParentCategory?: booleanslider: any}>()+const emit = defineEmits<{(e: 'click', id: CategoryId): void+ (e: 'onClickIcon', id: CategoryId): void}>()const { $store } = useNuxtApp()+const router = useRouter()const { setFilterCatsId } = useFilter()const childCategoriesIds = computed(() =>@@ -23,12 +26,18 @@ const parentCategory = computed(() => $store.state.categories.items[props.categofunction onClickIcon() {// Prevent filter when using in TrnForm- if (props.slider) {+ if (props.slider)emit('click', props.id)- return- }- // TODO: useFilter+ emit('onClickIcon', props.id)+ // TODO: v4.1+ // router.push({+ // path: 'stat',+ // query: {+ // cats: [props.id],+ // },+ // })+setFilterCatsId(props.id)$store.commit('filter/setFilterDateNow')$store.dispatch('ui/setActiveTabStat', 'details')@@ -36,9 +45,9 @@ function onClickIcon() {</script><template lang="pug">-.cursor-pointer.py-2.px-2.gap-x-3.flex.items-center.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+.cursor-pointer.py-2.px-2.gap-x-3.flex.items-center.rounded-md.bg-item-main-bg.hocus_bg-item-main-hover(v-if="category"- :class="{ '!cursor-default !bg-skin-item-main-active': activeItemId === id }"+ :class="{ '!cursor-default !bg-item-main-active': activeItemId === id }"@click="emit('click', id)").w-8.h-8.flex.items-center.justify-center.rounded-full.text-xl.leading-none.text-neutral-50(@@ -47,13 +56,13 @@ function onClickIcon() {): div(:class="category.icon").grow.truncate- .text-xs.text-skin-item-base-down.dark_text-neutral-400(+ .text-xs.text-item-base-down.dark_text-neutral-400(v-if="parentCategory && !isHideParentCategory") {{ parentCategory.name }}- .leading-none.text-sm.text-skin-item-base {{ category.name }}+ .leading-none.text-sm.text-item-base {{ category.name }}- .font-unica.text-md.text-skin-item-base-down(+ .font-unica.text-md.text-item-base-down(v-if="childCategoriesIds.length > 0") {{ childCategoriesIds.length }}</template>diff --git a/components/categories/Selector.vue b/components/categories/Selector.vuenew file mode 100644index 00000000..c4b71cab--- /dev/null+++ b/components/categories/Selector.vue@@ -0,0 +1,89 @@+<script setup lang="ts">+import type { CategoryId } from '~/components/categories/types'++interface CategorySelector {+ parentId: CategoryId | null+ select: (id: CategoryId, isForce: boolean) => void+ closeRoot: () => void+ closeChild: () => void+}++defineProps<{+ isShow: boolean+ isAllowSelectParentCategory: boolean+}>()++const emit = defineEmits<{+ (e: 'onSelected', id: CategoryId): void+ (e: 'show', value: boolean): void+}>()++const { $store } = useNuxtApp()++const categorySelector = ref<CategorySelector>({+ parentId: null,+ select: (id: CategoryId, isForce: boolean) => {+ if (!isForce && $store.getters['categories/isCategoryHasChildren'](id)) {+ categorySelector.value.parentId = id+ return+ }++ emit('onSelected', id)+ categorySelector.value.closeRoot()+ categorySelector.value.closeChild()+ },+ closeRoot: () => {+ emit('show', false)+ },+ closeChild: () => {+ categorySelector.value.parentId = null+ },+})+</script>++<template lang="pug">+div+ //- Root Categories+ TrnFormModal(+ v-if="isShow"+ @closed="categorySelector.closeRoot"+ )+ template(#header)+ template {{ $t('categories.title') }}++ template(#default="{ close }")+ .pb-3.px-3+ CategoriesList(+ :ids="$store.getters['categories/categoriesRootIds']"+ class="!gap-x-1"+ @click="categorySelector.select"+ )++ //- Child Categories+ TrnFormModal(+ v-if="categorySelector.parentId"+ @closed="categorySelector.closeChild"+ )+ template(#header)+ .pt-3.flex-col.flex-center.gap-2.text-center+ Icon(+ :background="$store.state.categories.items[categorySelector.parentId].color"+ :icon="$store.state.categories.items[categorySelector.parentId].icon"+ big+ round+ )+ div {{ $store.state.categories.items[categorySelector.parentId].name }}++ template(#default="{ close }")+ .px-3.flex-center.pb-5(v-if="isAllowSelectParentCategory")+ UiButtonGrey.max-w-xs(+ @click="categorySelector.select(categorySelector.parentId, true)"+ ) {{ $t('chart.view.add') }}++ .pb-3.px-3+ CategoriesList(+ :ids="$store.getters['categories/getChildCategoriesIds'](categorySelector.parentId)"+ class="!gap-x-1"+ @click="categorySelector.select"+ )+</template>diff --git a/components/categories/page/List.vue b/components/categories/page/List.vueindex 6539c430..19fe38c9 100644--- a/components/categories/page/List.vue+++ b/components/categories/page/List.vue@@ -25,7 +25,7 @@ UiPagetemplate(#bottom).pb-4.px-2.flex.justify-evenly.gap-6//- Create- .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-item-main-bg.hocus_bg-item-main-hover(class="basis-1/2 max-w-[280px]"@click="$router.push('/categories/new')") {{ $t('categories.new') }}diff --git a/components/categories/page/New.vue b/components/categories/page/New.vueindex fd9c7c81..1d42a240 100644--- a/components/categories/page/New.vue+++ b/components/categories/page/New.vue@@ -31,12 +31,12 @@ UiPageto="/categories"custom)- a.grow.hocus_bg-skin-item-main-hover(+ a.grow.hocus_bg-item-main-hover(:href="href"@click="navigate")UiHeaderTitle- .pt-1.text-xs.font-medium.text-skin-item-base-down+ .pt-1.text-xs.font-medium.text-item-base-down| {{ $t('categories.createNewTitle') }}template(v-if="parentCategory")|@@ -44,7 +44,7 @@ UiPage.pb-1.flex.items-center.gap-4| {{ categoryForm.name ? categoryForm.name : $t("categories.form.name.label") }}- .w-8.h-8.rounded-full.flex-center.text-xl.text-skin-icon-base(+ .w-8.h-8.rounded-full.flex-center.text-xl.text-icon-base(:style="{ background: categoryForm.color }")div(:class="categoryForm.icon")diff --git a/components/categories/page/id/Edit.vue b/components/categories/page/id/Edit.vueindex 1a67a52e..d0790b86 100644--- a/components/categories/page/id/Edit.vue+++ b/components/categories/page/id/Edit.vue@@ -32,12 +32,12 @@ UiPage(v-if="category")to="/categories"custom)- a.grow.hocus_bg-skin-item-main-hover(+ a.grow.hocus_bg-item-main-hover(:href='href'@click='navigate')UiHeaderTitle- .pt-1.text-xs.font-medium.text-skin-item-base-down+ .pt-1.text-xs.font-medium.text-item-base-down| {{ $t('categories.title') }}template(v-if="parentCategory")|@@ -45,7 +45,7 @@ UiPage(v-if="category").pb-1.flex.items-center.gap-4| {{ categoryForm.name }}- .w-8.h-8.rounded-full.flex-center.text-xl.text-skin-icon-base(+ .w-8.h-8.rounded-full.flex-center.text-xl.text-icon-base(:style="{ background: categoryForm.color }")div(:class="categoryForm.icon")diff --git a/components/categories/page/id/Index.vue b/components/categories/page/id/Index.vueindex 203a427b..01b7407e 100644--- a/components/categories/page/id/Index.vue+++ b/components/categories/page/id/Index.vue@@ -30,7 +30,7 @@ const trnsIds = computed(() =>}))// TODO: useFilter-function handleSetFilterCategory() {+function onClickFilterCategory() {setFilterCatsId(categoryId.value)$store.commit('filter/setFilterDateNow')$store.dispatch('ui/setActiveTabStat', 'details')@@ -48,9 +48,9 @@ useHead({UiPage(v-if="category")UiHeaderrouter-link(v-slot="{ href, navigate }" :to="backLink" custom)- a.grow.hocus_bg-skin-item-main-hover(:href="href" @click="navigate")+ a.grow.hocus_bg-item-main-hover(:href="href" @click="navigate")UiHeaderTitle- .pt-1.text-xs.font-medium.text-skin-item-base-down+ .pt-1.text-xs.font-medium.text-item-base-down| {{ $t('categories.title') }}template(v-if="category.parentId")|@@ -58,7 +58,7 @@ UiPage(v-if="category").pb-1.flex.items-center.gap-4| {{ category.name }}- .w-8.h-8.rounded-full.flex-center.text-xl.text-skin-icon-base(+ .w-8.h-8.rounded-full.flex-center.text-xl.text-icon-base(:style="{ background: category.color }")div(:class="category.icon")@@ -72,9 +72,8 @@ UiPage(v-if="category")//- Open stat.pt-3.mb-12.px-2.flex- .cursor-pointer.p-1.px-2.flex.items-center.gap-3.bg-gray-50.dark_bg-dark4.rounded-md.hocus_bg-gray-100.dark_hocus_bg-neutral-800.shadow.hocus_shadow-lg(- class="dark_text-white/60"- @click="handleSetFilterCategory"+ UiItemShadow.cursor-pointer.p-1.px-2.flex.items-center.gap-3(+ @click="onClickFilterCategory").mdi.mdi-poll.text-xl.text-xs.leading-none {{ $t('statBy') }} {{ category.name }}@@ -82,7 +81,7 @@ UiPage(v-if="category")//- Childs categories.mb-12(v-if="category.childIds && category.childIds.length > 0")- .pb-3.px-2.flex.gap-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base+ .pb-3.px-2.flex.gap-2.text-lg.leading-none.font-nunito.font-semibold.text-item-basediv {{ $t('categories.title') }}:div {{ category.childIds.length }}diff --git a/components/currencies/List.vue b/components/currencies/List.vueindex 88cf422b..6ce7a726 100644--- a/components/currencies/List.vue+++ b/components/currencies/List.vue@@ -27,7 +27,7 @@ const list = computed(() => {class="grid-rows-[auto,1fr]").px-2- input.w-full.m-0.py-2.px-3.rounded-lg.text-base.font-normal.text-skin-item-base.bg-skin-item-main-bg.border.border-solid.border-skin-item-main-hover.placeholder_text-skin-item-base-down.transition.ease-in-out.focus_text-skin-item-base-up.focus_bg-skin-item-main-hover.focus_border-blue3.focus_outline-none(+ input.w-full.m-0.py-2.px-3.rounded-lg.text-base.font-normal.text-item-base.bg-item-main-bg.border.border-solid.border-item-main-hover.placeholder_text-item-base-down.transition.ease-in-out.focus_text-item-base-up.focus_bg-item-main-hover.focus_border-blue3.focus_outline-none(placeholder="Search..."v-model="searchInput"type="text"@@ -38,10 +38,10 @@ const list = computed(() => {.py-3.text-center {{ $t('notFound') }}template(v-if="!searchInput")- .cursor-pointer.py-2.px-3.gap-x-3.flex.items-center.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.py-2.px-3.gap-x-3.flex.items-center.rounded-md.bg-item-main-bg.hocus_bg-item-main-hover(v-for="currencyCode in walletsCurrencies":key="currencyCode"- :class="{ '!cursor-default text-skin-item-base-up !bg-skin-item-main-active': currencyCode === active }"+ :class="{ '!cursor-default text-item-base-up !bg-item-main-active': currencyCode === active }"@click="emit('onSelect', currencyCode, close)").flex.items-center@@ -53,10 +53,10 @@ const list = computed(() => {.my-2template(v-if="list.length > 0")- .cursor-pointer.py-2.px-3.gap-x-3.flex.items-center.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.py-2.px-3.gap-x-3.flex.items-center.rounded-md.bg-item-main-bg.hocus_bg-item-main-hover(v-for="currency in list":key="currency.code"- :class="{ '!cursor-default text-skin-item-base-up !bg-skin-item-main-active': currency.code === active }"+ :class="{ '!cursor-default text-item-base-up !bg-item-main-active': currency.code === active }"@click="emit('onSelect', currency.code, close)").flex.items-centerdiff --git a/components/currencies/Modal.vue b/components/currencies/Modal.vueindex a0d4b7ab..76fd9e50 100644--- a/components/currencies/Modal.vue+++ b/components/currencies/Modal.vue@@ -19,7 +19,7 @@ Portal(:maxHeight="height":height="height":isScrollerBlock="false"- insideClass="bg-skin-layout-main"+ insideClass="bg-layout-main"@closed="$store.commit('currencies/hideBaseCurrenciesModal')")template(#handler="{ close }")@@ -27,7 +27,7 @@ Portal(BaseBottomSheetClose(@onClick="close")template(#header)- .py-4.px-2.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl+ .py-4.px-2.text-center.text-item-base.text-xl.font-nunito.font-semibold.bg-layout-main.rounded-t-2xl| {{ $t('currency.selectBaseTitle') }}template(#default="{ close }")diff --git a/components/date/Selector.vue b/components/date/Selector.vueindex afa83cef..6098bca3 100644--- a/components/date/Selector.vue+++ b/components/date/Selector.vue@@ -78,7 +78,7 @@ Portal(to="modal")) {{ maxPeriodsNumber }}.pb-4.px-2.flex.justify-evenly.gap-6- .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-item-main-bg.hocus_bg-item-main-hover(class="basis-1/2 max-w-[280px]"@click="close()") {{ $t('close') }}diff --git a/components/filter/AddItem.vue b/components/filter/AddItem.vuenew file mode 100644index 00000000..9f4c1b5d--- /dev/null+++ b/components/filter/AddItem.vue@@ -0,0 +1,15 @@+<script setup lang="ts">+defineProps<{+ isShowText: boolean+}>()++const emit = defineEmits<{+ (e: 'click'): void+}>()+</script>++<template lang="pug">+FilterItemBg(@click="emit('click')")+ .mdi.mdi-plus.text-2xl+ .text-sm.leading-none(v-if="isShowText") {{ $t('categories.createNewTitle') }}+</template>diff --git a/components/filter/CategoryItem.vue b/components/filter/CategoryItem.vuenew file mode 100644index 00000000..f3e62594--- /dev/null+++ b/components/filter/CategoryItem.vue@@ -0,0 +1,26 @@+<script setup lang="ts">+import type { CategoryId } from '~/components/categories/types'++defineProps<{+ categoryId: CategoryId+}>()++const emit = defineEmits<{+ (e: 'click', categoryId: CategoryId): void+}>()+</script>++<template lang="pug">+FilterItemBg(+ @click="emit('click', categoryId)"+)+ .text-2xl(+ :style="{ color: $store.state.categories.items[categoryId].color }"+ :class="$store.state.categories.items[categoryId].icon"+ )+ div+ .text-2xs(v-if="$store.state.categories.items[categoryId].parentId").+ {{ $store.state.categories.items[$store.state.categories.items[categoryId].parentId].name }}+ .text-sm.leading-none.+ {{ $store.state.categories.items[categoryId].name }}+</template>diff --git a/components/filter/FilterRow.vue b/components/filter/FilterRow.vuenew file mode 100644index 00000000..dbe787a2--- /dev/null+++ b/components/filter/FilterRow.vue@@ -0,0 +1,13 @@+<script setup lang="ts">++</script>++<template lang="pug">+.grid.gap-3.overflow-hidden(+ class="grid-cols-[auto,1fr]"+)+ slot(name="add")+ .overflow-hidden.overflow-x-auto+ .flex.flex-wrap.gap-3+ slot(name="content")+</template>diff --git a/components/filter/ItemBg.vue b/components/filter/ItemBg.vuenew file mode 100644index 00000000..1d7d6005--- /dev/null+++ b/components/filter/ItemBg.vue@@ -0,0 +1,20 @@+<script setup lang="ts">+const emit = defineEmits<{+ (e: 'click'): void+}>()+</script>++<template lang="pug">+div(+ class=`+ cursor-pointer relative+ py-1 px-3+ flex items-center gap-3+ rounded-md+ bg-item-main-bg+ hocus_bg-item-main-hover+ `+ @click="emit('click')"+)+ slot+</template>diff --git a/components/filter/WalletItem.vue b/components/filter/WalletItem.vuenew file mode 100644index 00000000..8f76d3a4--- /dev/null+++ b/components/filter/WalletItem.vue@@ -0,0 +1,33 @@+<script setup lang="ts">+import useWallets from '~/components/wallets/useWallets'+import type { WalletId } from '~/components/wallets/types'++const props = defineProps<{+ id: WalletId+}>()++const emit = defineEmits(['click'])+const { walletsItemsSorted } = useWallets()++const wallet = computed(() => walletsItemsSorted.value[props.id])+</script>++<template lang="pug">+FilterItemBg(@click="emit('click', id)")+ .flex-center.gap-x-3+ //- Icon+ .w-6.h-6.rounded-md.flex-center.text-icon-base.text-xs.leading-none(+ :style="{ background: wallet.color }"+ class="mt-[2px]"+ ) {{ wallet.name.substring(0, 2) }}++ .grow+ .text-sm.leading-none {{ wallet.name }}+ .text-item-base+ Amount(+ :amount="wallet.amount"+ :currencyCode="wallet.currency"+ :isShowBaseRate="false"+ align="left"+ )+</template>diff --git a/components/lang/LangDropdown.vue b/components/lang/LangDropdown.vueindex 4a36400b..df24c335 100644--- a/components/lang/LangDropdown.vue+++ b/components/lang/LangDropdown.vue@@ -37,18 +37,20 @@ SharedContextMenu()template(slot="opener")- SharedButton._bdb(+ UiButtonSecond(:title="currentLanguageName"isShowDots- @onClick="visibleDropdown = !visibleDropdown"+ @click="visibleDropdown = !visibleDropdown")template(slot="content")SharedContextMenuItem(title="🇷🇺 Русский - Russian"- @onClick="changeLang('ru')")+ @onClick="changeLang('ru')"+ )SharedContextMenuItem(title="🇺🇸 English - Английский"- @onClick="changeLang('en')")+ @onClick="changeLang('en')"+ )</template>diff --git a/components/layout/MenuBottomModal.vue b/components/layout/MenuBottomModal.vueindex 9762d6b4..3d9d8976 100644--- a/components/layout/MenuBottomModal.vue+++ b/components/layout/MenuBottomModal.vue@@ -1,9 +1,11 @@<script setup lang="ts">+import { getStyles } from '~/components/ui/classes'+const { $store } = useNuxtApp()const activeTab = computed(() => $store.state.ui.activeTab)-const onClickTheme = (close) => {++function onClickTheme(close: unknown) {$store.dispatch('ui/changeTheme')- console.log(close)close && close()}</script>@@ -19,24 +21,18 @@ Portal(to="modal")BaseBottomSheetClose(@onClick="close")template(#default="{ close }")- .content(class="!overflow-hidden !pt-8 !pb-2")+ div(:class="getStyles('modal', ['bg', 'rounded', 'padding1'])")//- User- .mb-4.pb-4.border-b.border-neutral-300.dark_border-neutral-800- .mx-6.mb-2.dark_text-neutral-300- .text-xl.font-nunito.font-semibold {{ $store.state.user.user.displayName }}- .text-sm.text-gray-900.dark_text-neutral-500 {{ $store.state.user.user.email }}-- .cursor-pointer.py-3.px-6.space-x-5.flex.items-center.hocus_bg-white2.dark_hocus_bg-custom1(- @click="$store.dispatch('user/signOut')"- )- .text-xl.mdi.mdi-logout- .text-sm {{ $t('userLogout') }}+ .mx-4.mb-2.dark_text-neutral-300+ .text-xl.font-nunito.font-semibold {{ $store.state.user.user.displayName }}+ .text-sm.text-gray-900.dark_text-neutral-500 {{ $store.state.user.user.email }}//- Main Menu- LayoutSidebarMenu+ LayoutSidebarMenu(variant="modal")//- Theme- .cursor-pointer.flex.items-center.py-3.px-6.space-x-5.text-slate-600.dark_text-neutral-400.hocus_bg-zinc-100.dark_hocus_bg-neutral-800(+ div(+ :class="getStyles('item', ['link', 'rounded', 'menu', 'menuModal'])"@click="onClickTheme(close)").text-xl.mdi.mdi-palette@@ -62,11 +58,4 @@ Portal(to="modal")height 4pxbackground var(--c-bg-8)border-radius 4px--.content- padding 0- background var(--c-bg-3)- border-radius $m7 $m7 0 0- +media(600px)- border-radius $m7</style>diff --git a/components/layout/Sidebar.vue b/components/layout/Sidebar.vueindex 6eff04cc..516955ac 100644--- a/components/layout/Sidebar.vue+++ b/components/layout/Sidebar.vue@@ -1,20 +1,21 @@<script setup lang="ts">import useFilter from '~/components/filter/useFilter'+const { toggleWalletFilter } = useFilter()</script><template lang="pug" scoped>-.overflow-y-auto.h-full.bg-skin-layout-main-up+.overflow-y-auto.h-full.bg-layout-main-up.p-4.px-5.flex.items-center.justify-between.text-xl.font-bold.text-neutral-500.dark_text-neutral-200.font-nunito| {{ $t('appName') }}- .mdi.mdi-palette.cursor-pointer.text-skin-item-base-down.text-xl.hocus_text-skin-item-base-up(+ .mdi.mdi-palette.cursor-pointer.text-item-base-down.text-xl.hocus_text-item-base-up(@click="$store.dispatch('ui/changeTheme')").pt-2.pb-8- LayoutSidebarMenu+ LayoutSidebarMenu(variant="sidebar").pb-12WalletsList(@@ -23,7 +24,7 @@ const { toggleWalletFilter } = useFilter()@onClick="id => $router.push(`/wallets/${id}`)")template(#default="{ walletsItemsLimited }")- .cursor-pointer.flex.py-2.px-3.border-b.border-skin-item-main-hover.hocus_bg-skin-item-main-hover(+ .cursor-pointer.flex.py-2.px-3.border-b.border-item-main-hover.hocus_bg-item-main-hover(v-for="(walletItem, walletId) in walletsItemsLimited":key="walletId"@click="$router.push(`/wallets/${walletId}`)"@@ -31,23 +32,23 @@ const { toggleWalletFilter } = useFilter().grow.gap-x-3.flex.items-center.grow.flex-center.gap-x-3//- Icon- .w-6.h-6.rounded-md.flex-center.text-skin-icon-base.text-xs.leading-none(+ .w-6.h-6.rounded-md.flex-center.text-icon-base.text-xs.leading-none(:style="{ background: walletItem.color }"class="mt-[2px]"@click.stop="toggleWalletFilter(walletId)") {{ walletItem.name.substring(0, 2) }}//- Name- .grow.text-sm.text-skin-item-base {{ walletItem.name }}+ .grow.text-sm.text-item-base {{ walletItem.name }}//- Amount- .text-skin-item-base+ .text-item-baseAmount(:amount="walletItem.amount":currencyCode="walletItem.currency")template(#toggle="{ stateLimit, limit, toggle }")- .cursor-pointer.py-3.px-3.text-xs.text-center.hocus_text-skin-item-base-up.hocus_bg-skin-item-main-hover(+ .cursor-pointer.py-3.px-3.text-xs.text-center.hocus_text-item-base-up.hocus_bg-item-main-hover(@click="toggle")template(v-if="stateLimit > 0") {{ $t('wallets.showAll') }}diff --git a/components/layout/SidebarMenu.vue b/components/layout/SidebarMenu.vueindex a256481f..10f2e34e 100644--- a/components/layout/SidebarMenu.vue+++ b/components/layout/SidebarMenu.vue@@ -1,27 +1,35 @@-<script lang="ts">+<script setup lang="ts">import useMenuData from '~/components/menu/useMenuData'+import { getStyles } from '~/components/ui/classes'-export default defineComponent({- setup() {- const { items, onClick, checkIsActive, checkIsShow } = useMenuData()+const props = defineProps<{+ variant: 'modal' | 'sidebar'+}>()- return {- items,- onClick,- checkIsActive,- checkIsShow,- }- },-})+const { items, onClick, checkIsActive, checkIsShow } = useMenuData()++function getClasses(menuId: string) {+ const items = props.variant === 'modal'+ ? ['rounded', 'menuModal']+ : ['menuSidebar']++ const cls = getStyles('item', ['link', 'menu', ...items])++ return [+ cls,+ { 'text-slate-900 dark_text-neutral-100': checkIsActive(menuId) },+ { 'text-slate-600 dark_text-neutral-400': !checkIsActive(menuId) },+ ]+}</script><template lang="pug">div- .flex.items-center.py-3.px-6.space-x-5.cursor-pointer(+ div(v-for="(item, menuId) in items"v-if="checkIsShow(item)":key="menuId"- :class="['hocus_bg-gray-200 dark_hocus_bg-neutral-800', { 'text-slate-900 dark_text-neutral-100': checkIsActive(menuId) }, { 'text-slate-600 dark_text-neutral-400': !checkIsActive(menuId) }]"+ :class="getClasses(menuId)"@click="onClick(menuId)")Component.w-6.h-6(@@ -34,8 +42,4 @@ div).text-sm {{ item.name }}- .text-2xs.text-slate-600.dark_text-neutral-400(- v-if="item.isBeta"- class="-ml-2 -mt-2"- ) Beta</template>diff --git a/components/modal/ModalBottomConfirm.vue b/components/modal/ModalBottomConfirm.vueindex c29c2da3..38469f3d 100644--- a/components/modal/ModalBottomConfirm.vue+++ b/components/modal/ModalBottomConfirm.vue@@ -1,49 +1,36 @@-<script>-export default {- props: {- description: {- type: String,- default: null,- },- show: {- type: Boolean,- default: false,- },- },-}+<script setup lang="ts">+defineProps<{+ show: boolean+ description?: string+}>()++const emit = defineEmits<{+ (e: 'onConfirm'): void+ (e: 'closed'): void+}>()</script><template lang="pug">-Portal(+TrnFormModal(v-if="show"- to="modal"+ @closed="$emit('closed')")- ModalBottom(- :title="$t('base.sure')"- @onClose="$emit('onClose')"- )-- template(#default="{ closeModal }")- .pb-8.text-skin-red-base.text-center(v-if="description") {{ description }}- .pb-4.px-2.flex.justify-evenly.gap-6- ModalButton.grow(- :name="$t('base.no')"- icon="mdi mdi-close"- @onClick="closeModal"- )- ModalButton.grow(- :name="$t('base.yes')"- icon="mdi mdi-check"- @onClick="$emit('onConfirm')"- )-</template>+ template(#header)+ .pt-2.flex-center {{ $t('base.sure') }}-<style lang="stylus">-@import '~assets/stylus/variables/margins'+ template(#default="{ close }")+ .pb-2.text-alert-base.text-center(v-if="description") {{ description }}-.descError- padding-bottom $m8- color var(--c-expense-1)- text-align center-</style>+ .pb-2.px-2.flex.justify-evenly+ ModalButton.grow(+ :name="$t('base.no')"+ icon="mdi mdi-close"+ @onClick="close"+ )+ ModalButton.grow(+ :name="$t('base.yes')"+ icon="mdi mdi-check"+ @onClick="emit('onConfirm')"+ )+</template>diff --git a/components/shared/button/Button.vue b/components/shared/button/Button.vuedeleted file mode 100644index 244aa78d..00000000--- a/components/shared/button/Button.vue+++ /dev/null@@ -1,244 +0,0 @@-<script lang="ts">-// TODO: setup-export default defineComponent({- props: {- background: { type: String, default: null },- checkboxValue: { type: Boolean, default: false },- className: { type: String, default: null },- icon: { type: String, default: null },- isShowDots: { type: Boolean, default: false },- showCheckbox: { type: Boolean, default: false },- size: { type: String, default: 'md' },- title: { type: String, default: null },- },-- setup(props) {- const classNames = computed(() => ({- [`_size_${props.size}`]: props.size,- [props.className]: props.className,- '!pr-3': props.isShowDots,- }))-- return { classNames }- },-})-</script>--<template lang="pug">-.d-button(- :class="classNames"- :style="{ background: background }"- @click="$emit('onClick')"-)- .d-button__icon(v-if="icon")- div(:class="icon")-- .d-button__title.grow(v-if="title") {{ title }}-- .d-button__check(- v-if="showCheckbox"- @click.prevent=""- )- SharedInputsCheckbox(v-model="checkboxValue")-- .mdi.mdi-dots-vertical.text-lg(v-if="isShowDots")-</template>--<style lang="stylus">-// TODO: style-@import '~assets/stylus/variables/animations'-@import '~assets/stylus/variables/media'--.d-button-circle- display flex- align-items center- justify-content center- width 40px- height 40px- color var(--c-font-4)- font-size 16px- border-radius 50px-- &:active:not(._disable)- color var(--c-font-3)- background var(--c-bg-2)- box-shadow 2px 2px 6px 0 var(--c-bg-2)-- &:hover:not(._disable)- @media $media-laptop- color var(--c-font-3)- background var(--c-bg-1)- border-color var(--c-bg-8)-- &._disable- opacity .6-- &:active- background var(--c-bg-3)-</style>--<style lang="stylus" scoped>-.d-button- cursor pointer- display flex- align-items center- width 100%- padding $m7 $m8- color var(--c-font-2)- font-size 15px- border 1px solid transparent- border-radius $m3- anim-background()-- +media-hover()- color var(--c-font-1)- background var(--c-bg-6)-- &._ttu- text-transform uppercase-- &._borderBottom- width 100%- margin-bottom 0- padding $m7 $m7- border-radius $m5-- &._border- display flex- align-items center- justify-content center- margin 0 auto- padding $m6 $m6- color var(--c-font-4)- font-size 13px- background var(--c-bg-4)- border 1px solid var(--c-bg-5)- border-radius $m5- anim()-- &:active:not(._disable)- color var(--c-font-3)-- +media-laptop()- &:hover- border-color var(--c-bg-9)-- &._square- width 40px- height 40px-- &._bdb- min-height 48px- padding $m6 $m8- color var(--c-text-4)- font-size 14px- text-decoration none- background var(--c-bg-4)- border 1px solid var(--c-bg-5)- border-radius $m5-- +media-hover()- color var(--c-text-1)- background var(--c-item-bg-hover)- border 1px solid var(--c-item-bd-hover)-- &._inline- display flex- width 100%- max-width 220px- margin 0 auto-- &._center- align-items center- justify-content center- text-align center-- &._grey- color var(--c-font-2)- background var(--c-bg-5)- border-radius $m3-- /.light &- color var(--c-font-1)- background var(--c-bg-12)-- &._small- height 44px- padding 0 $m9- color var(--c-font-4)- font-size 12px- background var(--c-bg-3)- border 1px solid var(--c-bg-7)- border-radius $m6-- ^[0]:active &- color var(--c-font-3)-- ^[0]:hover &- @media $media-laptop- color var(--c-font-3)- background var(--c-bg-1)- border-color var(--c-bg-8)-- &._blue- color var(--c-font-1)- background var(--c-blue-1)-- &:hover- @media $media-laptop- background var(--c-blue-3)-- &._blue2- cursor pointer- max-width 320px- min-width 200px- margin 0 auto- padding $m7 $m7- color var(--c-font-1)- font-size 16px- text-align center- background var(--c-blue-3)- border-radius 36px- anim()-- +media-hover()- background var(--c-blue-1)-- &._maxWidth- max-width 280px-- &._size_lg- padding 16px- font-size 16px- border-radius 6px-- &._size_xl- padding 22px 36px- font-size 22px- border-radius 6px-- &__icon- opacity .85- margin-right $m6- margin-left -5px- font-size 18px- text-align center-- &:last-child- margin-right 0- margin-right -5px-- // +media-laptop()- // margin-right 10px- // margin-left -8px-- &__check- margin-left auto- padding-left 32px-- &__title- ~/._text-center &- flex-grow 1- font-size 16px- text-align center-</style>diff --git a/components/shared/contextMenu/ContextMenuItem.vue b/components/shared/contextMenu/ContextMenuItem.vueindex 6e3d9fc8..51fd1032 100644--- a/components/shared/contextMenu/ContextMenuItem.vue+++ b/components/shared/contextMenu/ContextMenuItem.vue@@ -25,7 +25,7 @@ export default {@click="handleClick").item__icon(v-if="icon"): div(:class="icon")- .grow.text-skin-item-base {{ title }}+ .grow.text-item-base {{ title }}.item__check(v-if="showCheckbox"diff --git a/components/stat/Date.vue b/components/stat/Date.vueindex 623445f2..118e0f07 100644--- a/components/stat/Date.vue+++ b/components/stat/Date.vue@@ -3,12 +3,12 @@ const isShowDateSelector = ref(false)</script><template lang="pug">-.z-10.hocus_bg-skin-item-main-hover+.z-10.hocus_bg-item-main-hover//- Date.cursor-pointer.px-2.flex.items-center.text-lg(@click="isShowDateSelector = true")- .py-3.text-skin-item-base-up.font-semibold.font-nunito.leading-none+ .py-3.text-item-base-up.font-semibold.font-nunito.leading-noneSharedDate(:date="$store.state.filter.date":period="$store.state.filter.period"diff --git a/components/stat/Filter.vue b/components/stat/Filter.vueindex a5d3ad90..c191e9ee 100644--- a/components/stat/Filter.vue+++ b/components/stat/Filter.vue@@ -2,7 +2,7 @@import useFilter from '~/components/filter/useFilter'const { $store } = useNuxtApp()-const { removeFilterCategoryId, clearFilter } = useFilter()+const { setFilterCatsId, removeFilterCategoryId, clearFilter } = useFilter()const filterWalletsItems = computed(() =>$store.state.filter.walletsIds.reduce((acc, id) => {@@ -17,55 +17,43 @@ const filterCategoriesItems = computed(() =>return acc}, {}),)++const isShowCategorySelector = ref(false)</script><template lang="pug">-.overflow-hidden(v-if="filterCategoriesItems || filterWalletsItems")- .pb-3.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base- | {{ $t('base.filter') }}-- .safe.scrollbar.overflow-hidden.overflow-x-auto.flex.flex-wrap.items-center.gap-4- //- Wallet- template(v-if="filterWalletsItems")- .overflow-hidden.cursor-pointer.relative.py-1.px-3.flex.flex-col.items-center.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover.shadow.hocus_shadow-lg(+.flex.flex-col.gap-2(v-if="filterCategoriesItems || filterWalletsItems")+ UiTitle {{ $t('base.filter') }}++ //- Category+ FilterRow+ template(#add)+ FilterAddItem(+ :isShowText="$store.state.filter.catsIds.length === 0"+ @click="isShowCategorySelector = true"+ )+ template(#content)+ FilterWalletItem(+ v-if="filterWalletsItems"v-for="(walletItem, walletId) in filterWalletsItems":key="walletId"+ :id="walletId"@click="$store.commit('filter/removeFilterWalletId', walletId)")- .absolute.top-0.left-0.w-full(:style="{ height: '2px', background: walletItem.color }")- .pr-2- .text-xs {{ walletItem.name }}- .text-sm.text-skin-item-base- Amount(- :amount="$store.getters['wallets/walletsTotal'][walletId]"- :currencyCode="walletItem.currency"- :isShowBaseRate="false"- )-- .absolute.top-1.right-1- .text-sm.mdi.mdi-close-- //- Category- template(v-if="filterCategoriesItems")- .cursor-pointer.relative.py-1.px-3.flex.items-center.gap-3.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover.shadow.hocus_shadow-lg(- v-for="(catItem, categoryId) in filterCategoriesItems"+ FilterCategoryItem(+ v-if="$store.state.filter.catsIds"+ v-for="categoryId in $store.state.filter.catsIds":key="categoryId"- @click="removeFilterCategoryId(categoryId)"+ :categoryId="categoryId"+ @click="removeFilterCategoryId")- .text-2xl(- :style="{ color: catItem.color }"- :class="catItem.icon"- )- div- .text-2xs(v-if="catItem.parentId") {{ $store.state.categories.items[catItem.parentId].name }}- .text-sm.leading-none {{ catItem.name }}-- .mdi.mdi-close.opacity-70.text-lg.leading-none-- //- Clear- .cursor-pointer.py-1.px-3.flex.items-center.gap-3.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover.shadow.hocus_shadow-lg(- @click="clearFilter"- )- .mdi.mdi-filter-remove-outline.text-2xl- .pr-1.text-xs.leading-none {{ $t('filter.clear') }}+ FilterItemBg(@click="clearFilter")+ .mdi.mdi-filter-remove-outline.text-2xl++ CategoriesSelector(+ :isShow="isShowCategorySelector"+ isAllowSelectParentCategory+ @show="value => isShowCategorySelector = value"+ @onSelected="setFilterCatsId"+ )</template>diff --git a/components/stat/Menu.vue b/components/stat/Menu.vueindex 085213b8..0c7ebe67 100644--- a/components/stat/Menu.vue+++ b/components/stat/Menu.vue@@ -23,12 +23,13 @@ function onClickStatMenu(tabName) {.my-4.px-2.sticky.z-20.backdrop-blur.firefoxBackdropFix(class="top-[44px] bg-white/70 dark_bg-dark3/70")- UiTabs2- UiTabsItem2.md_text-lg(+ UiTabs+ UiTabsItem.font-nunito.font-semibold(v-for="item in menu"v-if="!item.isPrivate || $store.getters['user/isDevUser']":key="item.id":isActive="item.id === activeTabStat"+ class="!text-lg"@click="onClickStatMenu(item.id)") {{ item.name }}</template>diff --git a/components/stat/Page.vue b/components/stat/Page.vuedeleted file mode 100644index d16e9f4d..00000000--- a/components/stat/Page.vue+++ /dev/null@@ -1,17 +0,0 @@-<script lang="ts">-export default {- head() {- return {- title: this.$t('stat.title'),- }- },-}-</script>--<template lang="pug">-.overflow-hidden.h-full- template(v-if="$store.getters['trns/hasTrns']")- LazyStatView-- LazyStatWelcomeActions(v-if="!$store.getters['trns/hasTrns']")-</template>diff --git a/components/stat/PeriodArrows.vue b/components/stat/PeriodArrows.vueindex 2c14f96d..cf79cd20 100644--- a/components/stat/PeriodArrows.vue+++ b/components/stat/PeriodArrows.vue@@ -10,7 +10,7 @@ const dates = computed(() => ({<template lang="pug">.flex.justify-between.px-3- .arrowDate.cursor-pointer.p-2.px-4.pl-2.flex.gap-2.bg-skin-item-main-bg._left.rounded-md(+ .arrowDate.cursor-pointer.p-2.px-4.pl-2.flex.gap-2.bg-item-main-bg._left.rounded-md(:class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isNewestPeriodSelected'] }"@click="$store.dispatch('filter/setPeriodNext')")@@ -22,7 +22,7 @@ const dates = computed(() => ({:period="$store.state.filter.period")- .arrowDate.cursor-pointer.p-2.px-4.pr-2.flex.gap-2.bg-skin-item-main-bg._right.rounded-md(+ .arrowDate.cursor-pointer.p-2.px-4.pr-2.flex.gap-2.bg-item-main-bg._right.rounded-md(:class="{ _disable: $store.state.filter.period === 'all' || $store.getters['stat/isOldestPeriodSelected'] }"@click="$store.dispatch('filter/setPeriodPrev')")diff --git a/components/stat/View.vue b/components/stat/View.vueindex 07fee049..c4c5dd3f 100644--- a/components/stat/View.vue+++ b/components/stat/View.vue@@ -18,7 +18,7 @@ const isMobileView = computed(() => width.value <= 1024)const { onWatch } = useStatChart()onWatch()-const isShowGroup = (type) => {+function isShowGroup(type) {const p1 = statPage.activeTab === 'details'|| statPage.activeTab === 'balance'|| (statPage.activeTab === 'income' && type === 'income')@@ -57,125 +57,124 @@ onDeactivated(async () => {</script><template lang="pug">-.overflow-y-auto.h-full.pb-8.js_scroll_page- .lg_max-w-4xl.pb-6- .flex.items-center.justify-between.gap-4.sticky.top-0.z-20.backdrop-blur(- class="h-[44px] bg-white/70 dark_bg-dark3/70"- )- StatDate.grow-- template(v-if="isMobileView")- .cursor-pointer.py-2.px-4.text-xs.text-skin-item-base-down.rounded-md.hocus_bg-skin-item-main-hover(- v-if="walletsCurrencies.length > 1"- @click="$store.commit('currencies/showBaseCurrenciesModal')"- )- | {{ $store.state.currencies.base }}-- template(v-if="!isMobileView")- .pb-6.px-2(v-if="walletsCurrencies.length > 1")- WalletsCurrenciesChanger-- .mx-2.mb-4.rounded-lg.bg-skin-item-main-bg.border.dark_border-neutral-800- LazyStatChartWrap(- v-if="ui.showMainChart"- :key="chartKeyDirtyFix"- )- .sm_flex.justify-between.px-2.pb-2- StatChartPeriods- StatChartOptions+.lg_max-w-4xl.pb-6+ .flex.items-center.justify-between.gap-4.sticky.top-0.z-20.backdrop-blur(+ class="h-[44px] bg-white/70 dark_bg-dark3/70"+ )+ StatDate.growtemplate(v-if="isMobileView")- .-mt-1- StatChartOptions- .px-2.border-t.border-b.dark_border-neutral-800- LazyStatChartWrap(- v-if="ui.showMainChart"- :key="chartKeyDirtyFix"- )-- .pt-1+ .cursor-pointer.py-2.px-4.text-xs.text-item-base-down.rounded-md.hocus_bg-item-main-hover(+ v-if="walletsCurrencies.length > 1"+ @click="$store.commit('currencies/showBaseCurrenciesModal')"+ )+ | {{ $store.state.currencies.base }}++ template(v-if="!isMobileView")+ .pb-6.px-2(v-if="walletsCurrencies.length > 1")+ WalletsCurrenciesChanger++ .mx-2.mb-4.rounded-lg.bg-item-main-bg+ LazyStatChartWrap(+ v-if="ui.showMainChart"+ :key="chartKeyDirtyFix"+ )+ .sm_flex.justify-between.px-2.pb-2StatChartPeriods+ StatChartOptions- .my-4.mx-2.p-3.rounded-lg.bg-skin-item-main-active(- v-if="statPage.filter.isShow"- )- LazyStatFilter(v-if="statPage.filter.isShow")-- template(v-if="!isMobileView")- .px-2.flex.flex-wrap.items-center.justify-between.gap-x-6- StatSumTotal- StatViewConfig-- StatMenu-- div(- class="min-h-[calc(100vh-130px)]"- data-scroll-ref="stat"- )- template(v-if="statPage.activeTab !== 'trns' && statPage.activeTab !== 'history'")- template(v-if="isMobileView")- .my-6.px-2(v-if="statPage.activeTab === 'details'")- StatViewConfig- StatSumTotal(v-if="(statPage.average.income !== 0 && statPage.average.expense !== 0) || (statPage.current.income.total !== 0 && statPage.current.expense.total !== 0)")-- //- Loop throw income / expense- .mb-8.md_mb-4.px-2- .grid.grid-cols-1.gap-y-5.md_grid-cols-2.md_gap-x-20- div(- v-for="item in moneyTypes"- v-show="isShowGroup(item.id)"- :key="item.id"- class="max-w-[420px]"- )- StatSumGroup(:typeText="item.id")-- template(v-if="statPage.activeTab !== 'balance'")- StatGroupPie(:typeText="item.id")- StatGroupVertical(:typeText="item.id")- StatGroupRound(:typeText="item.id")- StatGroupHorizontal(:typeText="item.id")-- template(v-if="statPage.activeTab === 'balance'")- StatGroupBudget(:typeText="item.id")-- template(v-if="!isMobileView")- div(- v-if="statPage.activeTab === 'details' && statPage.current[item.id].total !== 0 && combinedTrnsIds[item.id].length > 0"- )- .my-6(class="max-w-[420px]")- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base- | {{ $t('trns.inPeriodTitle') }}-- TrnsList(- :size="12"- :trnsIds="combinedTrnsIds[item.id]"- isShowFilter- uiHistory- )-- //- All- template(v-if="!isMobileView")- div(- v-if="isShowGroupTrns && !isEmptyStat && statPage.activeTab !== 'details' && combinedTrnsIds[statPage.activeTab].length > 0"- )- .my-6(class="max-w-[420px]")- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base- | {{ $t('trns.inPeriodTitle') }}-- TrnsList(- :size="12"- :trnsIds="combinedTrnsIds[statPage.activeTab]"- classNames="md_grid-cols-1"- isShowFilter- uiHistory- )-- //- Trns- template(v-if="statPage.activeTab === 'trns'")- .my-4.px-2- TrnsListWithControl(- :trnsIds="statPage.current.trnsIds"- isFilterByDay- defaultFilterTrnsPeriod="period"+ template(v-if="isMobileView")+ .-mt-1+ StatChartOptions+ .px-2.border-t.border-b.dark_border-neutral-800+ LazyStatChartWrap(+ v-if="ui.showMainChart"+ :key="chartKeyDirtyFix"+ )++ .pt-1+ StatChartPeriods++ .py-3.px-3(+ v-if="statPage.filter.isShow"+ )+ LazyStatFilter(v-if="statPage.filter.isShow")++ template(v-if="!isMobileView")+ .px-2.flex.flex-wrap.items-center.justify-between.gap-x-6+ StatSumTotal+ StatViewConfig++ StatMenu++ div(+ class="min-h-[calc(100vh-130px)]"+ data-scroll-ref="stat"+ )+ template(v-if="statPage.activeTab !== 'trns' && statPage.activeTab !== 'history'")+ template(v-if="isMobileView")+ .my-6.px-2(v-if="statPage.activeTab === 'details'")+ StatViewConfig+ StatSumTotal(v-if="(statPage.average.income !== 0 && statPage.average.expense !== 0) || (statPage.current.income.total !== 0 && statPage.current.expense.total !== 0)")++ //- Loop throw income / expense+ .mb-8.md_mb-4.px-2+ .grid.grid-cols-1.gap-y-5.md_grid-cols-2.md_gap-x-20+ div(+ v-for="item in moneyTypes"+ v-show="isShowGroup(item.id)"+ :key="item.id"+ class="max-w-[420px]"+ )+ StatSumGroup(:typeText="item.id")++ template(v-if="statPage.activeTab !== 'balance'")+ StatGroupPie(:typeText="item.id")+ StatGroupVertical(:typeText="item.id")+ StatGroupRound(:typeText="item.id")+ StatGroupHorizontal(:typeText="item.id")++ template(v-if="statPage.activeTab === 'balance'")+ StatGroupBudget(:typeText="item.id")++ template(v-if="!isMobileView")+ div(+ v-if="statPage.activeTab === 'details' && statPage.current[item.id].total !== 0 && combinedTrnsIds[item.id].length > 0"+ )+ .my-6(class="max-w-[420px]")+ .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-item-base+ | {{ $t('trns.inPeriodTitle') }}++ TrnsList(+ :size="12"+ :trnsIds="combinedTrnsIds[item.id]"+ isShowFilter+ uiHistory+ )++ //- All+ template(v-if="!isMobileView")+ div(+ v-if="isShowGroupTrns && !isEmptyStat && statPage.activeTab !== 'details' && combinedTrnsIds[statPage.activeTab].length > 0")+ .my-6(class="max-w-[420px]")+ .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-item-base+ | {{ $t('trns.inPeriodTitle') }}++ TrnsList(+ :size="12"+ :trnsIds="combinedTrnsIds[statPage.activeTab]"+ classNames="md_grid-cols-1"+ isShowFilter+ uiHistory+ )++ //- Trns+ template(v-if="statPage.activeTab === 'trns'")+ .my-4.px-2+ TrnsListWithControl(+ :trnsIds="statPage.current.trnsIds"+ isFilterByDay+ defaultFilterTrnsPeriod="period"+ )</template>diff --git a/components/stat/ViewConfig.vue b/components/stat/ViewConfig.vueindex 726e9f3d..0d861cad 100644--- a/components/stat/ViewConfig.vue+++ b/components/stat/ViewConfig.vue@@ -8,24 +8,24 @@ function toggleView(name) {</script><template lang="pug">-.flex.bg-skin-item-main-bg.rounded-md- .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': ui.showPieChart }"+.flex.bg-item-main-bg.rounded-md+ .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': ui.showPieChart }"@click="toggleView('showPieChart')"): .mdi.mdi-chart-pie- .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': ui.showCatsVerticalChart }"+ .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': ui.showCatsVerticalChart }"@click="toggleView('showCatsVerticalChart')"): .mdi.mdi-poll- .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': ui.showRoundCats }"+ .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': ui.showRoundCats }"@click="toggleView('showRoundCats')"): .mdi.mdi-chart-bubble- .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': ui.showCatsHorizontalList }"+ .cursor-pointer.w-10.py-2.px-2.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': ui.showCatsHorizontalList }"@click="toggleView('showCatsHorizontalList')"): .mdi.mdi-chart-timeline</template>diff --git a/components/stat/WelcomeActions.vue b/components/stat/WelcomeActions.vueindex 6bed83db..fb666033 100644--- a/components/stat/WelcomeActions.vue+++ b/components/stat/WelcomeActions.vue@@ -1,23 +1,19 @@<script setup lang="ts">-import { useTrnForm, useTrnFormStore } from '~/components/trnForm/useTrnForm'+import { useTrnForm } from '~/components/trnForm/useTrnForm'-const { $store } = useNuxtApp()-const router = useRouter()-const $trnForm = useTrnFormStore()const { trnFormCreate } = useTrnForm()--if (!$store.getters['wallets/hasWallets'] || !$store.getters['categories/hasCategories'])- router.replace('/welcome')</script><template lang="pug">-.h-full.p-4.flex-center.flex-col(v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']")- .pb-4.text-skin-item-base-up.text-xl {{ $t('intro') }}+.h-full.flex-center.flex-col(+ v-if="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories']"+)+ UiTitle.pb-2 {{ $t('intro') }}- SharedButton._text-center._blue2(- :title="$t('create')"- @onClick="trnFormCreate"- )+ UiButtonBlue(+ @click="trnFormCreate"+ maxWidth+ ) {{ $t('create')}}</template><i18n lang="yaml">diff --git a/components/stat/cats/PeriodCatsChartItem.vue b/components/stat/cats/PeriodCatsChartItem.vueindex 3bfa8f2a..70c033c4 100644--- a/components/stat/cats/PeriodCatsChartItem.vue+++ b/components/stat/cats/PeriodCatsChartItem.vue@@ -39,10 +39,10 @@ export default defineComponent({</script><template lang="pug">-.statCatsItem.swiper-no-swiping.active.hocus_bg-skin-item-main-hover(+.statCatsItem.swiper-no-swiping.active.hocus_bg-item-main-hover(@click="setFilterCatsId(categoryId)")- .statCatsItem__graph.bg-skin-item-main-active+ .statCatsItem__graph.bg-item-main-active.statCatsItem__graph__in(:style="styles").statCatsItem__graph__amount {{ amount }}diff --git a/components/stat/chart/Options.vue b/components/stat/chart/Options.vueindex 1ba594b8..8baf4da1 100644--- a/components/stat/chart/Options.vue+++ b/components/stat/chart/Options.vue@@ -12,29 +12,29 @@ const { isShowDataLabels, toggleChartsView } = useChart()<template lang="pug">.flex-center- .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': chartState.show.income }"+ .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': chartState.show.income }"@click="toggleChart('income')"): .mdi.mdi-arrow-down-thin-circle-outline- .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': chartState.show.expense }"+ .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': chartState.show.expense }"@click="toggleChart('expense')"): .mdi.mdi-arrow-up-thin-circle-outline- .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': chartState.show.sum }"+ .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': chartState.show.sum }"@click="toggleChart('sum')"): .mdi.mdi-chart-gantt- .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-skin-item-main-hover(+ .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-item-main-hover(@click="toggleChartsView").mdi.mdi-chart-line(v-if="periods[filterPeriodNameAllReplacedToYear].grouped").mdi.mdi-chart-bar(v-if="!periods[filterPeriodNameAllReplacedToYear].grouped")- .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-skin-item-main-hover(- :class="{ 'text-skin-item-base-up': isShowDataLabels }"+ .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-item-main-hover(+ :class="{ 'text-item-base-up': isShowDataLabels }"@click="isShowDataLabels = !isShowDataLabels").mdi.mdi-subtitles-outlinediff --git a/components/stat/chart/Periods.vue b/components/stat/chart/Periods.vueindex fa77af22..8be869aa 100644--- a/components/stat/chart/Periods.vue+++ b/components/stat/chart/Periods.vue@@ -52,20 +52,20 @@ const isShowAdd = computed(() => showedPeriods.value >= maxPeriodsNumber.value)<template lang="pug">.flex-center.overflow-hidden.flex.items-center.text-xs- .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-skin-item-main-hover(+ .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-item-main-hover(:class="{ 'opacity-0 cursor-default pointer-events-none': isShowRemove }"@click="removePeriod"): .mdi.mdi-minus- .cursor-pointer.py-2.px-3.rounded-md.hocus_bg-skin-item-main-hover(+ .cursor-pointer.py-2.px-3.rounded-md.hocus_bg-item-main-hover(v-for="periodItem in periodsNames":key="periodItem.slug"- :class="{ 'cursor-default text-skin-item-base-up': periodItem.slug === filterPeriodNameAllReplacedToYear }"+ :class="{ 'cursor-default text-item-base-up': periodItem.slug === filterPeriodNameAllReplacedToYear }"@click="$store.dispatch('filter/setPeriod', periodItem.slug)")| {{ periodItem.name }}- .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-skin-item-main-hover(+ .cursor-pointer.w-10.py-2.px-3.flex-center.rounded-md.hocus_bg-item-main-hover(:class="{ 'opacity-0 cursor-default pointer-events-none': isShowAdd }"@click="addPeriod"): .mdi.mdi-plusdiff --git a/components/stat/chart/View.vue b/components/stat/chart/View.vueindex 3bf3adce..2747d85e 100644--- a/components/stat/chart/View.vue+++ b/components/stat/chart/View.vue@@ -50,7 +50,7 @@ export default defineComponent({if ($store.state.filter.period === 'all')$store.dispatch('filter/setPeriod', 'year')- $store.dispatch('filter/setDate', parseInt(date))+ $store.dispatch('filter/setDate', Number.parseInt(date))scrollTop()}}, 100)@@ -329,16 +329,10 @@ export default defineComponent({</script><template lang="pug">-.chart(@click="onClickChart")+.relative(@click="onClickChart")Chart(:key="$route.fullPath":options="chartData":callback="chartCallback")</template>--<style lang="stylus" scoped>-.chart- z-index 3- position relative-</style>diff --git a/components/stat/chart/chartConfig.js b/components/stat/chart/chartConfig.jsindex 46feb4f7..2dc7d8d5 100644--- a/components/stat/chart/chartConfig.js+++ b/components/stat/chart/chartConfig.js@@ -3,7 +3,7 @@ export default {backgroundColor: 'transparent',with: '100%',height: '40%',- spacing: [10, 10, 0, 10],+ spacing: [10, 15, 0, 15],type: 'column',panning: true,panKey: 'shift',diff --git a/components/stat/group/RoundItem.vue b/components/stat/group/RoundItem.vueindex b21858da..626b8270 100644--- a/components/stat/group/RoundItem.vue+++ b/components/stat/group/RoundItem.vue@@ -31,7 +31,7 @@ export default {</script><template lang="pug">-.statItemRound.hocus_bg-skin-item-main-hover(+.statItemRound.hocus_bg-item-main-hover(v-if="category":class="{ _prevStat: total === 0 }"ref="item"@@ -47,7 +47,7 @@ export default {.statItemRound__name.js-getWidth(:class="{ _isCategoryHasChildren: isCategoryHasChildren }")| {{ category.name }}{{ isCategoryHasChildren ? '...' : '' }}- .statItemRound__amount.js-getWidth.text-skin-item-base+ .statItemRound__amount.js-getWidth.text-item-baseAmount(:amount="total":currencyCode="currencyCode"diff --git a/components/stat/group/Trns.vue b/components/stat/group/Trns.vueindex b9acbc27..2de6605d 100644--- a/components/stat/group/Trns.vue+++ b/components/stat/group/Trns.vue@@ -22,7 +22,7 @@ const trnsIds = computed(() => {<template lang="pug">.my-6(class="max-w-[420px]")- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base+ .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-item-base| {{ $t('trns.inPeriodTitle') }}TrnsList(diff --git a/components/stat/group/Vertical.vue b/components/stat/group/Vertical.vueindex 7754da9d..e6f64c0d 100644--- a/components/stat/group/Vertical.vue+++ b/components/stat/group/Vertical.vue@@ -3,7 +3,7 @@ import useStatPage from '~/components/stat/useStatPage'import useUIView from '~/components/layout/useUIView'const props = defineProps<{- typeText: String+ typeText: string}>()const { typeText } = toRefs(props)@@ -14,7 +14,7 @@ const isShow = computed(() => ui.showCatsVerticalChart && statPage.current[typeT</script><template lang="pug">-.my-6.py-1.flex.flex-col.gap-2.border-t.border-b.dark_border-neutral-800(+.my-6.py-1.flex.flex-col.gap-2(v-if="isShow")LazyStatCatsPeriodCatsChart(diff --git a/components/stat/group/horizontal/Item.vue b/components/stat/group/horizontal/Item.vueindex 4c86287c..9be6af87 100644--- a/components/stat/group/horizontal/Item.vue+++ b/components/stat/group/horizontal/Item.vue@@ -47,7 +47,7 @@ const trnsIds = computed(() => {:class="{ _active: isShowInside }"@click="toggleShowInside")- .ins.py-2.px-3.space-x-3.rounded-md.justify-between.items-center.flex.border.dark_border-neutral-800.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .ins.py-2.px-2.space-x-3.rounded-md.justify-between.items-center.flex.bg-item-main-bg.hocus_bg-item-main-hover(:class="['z-[9]', { _active: isShowInside }, { 'cursor-n-resize shadow-xl rounded-b-none': isShowInside }, { 'cursor-s-resize shadow-sm': !isShowInside }]")//- Icon@@ -61,7 +61,7 @@ const trnsIds = computed(() => {.overflow-hidden.truncate.grow.space-x-2.flex.items-baseline.text-neutral-700.dark_text-neutral-400.text-sm| {{ category.name }}{{ isCategoryHasChildren ? '...' : '' }}- .statItem__amount.text-skin-item-base+ .statItem__amount.text-item-baseAmount(:amount="total":currencyCode="$store.state.currencies.base"@@ -71,7 +71,7 @@ const trnsIds = computed(() => {.pt-1.statItem__graph.mt-1: .statItem__graph__in(:style="styles")//- Inside- .overflow-hidden.bg-skin-item-main-bg.border.border-t-0.rounded-b-md(+ .overflow-hidden.bg-item-main-bg.rounded-b-md(v-if="isShowInside"class="mt-[-1px] dark_border-neutral-800"@click.stop=""@@ -83,7 +83,9 @@ const trnsIds = computed(() => {)template(v-if="!isCategoryHasChildren")- .statItem__trns+ .statItem__trns.overflow-hidden(+ class="max-h-[60vh]"+ )TrnsList(:trnsIds="trnsIds":isShowGroupDate="false"diff --git a/components/stat/group/horizontal/ItemCatItem.vue b/components/stat/group/horizontal/ItemCatItem.vueindex b7745d48..2a3ec2cf 100644--- a/components/stat/group/horizontal/ItemCatItem.vue+++ b/components/stat/group/horizontal/ItemCatItem.vue@@ -53,7 +53,7 @@ const trnsIds = computed(() => {.space-x-3.flex.grow.statItem__name {{ category.name }}- .statItem__amount.text-skin-item-base+ .statItem__amount.text-item-baseAmount(:amount="total":currencyCode="$store.state.currencies.base"@@ -65,11 +65,14 @@ const trnsIds = computed(() => {v-if="isShowInside"@click.stop="")- TrnsList(- :isShowGroupDate="false"- :trnsIds="trnsIds"- uiCat+ .overflow-hidden.overflow-y-auto(+ class="md_max-h-[30vh]")+ TrnsList(+ :isShowGroupDate="false"+ :trnsIds="trnsIds"+ uiCat+ )</template><style lang="stylus" scoped>diff --git a/components/stat/sum/Average.vue b/components/stat/sum/Average.vueindex 3243d62a..3a50e29f 100644--- a/components/stat/sum/Average.vue+++ b/components/stat/sum/Average.vue@@ -21,7 +21,7 @@ export default {<template lang="pug">.summaryItem(:class="className").summaryItem__title(class="pb-[2px]") {{ title }}- .summaryItem__amount.text-skin-item-base+ .summaryItem__amount.text-item-baseAmount(:amount="amount":currencyCode="$store.state.currencies.base"diff --git a/components/stat/sum/Group.vue b/components/stat/sum/Group.vueindex f1997103..dea27517 100644--- a/components/stat/sum/Group.vue+++ b/components/stat/sum/Group.vue@@ -13,7 +13,7 @@ const typeNumber = computed(() => moneyTypes.find(t => t.id === `${props.typeTex<template lang="pug">.my-4.px-1.bg-white.dark_bg-dark3- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base {{ $t(`money.${typeText}`) }}+ UiTitle {{ $t(`money.${typeText}`) }}.overflow-hidden.overflow-x-auto.scrollbar.flex.items-center//- Totaldiff --git a/components/stat/sum/Total.vue b/components/stat/sum/Total.vueindex 3c65ff71..85e2ce9a 100644--- a/components/stat/sum/Total.vue+++ b/components/stat/sum/Total.vue@@ -6,7 +6,7 @@ const statAverage = computed(() => $store.getters['stat/statAverage'])<template lang="pug">.my-4.px-1.bg-white.dark_bg-dark3- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base {{ $t('money.total') }}+ UiTitle {{ $t('money.total') }}.overflow-hidden.overflow-x-auto.scrollbar.flex.items-center//- Totaldiff --git a/components/trnForm/Categories.vue b/components/trnForm/Categories.vueindex c2e033a1..e3c2e86c 100644--- a/components/trnForm/Categories.vue+++ b/components/trnForm/Categories.vue@@ -5,29 +5,21 @@ import type { CategoryId } from '../categories/types'import { useTrnFormStore } from '~/components/trnForm/useTrnForm'const emit = defineEmits<{- (e: 'closeModal'): void+ (e: 'click', id: CategoryId): void}>()-const { $store } = useNuxtApp()const $trnForm = useTrnFormStore()-const slider = ref()-const trnFormCategories = ref()+const sliderObj = ref()+const sliderRef = ref()function onClick(categoryId: CategoryId) {- if ($store.getters['categories/isCategoryHasChildren'](categoryId)) {- $store.commit('trnForm/setTrnFormModalCategoryId', categoryId)- $store.commit('trnForm/showTrnFormModal', 'categoriesChild')- }- else {- $trnForm.values.categoryId = categoryId- emit('closeModal')- }+ emit('click', categoryId)}onMounted(() => {const initialSlide = 1- slider.value = new SwiperCore(trnFormCategories.value, {+ sliderObj.value = new SwiperCore(sliderRef.value, {observer: true,observeParents: true,slidesPerView: 1,@@ -44,12 +36,12 @@ onMounted(() => {<template lang="pug">.contentWrap.h-full.grid(class="grid-rows-[1fr,auto]").contentWrap__box- .swiper-container(ref="trnFormCategories")+ .swiper-container(ref="sliderRef").swiper-wrapper//- Recent.swiper-slide.scrollBlock.scrollerBlock- .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl+ .py-4.px-3.text-center.text-item-base.text-xl.font-nunito.font-semibold.bg-layout-main.rounded-t-2xl| {{ $t('categories.lastUsedTitle') }} {{ $t('categories.title') }}.pb-1.px-3CategoriesList(@@ -62,7 +54,7 @@ onMounted(() => {//- Main.swiper-slide.scrollBlock.scrollerBlock- .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl+ .py-4.px-3.text-center.text-item-base.text-xl.font-nunito.font-semibold.bg-layout-main.rounded-t-2xl| {{ $t('categories.title') }}.pb-1.px-3CategoriesList(@@ -75,7 +67,7 @@ onMounted(() => {//- Favorite.swiper-slide.scrollBlock.scrollerBlock- .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl+ .py-4.px-3.text-center.text-item-base.text-xl.font-nunito.font-semibold.bg-layout-main.rounded-t-2xl| {{ $t('categories.favoriteTitle') }} {{ $t('categories.title') }}.pb-1.px-3CategoriesList(@@ -85,21 +77,21 @@ onMounted(() => {@click="onClick")- .py-2.px-3(v-if="slider")+ .py-2.px-3(v-if="sliderObj")UiTabsUiTabsItem(- :isActive="slider.activeIndex === 0"- @click="slider.slideTo(0)"+ :isActive="sliderObj.activeIndex === 0"+ @click="sliderObj.slideTo(0)") {{ $t('categories.lastUsedTitle') }}UiTabsItem(- :isActive="slider.activeIndex === 1"- @click="slider.slideTo(1)"+ :isActive="sliderObj.activeIndex === 1"+ @click="sliderObj.slideTo(1)") {{ $t('categories.allTitle') }}UiTabsItem(- :isActive="slider.activeIndex === 2"- @click="slider.slideTo(2)"+ :isActive="sliderObj.activeIndex === 2"+ @click="sliderObj.slideTo(2)") {{ $t('categories.favoriteTitle') }}</template>diff --git a/components/trnForm/Index.vue b/components/trnForm/Index.vueindex 26a009fb..c8dabeff 100644--- a/components/trnForm/Index.vue+++ b/components/trnForm/Index.vue@@ -3,12 +3,6 @@ import SwiperCore, { Pagination } from 'swiper'import 'swiper/swiper-bundle.css'import { useTrnFormStore } from '~/components/trnForm/useTrnForm'-const props = withDefaults(defineProps<{- show: boolean-}>(), {- show: true,-})-SwiperCore.use([Pagination])const { $store } = useNuxtApp()@@ -17,21 +11,18 @@ const $trnForm = useTrnFormStore()/*** Slider*/-const slider = ref<any>(null)+const sliderRef = ref<any>(null)const sliderObj = ref<any>(null)const maxHeight = ref('550px')function setTrnFormHeight() {const el = document.querySelector('.getHeight')const height = el?.clientHeight-- $store.commit('trnForm/setTrnFormHeight', height)maxHeight.value = `${height}px`const observer = new ResizeObserver((entries) => {for (const entry of entries) {const height = entry.contentRect.height- $store.commit('trnForm/setTrnFormHeight', height)maxHeight.value = `${height}px`}})@@ -42,11 +33,12 @@ function setTrnFormHeight() {function init() {if (!sliderObj.value) {- sliderObj.value = new SwiperCore(slider.value, {+ sliderObj.value = new SwiperCore(sliderRef.value, {init: false,observer: true,observeParents: true,- slidesPerView: 1,+ slidesPerView: 'auto',+ centeredSlides: true,touchStartPreventDefault: false,initialSlide: 1,shortSwipes: false,@@ -62,85 +54,74 @@ function init() {}}-/**- * isShow- */-onMounted(() => {- init()-})--watch(() => props.show, (isShow) => {- if (!isShow) {- if (sliderObj.value)- sliderObj.value.slideTo(1, 0)- }-})+onMounted(init)</script><template lang="pug">-.trnForm.max-w-md.mx-auto- .swiper-container(ref="slider")- .swiper-wrapper+.trnForm+ .swiper-container(ref="sliderRef")+ .swiper-wrapper.bg-foreground-second.rounded-xl//- History- .swiper-slide(:style="{ height: maxHeight }")+ .swiper-slide.sm_max-w-sm.sm_rounded-xl.bg-foreground-second(:style="{ height: maxHeight }")TrnFormTrnsSlide(v-if="sliderObj":slider="sliderObj")//- Main- .swiper-slide.getHeight+ .swiper-slide.getHeight.max-w-sm.sm_rounded-xl.bg-foreground-second.sm_max-w-sm.sm_mx-6.scroll.scrollerBlock(:style="{ maxHeight: `${$store.state.ui.height}px` }")TrnFormMain//- Quick selector- .swiper-slide(:style="{ height: maxHeight }")+ .swiper-slide.sm_rounded-xl.bg-foreground-second.sm_max-w-sm(:style="{ height: maxHeight }").scroll.scrollerBlock- //- Wallets- .pt-5.pb-7- .px-3.pb-2.text-skin-item-base.text-sm.font-semibold.font-nunito(- @click="$store.commit('trnForm/showTrnFormModal', 'wallets')"- ) {{ $t('wallets.title') }}-- WalletsList(- :limit="4"- #default="{ walletsItemsLimited }"- )- .px-3.grid.gap-y-1.gap-x-1.3sm_grid-cols-2- //- Wallet- TrnFormMainSelectedWallet(- v-for="(walletItem, walletId) in walletsItemsLimited"- :key="walletId"- :class="[{ 'cursor-default !bg-skin-item-main-active': $trnForm.values.walletId === walletId }]"- :id="walletId"- isHideDots- @click="id => $trnForm.values.walletId = id"- )-- //- Favorite categories- .pb-7(v-if="$store.getters['categories/favoriteCategoriesIds'].length > 0")- .px-3.pb-2.text-skin-item-base.text-sm.font-semibold.font-nunito(- @click="$store.commit('trnForm/showTrnFormModal', 'categories')"- ) {{ $t('categories.favoriteTitle') }} {{ $t('categories.title') }}-- .px-3- CategoriesList(- v-if="sliderObj"- :ids="$store.getters['categories/favoriteCategoriesIds']"- :activeItemId="$trnForm.values.categoryId"- :slider="sliderObj"- class="!gap-x-1"- @click="id => $trnForm.values.categoryId = id"+ .py-4+ //- Wallets+ .pb-6+ UiTitle.pb-2.px-3(+ @click="$store.commit('trnForm/showTrnFormModal', 'wallets')"+ ) {{ $t('wallets.title') }}++ WalletsList(+ :limit="4"+ #default="{ walletsItemsLimited }")+ .px-3.grid.gap-y-1.gap-x-1.3sm_grid-cols-2+ //- Wallet+ TrnFormMainSelectedWallet(+ v-for="(walletItem, walletId) in walletsItemsLimited"+ :key="walletId"+ :class="[{ 'cursor-default !bg-item-main-active': $trnForm.values.walletId === walletId }]"+ :id="walletId"+ isHideDots+ @click="id => $trnForm.values.walletId = id"+ )++ //- Favorite categories+ .pb-6(v-if="$store.getters['categories/favoriteCategoriesIds'].length > 0")+ UiTitle.pb-2.px-3(+ @click="$trnForm.ui.catsRootModal = true"+ ) {{ $t('categories.favoriteTitle') }} {{ $t('categories.title') }}++ .px-3+ CategoriesList(+ v-if="sliderObj"+ :ids="$store.getters['categories/favoriteCategoriesIds']"+ :activeItemId="$trnForm.values.categoryId"+ :slider="sliderObj"+ class="!gap-x-1"+ @click="id => $trnForm.values.categoryId = id"+ )- //- Recent categories- .pb-7(v-if="$store.getters['categories/recentCategoriesIds'].length > 0")- .px-3.pb-2.text-skin-item-base.text-sm.font-semibold.font-nunito(- @click="$store.commit('trnForm/showTrnFormModal', 'categories')"- ) {{ $t('categories.lastUsedTitle') }} {{ $t('categories.title') }}+ //- Recent categories+ .pb-6(v-if="$store.getters['categories/recentCategoriesIds'].length > 0")+ UiTitle.pb-2.px-3(+ @click="$trnForm.ui.catsRootModal = true"+ ) {{ $t('categories.lastUsedTitle') }} {{ $t('categories.title') }}- .px-3- CategoriesList(+ .px-3+ CategoriesList(v-if="sliderObj":ids="$store.getters['categories/recentCategoriesIds']":activeItemId="$trnForm.values.categoryId"@@ -148,7 +129,6 @@ watch(() => props.show, (isShow) => {class="!gap-x-1"@click="id => $trnForm.values.categoryId = id")-.trnForm__pagination//- Modals@@ -193,17 +173,6 @@ watch(() => props.show, (isShow) => {</style><style lang="stylus" scoped>-// TODO: style-.trnForm- overflow hidden- width 100%- height auto- background var(--c-bg-3)- border-radius $m8 $m8 0 0-- +media(600px)- border-radius 16px-.scrolloverflow hiddenoverflow-y autodiff --git a/components/trnForm/Main.vue b/components/trnForm/Main.vueindex 7acf91c9..0ace6c9d 100644--- a/components/trnForm/Main.vue+++ b/components/trnForm/Main.vue@@ -5,8 +5,8 @@ const $trnForm = useTrnFormStore()</script><template lang="pug">-div- UiTitle+.py-4+ UiTitle.pb-2.px-3(@click="$trnForm.values.trnId = null")template(v-if="$trnForm.values.trnId") {{ $t('trnForm.titleEditTrn') }}template(v-if="!$trnForm.values.trnId") {{ $t('trnForm.createTrn') }}diff --git a/components/trnForm/Modal.vue b/components/trnForm/Modal.vueindex 4cbb1588..4fddf483 100644--- a/components/trnForm/Modal.vue+++ b/components/trnForm/Modal.vue@@ -7,7 +7,7 @@ const { height } = useWindowSize()<template lang="pug">Portal(to="modal")BaseBottomSheet(- insideClass="sm_rounded-b-2xl bg-skin-layout-main"+ insideClass="sm_rounded-b-2xl bg-layout-main"show:maxHeight="height"@closed="$emit('closed')"@@ -20,21 +20,10 @@ Portal(to="modal")v-if="$slots.header"#header)- .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl- slot(name="header")+ .pt-3.pb-3.px-3.bg-layout-main.rounded-t-2xl+ UiTitle+ slot(name="header")template(#default="{ close }")slot(name="default" :close="close")</template>--<style lang="stylus" scoped>-.content- overflow hidden- display grid- padding-top $m7- background var(--c-bg-3)- border-radius $m8 $m8 0 0-- +media(600px)- border-radius 16px-</style>diff --git a/components/trnForm/Modals.vue b/components/trnForm/Modals.vueindex d837d26e..d6eccd49 100644--- a/components/trnForm/Modals.vue+++ b/components/trnForm/Modals.vue@@ -1,14 +1,26 @@<script setup lang="ts">+import { useWindowSize } from '@vueuse/core'import { useTrnFormStore } from '~/components/trnForm/useTrnForm'+import type { CategoryId } from '~/components/categories/types'+const { $store } = useNuxtApp()const $trnForm = useTrnFormStore()+const { height } = useWindowSize()++function onSelected(id: CategoryId) {+ $trnForm.values.categoryId = id+}</script><template lang="pug">div+ CategoriesSelector(+ :isShow="$trnForm.ui.catsRootModal"+ @show="value => $trnForm.ui.catsRootModal = value"+ @onSelected="onSelected"+ )+LazyTrnFormModalCalendar(v-if="$store.state.trnForm.modal.calendar")- LazyTrnFormModalCats(v-if="$store.state.trnForm.modal.categories")- LazyTrnFormModalCatsChild(v-if="$store.state.trnForm.modal.categoriesChild")LazyTrnFormModalDescription(v-if="$store.state.trnForm.modal.description")//- Transactiondiff --git a/components/trnForm/TrnsSlide.vue b/components/trnForm/TrnsSlide.vueindex 14820b53..1fe32e40 100644--- a/components/trnForm/TrnsSlide.vue+++ b/components/trnForm/TrnsSlide.vue@@ -1,10 +1,11 @@<script setup lang="ts">import { getTrnsIds } from '~/components/trns/getTrns'import { useTrnFormStore } from '~/components/trnForm/useTrnForm'+import type { WalletId } from '~/components/wallets/types'const props = defineProps<{slider: {- slideTo: Function+ slideTo: object}}>()@@ -12,9 +13,11 @@ const { $store, nuxt2Context: { i18n } } = useNuxtApp()const $trnForm = useTrnFormStore()const filterBy = ref('wallet')-const filteredTrnsIds = computed(() => {+const trnsIds = computed(() => {const trnsItems = $store.state.trns.items- const walletsIds = [$trnForm.values.walletId]+ const walletsIds: WalletId[] = []+ if ($trnForm.values.walletId)+ walletsIds.push($trnForm.values.walletId)if (filterBy.value === 'wallet')return getTrnsIds({ walletsIds, trnsItems })@@ -32,17 +35,15 @@ const filteredTrnsIds = computed(() => {function changeFilter(value) {const trnForm = document.querySelector('.trnForm')- const trnsListScroll = trnForm.querySelector('.trnsListScroll')- trnsListScroll.scrollTop = 0+ const trnsListScroll = trnForm?.querySelector('.trnsListScroll')+ if (trnsListScroll?.scrollTop)+ trnsListScroll.scrollTop = 0filterBy.value = value- setTimeout(() => {- props.slider.slideTo(0, 0)- }, 100)}function onClickEdit() {- props.slider.slideTo(1)+ props.slider?.slideTo(1)}const tabs = computed(() => [{@@ -58,20 +59,16 @@ const tabs = computed(() => [{</script><template lang="pug">-.h-full.overflow-hidden.grid.trnsListScroll(+.h-full.overflow-hidden.grid.trnsListScroll.pt-4(class="grid-rows-[1fr_auto]")- .h-full.overflow-hidden- .h-full.overflow-y-auto.pt-5.px-2.scroll.scrollerBlock(- :class="{ 'grid items-center': filteredTrnsIds.length === 0, 'grid-rows-[1fr_auto]': filteredTrnsIds.length > 0 }"- )- TrnsListWithControl(- :trnsIds="filteredTrnsIds"- trnsClassNames=""- @onClickEdit="onClickEdit"- )+ TrnsListWithControl(+ :trnsIds="trnsIds"+ trnsClassNames=""+ @onClickEdit="onClickEdit"+ )- .pt-2.pb-6.px-3(v-if="filteredTrnsIds.length > 0")+ .pt-2.pb-2.px-2(v-if="trnsIds.length > 0")UiTabsUiTabsItem(v-for="tab in tabs"@@ -80,3 +77,8 @@ const tabs = computed(() => [{@click="changeFilter(tab.id)") {{ tab.name }}</template>++<style lang="stylus">+.scroll+ scrollbar()+</style>diff --git a/components/trnForm/Wrap.vue b/components/trnForm/Wrap.vueindex 95f76c14..d8eee49c 100644--- a/components/trnForm/Wrap.vue+++ b/components/trnForm/Wrap.vue@@ -4,19 +4,18 @@ import { useTrnFormStore } from '~/components/trnForm/useTrnForm'const { $store } = useNuxtApp()const $trnForm = useTrnFormStore()-const isShowTrnForm = computed(() => $store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories'] && $store.state.trnForm.show)--function closeTrnForm() {- $store.commit('trnForm/closeTrnForm')- $trnForm.onClose()-}+const isShow = computed(() =>+ $store.getters['wallets/hasWallets']+ && $store.getters['categories/hasCategories']+ && $trnForm.ui.isShow,+)</script><template lang="pug">BaseBottomSheet2(keepAlive- :isShow="isShowTrnForm"- @closed="closeTrnForm"+ :isShow="isShow"+ @closed="$trnForm.onClose()")template(#handler="{ close }")BaseBottomSheetHandlerdiff --git a/components/trnForm/main/ActionSide.vue b/components/trnForm/main/ActionSide.vueindex cc0d6acb..e8d0b2f7 100644--- a/components/trnForm/main/ActionSide.vue+++ b/components/trnForm/main/ActionSide.vue@@ -40,7 +40,6 @@ div(bg-item-main border border-item-border rounded-xlhocus_bg-item-hover hocus_border[red] hocus_scale-[1.02]transition- transition`@click="onClickSubmit")diff --git a/components/trnForm/main/AmountTransfer.vue b/components/trnForm/main/AmountTransfer.vueindex 344f023c..d8cb9ffb 100644--- a/components/trnForm/main/AmountTransfer.vue+++ b/components/trnForm/main/AmountTransfer.vue@@ -42,7 +42,7 @@ watch(() => $trnForm.values.trnType, (trnType) => {.cursor-pointer.overflow-hidden.rounded-md(v-for="(item, slug) in items":key="slug"- :class="[{ '!bg-skin-item-main-active': $trnForm.values.transferType === item.transferType }]"+ :class="[{ '!bg-item-main-active': $trnForm.values.transferType === item.transferType }]"@click="$trnForm.onChangeTransferType(item.transferType)")//- Wallet namediff --git a/components/trnForm/main/Calculator.vue b/components/trnForm/main/Calculator.vueindex f17eb56c..4856dd44 100644--- a/components/trnForm/main/Calculator.vue+++ b/components/trnForm/main/Calculator.vue@@ -80,6 +80,7 @@ onLongPress(.w-20.grid.gap-2.justify-items-end(class="grid-rows-[auto,1fr]")//- DescriptionTrnFormMainCalculatorButton(+ :class="{ 'text-accent-default': !!$trnForm.values.desc }"@click="$store.commit('trnForm/showTrnFormModal', 'description')"): .mdi.mdi-comment-text-outlinediff --git a/components/trnForm/main/Date.vue b/components/trnForm/main/Date.vueindex 6017fd07..23486095 100644--- a/components/trnForm/main/Date.vue+++ b/components/trnForm/main/Date.vue@@ -25,18 +25,18 @@ function changeDate(way: 'prev' | 'next') {<template lang="pug">.trnFormDate.flex.pb-2.px-2.gap-2.overflow-hidden.flex.rounded-xl- .shame1.flex-center.w-12._arrow.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .shame1.flex-center.w-12._arrow.bg-item-main-bg.hocus_bg-item-main-hover(@click="changeDate('prev')"): .mdi.mdi-chevron-left- .shame1.flex-center.w-12._arrow.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .shame1.flex-center.w-12._arrow.bg-item-main-bg.hocus_bg-item-main-hover(:class="{ 'opacity-30 !cursor-default' : isToday }"@click="changeDate('next')").mdi.mdi-calendar-today(v-if="isToday").mdi.mdi-chevron-right(v-else)- .grow.cursor-pointer.py-2.px-3.flex.items-center.rounded-md.text-xs.leading-none.hocus_bg-skin-item-main-hover(+ .grow.cursor-pointer.py-2.px-3.flex.items-center.rounded-md.text-xs.leading-none.hocus_bg-item-main-hover(v-html="formattedDate"@click="$store.commit('trnForm/showTrnFormModal', 'calendar')")diff --git a/components/trnForm/main/SelectedCategory.vue b/components/trnForm/main/SelectedCategory.vueindex 530d33a7..cf72cb1d 100644--- a/components/trnForm/main/SelectedCategory.vue+++ b/components/trnForm/main/SelectedCategory.vue@@ -17,20 +17,20 @@ const parentCategory = computed<CategoryItem | false>(() =></script><template lang="pug">-.cursor-pointer.py-2.px-3.relative.gap-x-3.flex.items-center.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+.cursor-pointer.py-2.px-3.relative.gap-x-3.flex.items-center.rounded-md.bg-item-main-bg.hocus_bg-item-main-hover(v-if="category"- @click="$store.commit('trnForm/showTrnFormModal', 'categories')"+ @click="$trnForm.ui.catsRootModal = true").w-8.h-8.flex.items-center.justify-center.rounded-full.text-xl.leading-none.text-neutral-50(:style="{ background: category.color }"): div(:class="category.icon").grow.truncate- .text-xs.text-skin-item-base-down.dark_text-neutral-400(v-if="parentCategory").+ .text-xs.text-item-base-down.dark_text-neutral-400(v-if="parentCategory").{{ parentCategory.name }}.leading-none.text-sm.text-neutral-700.dark_text-neutral-300.{{ category.name }}- .mdi.mdi-dots-vertical.-mr-1.text-lg.text-skin-item-base-down+ .mdi.mdi-dots-vertical.-mr-1.text-lg.text-item-base-down</template>diff --git a/components/trnForm/main/SelectedWallet.vue b/components/trnForm/main/SelectedWallet.vueindex 9491ae95..d5ff44df 100644--- a/components/trnForm/main/SelectedWallet.vue+++ b/components/trnForm/main/SelectedWallet.vue@@ -2,39 +2,35 @@import useWallets from '~/components/wallets/useWallets'import type { WalletId } from '~/components/wallets/types'-import { useTrnFormStore } from '~/components/trnForm/useTrnForm'-const props = defineProps<{id: WalletIdisHideDots: boolean}>()const emit = defineEmits(['click'])--const $trnForm = useTrnFormStore()const { walletsItemsSorted } = useWallets()const wallet = computed(() => walletsItemsSorted.value[props.id])</script><template lang="pug">-.cursor-pointer.flex.items-center.py-2.px-3.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+.cursor-pointer.flex.items-center.py-2.px-3.rounded-md.bg-item-main-bg.hocus_bg-item-main-hover(v-if="wallet"@click="emit('click', id)").grow.flex-center.gap-x-3//- Icon- .w-6.h-6.rounded-md.flex-center.text-skin-icon-base.text-xs.leading-none(+ .w-6.h-6.rounded-md.flex-center.text-icon-base.text-xs.leading-none(:style="{ background: wallet.color }"class="mt-[2px]") {{ wallet.name.substring(0, 2) }}.grow//- Name- .text-sm.text-skin-item-base {{ wallet.name }}+ .text-sm.text-item-base {{ wallet.name }}//- Amount- .text-skin-item-base+ .text-item-baseAmount(:amount="wallet.amount":currencyCode="wallet.currency"@@ -42,5 +38,5 @@ const wallet = computed(() => walletsItemsSorted.value[props.id])align="left")- .mdi.mdi-dots-vertical.-mr-1.text-lg.text-skin-item-base-down(v-if="!isHideDots")+ .mdi.mdi-dots-vertical.-mr-1.text-lg.text-item-base-down(v-if="!isHideDots")</template>diff --git a/components/trnForm/main/Types.vue b/components/trnForm/main/Types.vueindex 92b34b45..669a031a 100644--- a/components/trnForm/main/Types.vue+++ b/components/trnForm/main/Types.vue@@ -14,7 +14,7 @@ function isItActive(amountType: TrnType) {</script><template lang="pug">-.px-2.pb-5+.px-2.pb-2UiTabsUiTabsItem(:isActive="isItActive(0)"diff --git a/components/trnForm/modal/Cats.vue b/components/trnForm/modal/Cats.vuedeleted file mode 100644index b2b7b5d3..00000000--- a/components/trnForm/modal/Cats.vue+++ /dev/null@@ -1,25 +0,0 @@-<script setup lang="ts">-import { useWindowSize } from '@vueuse/core'--const { $store } = useNuxtApp()-const { height } = useWindowSize()--function closed() {- $store.commit('trnForm/closeTrnFormModal', 'categories')-}-</script>--<template lang="pug">-BaseBottomSheet(- :height="height"- insideClass="rounded-t-2xl bg-skin-layout-main"- @closed="closed"-)- template(#handler="{ close }")- BaseBottomSheetHandler- BaseBottomSheetClose(@onClick="close")-- template(#default="{ close }")- .h-full.overflow-hidden- TrnFormCategories(@closeModal="close")-</template>diff --git a/components/trnForm/modal/CatsChild.vue b/components/trnForm/modal/CatsChild.vuedeleted file mode 100644index c171d35c..00000000--- a/components/trnForm/modal/CatsChild.vue+++ /dev/null@@ -1,42 +0,0 @@-<script setup lang="ts">-import { useTrnFormStore } from '~/components/trnForm/useTrnForm'-import type { CategoryId } from '~~/components/trns/types'--const { $store } = useNuxtApp()-const $trnForm = useTrnFormStore()--const childSelected = ref(false)--const id = computed(() => $store.state.trnForm.showModalCategoryId)-const category = computed(() => $store.state.categories.items[id.value])-const childCategoriesIds = computed(() => $store.getters['categories/getChildCategoriesIds'](id.value))--function handleCategoryClick(categoryId: CategoryId, close: any) {- childSelected.value = true- $trnForm.values.categoryId = categoryId- close()-}--function afterClose() {- if (childSelected.value)- $store.commit('trnForm/closeTrnFormModal', 'categories')-- $store.commit('trnForm/closeTrnFormModal', 'categoriesChild')- $store.commit('trnForm/setTrnFormModalCategoryId', null)-}-</script>--<template lang="pug">-TrnFormModal(@closed="afterClose")- template(#header)- template {{ $t('categories.title') }}-- template(#default="{ close }")- template(v-if="id && category")- .pb-3.px-3- CategoriesList(- :ids="childCategoriesIds"- class="!gap-x-1"- @click="catId => handleCategoryClick(catId, close)"- )-</template>diff --git a/components/trnForm/modal/Description.vue b/components/trnForm/modal/Description.vueindex fb9a9b38..e7fbf905 100644--- a/components/trnForm/modal/Description.vue+++ b/components/trnForm/modal/Description.vue@@ -11,12 +11,12 @@ function handleCancel(close) {close()}-function handleSave(close) {+function onSave(close) {$trnForm.values.desc = description.valueclose()}-function afterClose() {+function closed() {$store.commit('trnForm/closeTrnFormModal', 'description')}@@ -26,19 +26,19 @@ onMounted(() => {</script><template lang="pug">-TrnFormModal(@closed="afterClose")+TrnFormModal(@closed="closed")template(#header)template {{ $t('trnForm.description.title') }}template(#default="{ close }").pb-6.px-3- textarea.w-full.h-28.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-skin-item-base.bg-skin-item-main-bg.border.border-solid.border-skin-item-main-hover.placeholder_text-skin-item-base-down.transition.ease-in-out.focus_text-skin-item-base-up.focus_bg-skin-item-main-hover.focus_border-blue3.focus_outline-none(+ textarea.w-full.h-28.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-item-base.bg-item-main-bg.border.border-solid.border-item-main-hover.placeholder_text-item-base-down.transition.ease-in-out.focus_text-item-base-up.focus_bg-item-main-hover.focus_border-blue3.focus_outline-none(v-model="description":placeholder="$t('trnForm.description.placeholder')").pb-4.px-3- .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-skin-item-base-up.text-sm.bg-skin-accent-base.hocus_bg-skin-accent-down(- @click="handleSave(close)"+ UiButtonBlue(+ @click="onSave(close)") {{ $t('base.save') }}</template>diff --git a/components/trnForm/modal/Wallets.vue b/components/trnForm/modal/Wallets.vueindex 45dac271..5ab50c91 100644--- a/components/trnForm/modal/Wallets.vue+++ b/components/trnForm/modal/Wallets.vue@@ -16,7 +16,7 @@ function onClickWallet(walletId, close) {<template lang="pug">BaseBottomSheet(:maxHeight="height"- insideClass="sm_rounded-b-2xl bg-skin-layout-main"+ insideClass="sm_rounded-b-2xl bg-layout-main"@closed="emit('closed')")template(#handler="{ close }")@@ -24,14 +24,14 @@ BaseBottomSheet(BaseBottomSheetClose(@onClick="close")template(#header)- .py-4.px-2.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl+ .py-4.px-2.text-center.text-item-base.text-xl.font-nunito.font-semibold.bg-layout-main.rounded-t-2xl| {{ title }}template(#default="{ close }")WalletsList(#default="{ walletsItemsSorted }").pb-3.px-2.grid.gap-1//- Wallet- .cursor-pointer.flex.items-center.py-2.px-3.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.flex.items-center.py-2.px-3.rounded-md.bg-item-main-bg.hocus_bg-item-main-hover(v-for="(walletItem, walletId) in walletsItemsSorted":key="walletId"@click="onClickWallet(walletId, close)"@@ -39,15 +39,15 @@ BaseBottomSheet(.grow.gap-x-3.flex.items-center.grow.flex-center.gap-x-3//- Icon- .w-6.h-6.rounded-md.flex-center.text-skin-icon-base.text-xs.leading-none(+ .w-6.h-6.rounded-md.flex-center.text-icon-base.text-xs.leading-none(:style="{ background: walletItem.color }"class="mt-[2px]") {{ walletItem.name.substring(0, 2) }}//- Name- .grow.text-sm.text-skin-item-base {{ walletItem.name }}+ .grow.text-sm.text-item-base {{ walletItem.name }}//- Amount- .text-skin-item-base+ .text-item-baseAmount(:amount="walletItem.amount":currencyCode="walletItem.currency"diff --git a/components/trnForm/types.ts b/components/trnForm/types.tsindex 42d300cb..015b1c79 100644--- a/components/trnForm/types.ts+++ b/components/trnForm/types.ts@@ -54,8 +54,6 @@ export interface TrnFormUi {walletsTab: string // TODO: add typingwalletsModal: booleancatsRootModal: boolean- catsParentId: CategoryId | null- catsChildModal: booleanwalletsViewAs: 'big' | 'small' // TODO: add typingtab: 'main' | 'date' | 'desc'diff --git a/components/trnForm/useTrnForm.ts b/components/trnForm/useTrnForm.tsindex aeae77af..4e4fb9bb 100644--- a/components/trnForm/useTrnForm.ts+++ b/components/trnForm/useTrnForm.ts@@ -34,8 +34,6 @@ export const useTrnFormStore = defineStore('trnForm', () => {walletTransferModal: false,walletTransferType: 'expense',catsRootModal: false,- catsChildModal: false,- catsParentId: null,walletsViewAs: 'big',tab: 'main',})@@ -115,6 +113,8 @@ export const useTrnFormStore = defineStore('trnForm', () => {function onClose() {if (values.trnId)onClear()++ ui.value.isShow = false}/**@@ -160,7 +160,7 @@ export const useTrnFormStore = defineStore('trnForm', () => {values.amountRaw = values.amount.map(i => formatInput(i)) as TrnFormValues['amountRaw']values.trnType = props.trn.type- values.desc = props.trn.desc+ values.desc = props.trn.desc || props.trn.descriptionvalues.date = props.trn.date}}@@ -258,8 +258,7 @@ export function useTrnForm() {trnId,walletsIds: walletIds.value,})-- $store.commit('trnForm/openTrnForm')+ $trnForm.ui.isShow = true}function trnFormCreate() {@@ -269,8 +268,7 @@ export function useTrnForm() {trn: $store.getters['trns/lastCreatedTrnItem'],walletsIds: walletIds.value,})-- $store.commit('trnForm/openTrnForm')+ $trnForm.ui.isShow = true}function trnFormDuplicate(trnId: TrnId) {@@ -284,8 +282,7 @@ export function useTrnForm() {trnId,walletsIds: walletIds.value,})-- $store.commit('trnForm/openTrnForm')+ $trnForm.ui.isShow = true}return {diff --git a/components/trns/List.vue b/components/trns/List.vueindex 7158fac5..5e1f81a3 100644--- a/components/trns/List.vue+++ b/components/trns/List.vue@@ -114,7 +114,7 @@ div(v-if="trnsIds && trnsIds.length > 0").grid(:class="{ 'gap-2': uiHistory }")- .overflow-hidden.rounded-md.bg-white2.dark_bg-dark4(+ .overflow-hidden.bg-item-main-bg.rounded-md(v-for="(trnsIds, date) in groupedTrns":key="date")@@ -141,7 +141,7 @@ div(v-if="trnsIds && trnsIds.length > 0")).py-4.pb-6.px-2.flex-center(v-if="!isShowedAllTrns")- .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-item-main-bg.hocus_bg-item-main-hover(class="basis-1/2 max-w-[280px]"@click="showMoreTrns") {{ $t('trns.more') }}diff --git a/components/trns/ListWithControl.vue b/components/trns/ListWithControl.vueindex 55214cce..97d7d0b4 100644--- a/components/trns/ListWithControl.vue+++ b/components/trns/ListWithControl.vue@@ -14,7 +14,7 @@ const props = withDefaults(defineProps<{const emit = defineEmits(['onClickEdit'])const { $store } = useNuxtApp()-const filterTrnsType = ref<TrnType>(null)+const filterTrnsType = ref<TrnType | null>(null)const filterTrnsPeriod = ref(props.defaultFilterTrnsPeriod)const { allTrnsIdsWithFilter } = useTrns()const { statPage } = useStatPage()@@ -46,65 +46,71 @@ function onClickEdit(props) {</script><template lang="pug">-div+.grid.h-full.overflow-hidden.px-2(+ class="grid-rows-[auto,1fr]"+)//- Header- .pb-2.flex.items-center.justify-between.gap-2(- v-if="trnsIds.length > 0 || defaultFilterTrnsPeriod"- class="!pb-3"- )- //- Title- .flex.gap-2.leading-none.font-nunito.font-semibold.text-lg.text-skin-item-base- div {{ $t('trns.inPeriodTitle') }}:- div {{ trnsCount }}-- .div(v-if="defaultFilterTrnsPeriod")+ div+ .pb-2.flex.items-center.justify-between.gap-2(+ v-if="trnsIds.length > 0 || defaultFilterTrnsPeriod"+ class="!pb-3"+ )+ //- Title+ UiTitle.px-1+ .flex.gap-2+ div {{ $t('trns.inPeriodTitle') }}:+ div {{ trnsCount }}++ .div(v-if="defaultFilterTrnsPeriod")+ UiTabs+ UiTabsItem(+ :isActive="filterTrnsPeriod === 'period'"+ @click="filterTrnsPeriod = 'period'"+ ) {{ $t('dates.period') }}+ UiTabsItem(+ :isActive="filterTrnsPeriod === 'all'"+ @click="filterTrnsPeriod = 'all'"+ ) {{ $t('common.all') }}++ //- TypeSelector+ .pb-2(v-if="trnsIds.length > 0")UiTabsUiTabsItem(- :isActive="filterTrnsPeriod === 'period'"- @click="filterTrnsPeriod = 'period'"- ) {{ $t('dates.period') }}- UiTabsItem(- :isActive="filterTrnsPeriod === 'all'"- @click="filterTrnsPeriod = 'all'"+ :isActive="filterTrnsType === null"+ @click="setFilterTrnsType(null)") {{ $t('common.all') }}- //- TypeSelector- .pb-2(v-if="trnsIds.length > 0")- UiTabs- UiTabsItem(- :isActive="filterTrnsType === null"- @click="setFilterTrnsType(null)"- ) {{ $t('common.all') }}-- UiTabsItem(- :isActive="filterTrnsType === 0"- @click="setFilterTrnsType(0)"- ) {{ $t('money.expense') }}-- UiTabsItem(- :isActive="filterTrnsType === 1"- @click="setFilterTrnsType(1)"- ) {{ $t('money.income') }}-- UiTabsItem(- :isActive="filterTrnsType === 2"- @click="setFilterTrnsType(2)"- ) {{ $t('transfer.titleMoney') }}-- //- Nothing- .py-6.text-center(v-if="trnsCount === 0")- .text-7xl.mdi.mdi-palm-tree- .text-md {{ $t('trns.noTrns') }}-- //- List- .pb-10- div(:class="trnsClassNames")- TrnsList(- :trnsIds="filteredTrnsIds"- :size="50"- :isFilterByDay="isFilterByDay"- isShowFilter- uiHistory- @onClickEdit="onClickEdit"- )+ UiTabsItem(+ :isActive="filterTrnsType === 0"+ @click="setFilterTrnsType(0)"+ ) {{ $t('money.expense') }}++ UiTabsItem(+ :isActive="filterTrnsType === 1"+ @click="setFilterTrnsType(1)"+ ) {{ $t('money.income') }}++ UiTabsItem(+ :isActive="filterTrnsType === 2"+ @click="setFilterTrnsType(2)"+ ) {{ $t('transfer.titleMoney') }}++ .h-full.scroll.scrollerBlock.h-full.overflow-y-auto+ //- Nothing+ .h-full.flex-center.pb-2(v-if="trnsCount === 0")+ .py-3.text-center+ .text-7xl.mdi.mdi-palm-tree+ .text-md {{ $t('trns.noTrns') }}++ //- List+ .h-full.pb-10(v-else)+ div(:class="trnsClassNames")+ TrnsList(+ :trnsIds="filteredTrnsIds"+ :size="50"+ :isFilterByDay="isFilterByDay"+ isShowFilter+ uiHistory+ @onClickEdit="onClickEdit"+ )</template>diff --git a/components/trns/item/Base.vue b/components/trns/item/Base.vueindex 5a51fa80..0419b838 100644--- a/components/trns/item/Base.vue+++ b/components/trns/item/Base.vue@@ -126,6 +126,6 @@ const actions = {)//- Description- .pt-2.text-neutral-500.text-xs.leading-none(v-if="trnItem.desc")- | {{ trnItem.desc }}+ .pt-2.text-neutral-500.text-xs.leading-none(v-if="trnItem.desc || trnItem.description")+ | {{ trnItem.desc || trnItem.description }}</template>diff --git a/components/trns/item/Details.vue b/components/trns/item/Details.vueindex 136bedfc..26dc5c7f 100644--- a/components/trns/item/Details.vue+++ b/components/trns/item/Details.vue@@ -84,7 +84,7 @@ function setTrnEdit() {:id="trn.expenseWalletId":isShowAmount="false")- .text-2xl.text-skin-item-base+ .text-2xl.text-item-baseAmount(:amount="trn.expenseAmount":currencyCode="$store.state.wallets.items[trn.expenseWalletId].currency"@@ -103,7 +103,7 @@ function setTrnEdit() {:id="trn.incomeWalletId":isShowAmount="false")- .text-2xl.text-skin-item-base+ .text-2xl.text-item-baseAmount(:amount="trn.incomeAmount":currencyCode="$store.state.wallets.items[trn.incomeWalletId].currency"diff --git a/components/trns/item/Modal.vue b/components/trns/item/Modal.vueindex 97a11fdb..92e631ee 100644--- a/components/trns/item/Modal.vue+++ b/components/trns/item/Modal.vue@@ -117,14 +117,13 @@ Portal(template(#header).header- .header__category- TrnsItemDetails(- :category="category"- :trn="trnItem"- :trnId="trnId"- :wallet="wallet"- ui="detailed"- )+ TrnsItemDetails(+ :category="category"+ :trn="trnItem"+ :trnId="trnId"+ :wallet="wallet"+ ui="detailed"+ )template(#default="{ close }").content.pb-4@@ -171,7 +170,7 @@ Portal().pt-4.px-4.flex-center- .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-sm.bg-item-main-bg.hocus_bg-item-main-hover(class="basis-1/2 max-w-[280px]"@click="close()") {{ $t('close') }}@@ -179,7 +178,7 @@ Portal(//- delete confirmModalBottomConfirm(:show="showModalConfirm"- @onClose="showModalConfirm = false"+ @closed="showModalConfirm = false"@onConfirm="handleDeleteConfirm")</template>diff --git a/components/trns/pages/History.vue b/components/trns/pages/History.vueindex c85da0bd..c17844d9 100644--- a/components/trns/pages/History.vue+++ b/components/trns/pages/History.vue@@ -1,6 +1,7 @@<script setup lang="ts">import useStatPage from '~/components/stat/useStatPage'import useTrns from '~/components/trns/useTrns'+const { statPage } = useStatPage()const { allTrnsIdsWithFilter } = useTrns()</script>@@ -16,14 +17,13 @@ export default defineComponent({</script><template lang="pug">-.h-full.overflow.overflow-x-auto- .py-6.px-2.font-nunito.text-neutral-800.dark_text-white.text-2xl.leading-none.font-semibold- | {{ $t('trns.history') }}+UiPage+ UiHeader+ UiHeaderTitle {{ $t('trns.history') }}- .px-2- .pb-8(v-if="statPage.filter.isShow")- LazyStatFilter+ .pb-8(v-if="statPage.filter.isShow")+ LazyStatFilter- .my-4.md_max-w-none(class="max-w-[420px]")- TrnsListWithControl(:trnsIds="allTrnsIdsWithFilter")+ .my-4.md_max-w-none(class="max-w-[420px]")+ TrnsListWithControl(:trnsIds="allTrnsIdsWithFilter")</template>diff --git a/components/ui/ButtonBlue.vue b/components/ui/ButtonBlue.vueindex f8ab6743..e933d08e 100644--- a/components/ui/ButtonBlue.vue+++ b/components/ui/ButtonBlue.vue@@ -1,9 +1,22 @@<script setup lang="ts">+const props = defineProps<{+ maxWidth?: boolean+}>()+const emit = defineEmits(['click'])++const classes = computed(() => {+ const cls = []+ if (props.maxWidth)+ cls.push('max-w-[320px]')++ return cls+})</script><template lang="pug">button(+ :class="classes"class=`overflow-hidden relativeenabled:cursor-pointerdiff --git a/components/ui/ButtonSecond.vue b/components/ui/ButtonSecond.vuenew file mode 100644index 00000000..84c7d2f3--- /dev/null+++ b/components/ui/ButtonSecond.vue@@ -0,0 +1,70 @@+<script setup lang="ts">+const props = defineProps<{+ icon?: string+ isShowDots?: boolean+ title?: string+}>()++const emit = defineEmits<{+ (e: 'click'): void+}>()++const classNames = computed(() => ({+ '!pr-3': props.isShowDots,+}))+</script>++<template lang="pug">+.wrap(+ :class="classNames"+ @click="emit('click')"+)+ .icon(v-if="icon")+ div(:class="icon")++ .grow(v-if="title") {{ title }}++ .check(+ v-if="showCheckbox"+ @click.prevent=""+ )+ SharedInputsCheckbox(v-model="checkboxValue")++ .mdi.mdi-dots-vertical.text-lg(v-if="isShowDots")+</template>++<style lang="stylus" scoped>+.wrap+ cursor pointer+ display flex+ align-items center+ width 100%+ min-height 48px+ padding $m6 $m8+ color var(--c-text-4)+ font-size 14px+ text-decoration none+ background var(--c-bg-4)+ border 1px solid var(--c-bg-5)+ border-radius $m5+ anim-background()++ +media-hover()+ background var(--c-item-bg-hover)+ border 1px solid var(--c-item-bd-hover)++.icon+ opacity .85+ margin-right $m6+ margin-left -5px+ font-size 18px+ text-align center++ &:last-child+ margin-right 0+ margin-right -5px++.check+ margin-left auto+ padding-left 32px+</style>diff --git a/components/ui/Header.vue b/components/ui/Header.vueindex fa3958a5..51e500ff 100644--- a/components/ui/Header.vue+++ b/components/ui/Header.vue@@ -4,7 +4,7 @@<template lang="pug">.flex.flex.items-center.justify-between.gap-4.sticky.top-0.z-20.backdrop-blur(- class="bg-white/70 dark_bg-dark3/70"+ class="min-h-[48px] bg-white/70 dark_bg-dark3/70")slotdiff --git a/components/ui/HeaderLink.vue b/components/ui/HeaderLink.vueindex 283f1b5c..d8a05dd3 100644--- a/components/ui/HeaderLink.vue+++ b/components/ui/HeaderLink.vue@@ -1,5 +1,5 @@<template lang="pug">-.cursor-pointer.group.w-10.h-10.flex-center.rounded-full.hocus-text-white.hocus_bg-skin-accent-base(+.cursor-pointer.group.w-10.h-10.flex-center.rounded-full.hocus-text-white.hocus_bg-accent-default(@click="$emit('click')")slotdiff --git a/components/ui/HeaderTitle.vue b/components/ui/HeaderTitle.vueindex ca9fb685..222c3875 100644--- a/components/ui/HeaderTitle.vue+++ b/components/ui/HeaderTitle.vue@@ -3,6 +3,6 @@</script><template lang="pug">-.grow.py-1.px-2.text-skin-item-base-up.font-semibold.font-nunito.leading-none+.grow.py-1.px-2.text-item-base-up.font-semibold.font-nunito.leading-noneslot</template>diff --git a/components/ui/Page.vue b/components/ui/Page.vueindex b228780b..0e739872 100644--- a/components/ui/Page.vue+++ b/components/ui/Page.vue@@ -1,10 +1,36 @@+<script setup lang="ts">+import { useTrnFormStore } from '~/components/trnForm/useTrnForm'++const $trnForm = useTrnFormStore()+const styles = ref({+ paddingBottom: '0px',+})++watch(() => $trnForm.ui.isShow, (value) => {+ if (!value) {+ styles.value.paddingBottom = '0px'+ return+ }++ const form: HTMLElement | null = document.querySelector('#trnForm')+ styles.value.paddingBottom = `${form?.offsetHeight ?? 0}px`+})+</script>+<template lang="pug">-.relative.overflow-x-hidden.overflow-y-auto.flex.flex-col.justify-between.w-full.h-full(- class="md_pb-[52px] pb-[44px] lg_pb-0"+div(+ class=`+ overflow-x-hidden+ overflow-y-auto+ relative+ flex flex-col justify-between+ w-full+ pb-[44px] md_pb-[52px] lg_pb-0+ `)- .max-w-3xl+ .max-w-5xl.lg_px-8(:style="styles")slot- .max-w-3xl+ .max-w-5xlslot(name="bottom")</template>diff --git a/components/ui/PageScroll.vue b/components/ui/PageScroll.vuenew file mode 100644index 00000000..36eefc39--- /dev/null+++ b/components/ui/PageScroll.vue@@ -0,0 +1,8 @@+<script setup lang="ts">++</script>++<template lang="pug">+.overflow-y-auto.h-full.pb-8.lg_px-8.js_scroll_page+ slot+</template>diff --git a/components/ui/Separator.vue b/components/ui/Separator.vuenew file mode 100644index 00000000..ec2d8243--- /dev/null+++ b/components/ui/Separator.vue@@ -0,0 +1,13 @@+<script setup lang="ts">++</script>++<template lang="pug">+div(+ class=`+ h-[1px]+ bg-item-main-active+ my-2 mx-4+ `+)+</template>diff --git a/components/ui/Tabs.vue b/components/ui/Tabs.vueindex 37736d15..c736227e 100644--- a/components/ui/Tabs.vue+++ b/components/ui/Tabs.vue@@ -7,7 +7,7 @@growflex items-centerrounded-md- bg-skin-item-main-bg+ bg-item-main-bg"><slot />diff --git a/components/ui/TabsItem.vue b/components/ui/TabsItem.vueindex 8b715082..a4a52b30 100644--- a/components/ui/TabsItem.vue+++ b/components/ui/TabsItem.vue@@ -9,13 +9,13 @@ const emit = defineEmits(['click'])<template><div:class="{- '!bg-skin-item-main-active !text-accent-default !cursor-default': isActive,+ '!bg-item-main-active !text-accent-default !cursor-default': isActive,}"class="cursor-pointer select-nonegrow py-3 px-2 flex gap-1 items-center justify-centertext-primary/80 text-sm- hocus_bg-skin-item-main-hover+ hocus_bg-item-main-hover@4xl/tabs_text-lg @4xl/tabs_p-3transition"diff --git a/components/ui/TabsItem2.vue b/components/ui/TabsItem2.vueindex 4aa5d641..6c883a80 100644--- a/components/ui/TabsItem2.vue+++ b/components/ui/TabsItem2.vue@@ -9,14 +9,14 @@ const emit = defineEmits(['click'])<template><div:class="{- '!cursor-default !bg-skin-item-main-active !text-accent-default': isActive,+ '!cursor-default !bg-item-main-active !text-accent-default': isActive,}"class="cursor-pointer select-nonepy-2 px-3 flex gap-1 items-center justify-centerborder-1 rounded-mdtext-secondary/70 text-sm leading-none- hocus_bg-skin-item-main-hover+ hocus_bg-item-main-hovertransition"@click="emit('click')"diff --git a/components/ui/Title.vue b/components/ui/Title.vueindex e860efb5..d7b7ba84 100644--- a/components/ui/Title.vue+++ b/components/ui/Title.vue@@ -1,8 +1,10 @@<script setup lang="ts">-+const emit = defineEmits<{+ (e: 'click'): void+}>()</script><template lang="pug">-.py-4.px-3.text-secondary.font-nunito.text-xl.font-semibold+.text-secondary.font-nunito.text-lg.font-semibold(@click="emit('click')")slot</template>diff --git a/components/ui/classes.ts b/components/ui/classes.tsnew file mode 100644index 00000000..2399de5c--- /dev/null+++ b/components/ui/classes.ts@@ -0,0 +1,37 @@+export const classes = {+ item: {+ simple: '',+ link: `+ cursor-pointer+ hocus_bg-item-main-hover+ transition+ `,+ bg: `+ bg-item-main-bg+ `,+ base: '',+ rounded: 'rounded-md',+ paddings: {+ base: '',+ },+ shadow: `+ shadow hocus_shadow-lg+ `,+ menu: `+ flex items-center+ py-3+ `,+ menuModal: 'px-4 gap-x-4',+ menuSidebar: 'px-5 gap-x-5',+ },++ modal: {+ bg: 'bg-item-main-bg',+ rounded: 'rounded-xl',+ padding1: 'px-2 pt-6 !pb-2',+ },+}++export function getStyles(group: string, elements: string[]) {+ return elements.map(name => classes[group][name])+}diff --git a/components/ui/item/Main.vue b/components/ui/item/Main.vuenew file mode 100644index 00000000..879fae1b--- /dev/null+++ b/components/ui/item/Main.vue@@ -0,0 +1,8 @@+<script setup lang="ts">+import { classes } from '~/components/ui/classes'+</script>++<template lang="pug">+div(:class="[classes.item.base]")+ slot+</template>diff --git a/components/ui/item/Shadow.vue b/components/ui/item/Shadow.vuenew file mode 100644index 00000000..b99d2e6b--- /dev/null+++ b/components/ui/item/Shadow.vue@@ -0,0 +1,15 @@+<script setup lang="ts">+import { getStyles } from '~/components/ui/classes'++const emit = defineEmits<{+ (e: 'click'): void+}>()+</script>++<template lang="pug">+div(+ :class="getStyles('item', ['bg', 'link', 'rounded', 'shadow'])"+ @click="emit('click')"+)+ slot+</template>diff --git a/components/wallets/Delete.vue b/components/wallets/Delete.vueindex 6dba016d..051718b4 100644--- a/components/wallets/Delete.vue+++ b/components/wallets/Delete.vue@@ -64,7 +64,7 @@ divModalBottomConfirm(:show="isShowDeleteConfirm":description="deleteDescText"- @onClose="isShowDeleteConfirm = false"+ @closed="isShowDeleteConfirm = false"@onConfirm="onDeleteConfirm")</template>diff --git a/components/wallets/Form.vue b/components/wallets/Form.vueindex d372d7d0..7efbc2a9 100644--- a/components/wallets/Form.vue+++ b/components/wallets/Form.vue@@ -109,8 +109,8 @@ div(v-if="walletForm")//-----------------------------------template(v-if="activeTab === 'data'").mb-8- .pb-2.text-skin-item-base-down.text-sm.leading-none {{ $t('wallets.form.name.label') }}- input.w-full.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-skin-item-base.bg-skin-item-main-bg.border.border-solid.border-skin-item-main-hover.placeholder_text-skin-item-base-down.transition.ease-in-out.focus_text-skin-item-base-up.focus_bg-skin-item-main-hover.focus_border-blue3.focus_outline-none(+ .pb-2.text-item-base-down.text-sm.leading-none {{ $t('wallets.form.name.label') }}+ input.w-full.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-item-base.bg-item-main-bg.border.border-solid.border-item-main-hover.placeholder_text-item-base-down.transition.ease-in-out.focus_text-item-base-up.focus_bg-item-main-hover.focus_border-blue3.focus_outline-none(:placeholder="$t('wallets.form.name.placeholder')":value="walletForm.name"type="text"@@ -118,8 +118,8 @@ div(v-if="walletForm")).mb-6- .pb-2.text-skin-item-base-down.text-sm.leading-none {{ $t('wallets.form.description.label') }}- input.w-full.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-skin-item-base.bg-skin-item-main-bg.border.border-solid.border-skin-item-main-hover.placeholder_text-skin-item-base-down.transition.ease-in-out.focus_text-skin-item-base-up.focus_bg-skin-item-main-hover.focus_border-blue3.focus_outline-none(+ .pb-2.text-item-base-down.text-sm.leading-none {{ $t('wallets.form.description.label') }}+ input.w-full.m-0.py-3.px-4.rounded-lg.text-base.font-normal.text-item-base.bg-item-main-bg.border.border-solid.border-item-main-hover.placeholder_text-item-base-down.transition.ease-in-out.focus_text-item-base-up.focus_bg-item-main-hover.focus_border-blue3.focus_outline-none(:placeholder="$t('wallets.form.description.placeholder')":value="walletForm.description"type="text"@@ -166,15 +166,14 @@ div(v-if="walletForm")).colorPreview(:style="{ background: color }")- .pb-2.text-sm.text-skin-item-base-down {{ $t('wallets.form.colors.custom') }}+ .pb-2.text-sm.text-item-base-down {{ $t('wallets.form.colors.custom') }}input.cursor-pointer.w-full.h-12.p-0.border-0(v-model="walletForm.color" type="color")- .pt-4.pb-6- SharedButton(- :class="['_text-center _blue2 _ml-big', { _inline: $store.state.ui.pc }]"- :title="$t('wallets.form.save')"- @onClick="onSave"- )+ .pt-4.pb-6.flex-center+ UiButtonBlue(+ maxWidth+ @click="onSave"+ ) {{ $t('base.save') }}</template><style lang="stylus" scoped>diff --git a/components/wallets/ItemTotalSum.vue b/components/wallets/ItemTotalSum.vueindex d1ac5ff2..c51cfc01 100644--- a/components/wallets/ItemTotalSum.vue+++ b/components/wallets/ItemTotalSum.vue@@ -36,7 +36,7 @@ const total = computed(() => {.flex.gap-6//- Expensediv- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base+ .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-item-base| {{ $t('money.expense') }}.text-xlAmount(@@ -48,7 +48,7 @@ const total = computed(() => {//- Incomediv- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base+ .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-item-base| {{ $t('money.income') }}.text-xlAmount(@@ -60,7 +60,7 @@ const total = computed(() => {//- Sumdiv- .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-skin-item-base+ .pb-2.text-lg.leading-none.font-nunito.font-semibold.text-item-base| {{ $t('money.sum') }}.text-xlAmount(diff --git a/components/wallets/List.vue b/components/wallets/List.vueindex 5d7686c8..84abd90a 100644--- a/components/wallets/List.vue+++ b/components/wallets/List.vue@@ -55,8 +55,8 @@ div)slot(- v-if="isShowToggle && walletsIdsSorted.length > limit"name="toggle"+ v-if="isShowToggle && walletsIdsSorted.length > limit":stateLimit="stateLimit":limit="limit":toggle="toggle"diff --git a/components/wallets/Sort.vue b/components/wallets/Sort.vueindex 214cff57..896bf241 100644--- a/components/wallets/Sort.vue+++ b/components/wallets/Sort.vue@@ -44,10 +44,10 @@ export default {</script><template lang="pug">-.h-full.overflow.overflow-x-auto.bg-skin-layout-main+.h-full.overflow.overflow-x-auto.bg-layout-main//- Header//------------------------------------ .pb-4.px-2.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold+ .pb-4.px-2.text-center.text-item-base.text-xl.font-nunito.font-semibold| {{ $t('wallets.sortTitle') }}//- Items@@ -57,7 +57,7 @@ export default {handle=".handle"ghost-class="_draggable")- .overflow-hidden.py-0.pl-3.flex.items-center.gap-3.rounded-md.bg-skin-item-main-bg(+ .overflow-hidden.py-0.pl-3.flex.items-center.gap-3.rounded-md.bg-item-main-bg(v-for="walletId in sortedWalletsIds":key="walletId")@@ -68,44 +68,13 @@ export default {) {{ $store.state.wallets.items[walletId].name.substring(0, 2) }}.grow.text-sm.text-neutral-500.dark_text-neutral-400 {{ $store.state.wallets.items[walletId].name }}- .cursor-grab.flex-center.w-11.h-11.handle.doNotCloseModal.hocus_bg-skin-item-main-hover+ .cursor-grab.flex-center.w-11.h-11.handle.doNotCloseModal.hocus_bg-item-main-hoversvg.w-6.h-6(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24")path(fill="currentColor" d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2s.9-2 2-2s2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z")- .pt-6- SharedButton(- className="_blue2 _text-center"- :title="$t('base.save')"- @onClick="saveWalletsOrder"- )--//- .px-3-//- //- Items-//- //------------------------------------//- Draggable.grid.gap-1(-//- v-model="sortedWalletsIds"-//- handle=".handle"-//- ghost-class="_draggable"-//- )-//- .overflow-hidden.flex.items-center.gap-3.bg.py-0.pl-3.rounded-md(-//- v-for="walletId in sortedWalletsIds"-//- :key="walletId"-//- )-//- .grow.flex-center.gap-x-3-//- .w-6.h-6.rounded-md.flex-center.text-neutral-50.text-xs.leading-none(-//- :style="{ background: $store.state.wallets.items[walletId].color }"-//- class="mt-[2px]"-//- ) {{ $store.state.wallets.items[walletId].name.substring(0, 2) }}-//- .grow.text-sm.text-neutral-500.dark_text-neutral-400 {{ $store.state.wallets.items[walletId].name }}--//- .cursor-grab.flex-center.w-11.h-11.handle.doNotCloseModal.hocus_bg-gray-100.dark_hocus_bg-neutral-800-//- svg.w-6.h-6(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24")-//- path(fill="currentColor" d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2s.9-2 2-2s2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z")--//- .pt-6-//- SharedButton(-//- className="_blue2 _text-center"-//- :title="$t('base.save')"-//- @onClick="saveWalletsOrder"-//- )+ .flex-center.pt-6+ UiButtonBlue(+ maxWidth+ @click="saveWalletsOrder"+ ) {{ $t('base.save') }}</template>diff --git a/components/wallets/Total.vue b/components/wallets/Total.vueindex 58e1ff37..ecb8798f 100644--- a/components/wallets/Total.vue+++ b/components/wallets/Total.vue@@ -73,17 +73,17 @@ const counts = computed(() => ({</script><template lang="pug">-.px-3.py-1.bg-skin-item-main-bg.rounded-md(+.px-3.py-1.bg-item-main-bg.rounded-md(v-if="$store.getters['wallets/hasWallets']")template(v-for="item in counts")- .py-2.flex.items-center.border-b.border-skin-item-main-hover.last_border-0(+ .py-2.flex.items-center.border-b.border-item-main-hover.last_border-0(v-if="item.isShow").grow.flex.items-center.gap-3.text-sm.leading-none {{ $t(item.titleId) }}- .text-skin-item-base+ .text-item-baseAmount(:currencyCode="currencyCode":amount="item.value"diff --git a/components/wallets/page/List.vue b/components/wallets/page/List.vueindex 781d55fb..b784d86f 100644--- a/components/wallets/page/List.vue+++ b/components/wallets/page/List.vue@@ -1,10 +1,12 @@<script setup lang="ts">import { useStorage } from '@vueuse/core'import useWallets from '~/components/wallets/useWallets'+import useFilter from '~/components/filter/useFilter'const { $store } = useNuxtApp()const activeTab = computed(() => $store.state.ui.activeTab)const { walletsCurrencies, walletsItemsSorted } = useWallets()+const { setFilterWalletsId } = useFilter()const state = useStorage('finapp.page.wallets', {activeTab: 'all',@@ -56,13 +58,11 @@ UiPageUiIconAdd.w-5.h-5.group-hover_text-white//- Base currency- .pt-4.pb-12.px-2(v-if="walletsCurrencies.length > 1")- .pb-2.text-md.leading-none.font-nunito.font-semibold.text-skin-item-base {{ $t('currenciesBase') }}+ .px-2.pb-4(v-if="walletsCurrencies.length > 1")+ UiTitle.pb-2 {{ $t('currenciesBase') }}WalletsCurrenciesChanger- //- Currencies- .px-2- .pb-2.text-md.leading-none.font-nunito.font-semibold.text-skin-item-base {{ $t('list') }}+ UiTitle.px-2.pb-2 {{ $t('list') }}//- Tabs.pb-4.px-2(v-if="walletsCurrencies.length > 1")@@ -73,9 +73,9 @@ UiPage) AllUiTabsItem(v-for="currency in walletsCurrencies"+ :key="currency":isActive="state.activeTab === currency"@click="walletsCurrenciesTabs.onSelect(currency)"- :key="currency") {{ currency }}//- Total@@ -89,7 +89,7 @@ UiPage//---------------------------------.pb-12.px-2.grid.gap-y-1.gap-x-6.md_grid-cols-2//- Wallet- .cursor-pointer.flex.items-center.py-2.px-3.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(+ .cursor-pointer.flex.items-center.py-2.px-3.rounded-md.bg-item-main-bg.hocus_bg-item-main-hover(v-for="(walletItem, walletId) in walletsCurrenciesTabs.wallets":key="walletId"@click="$router.push(`/wallets/${walletId}`)"@@ -97,16 +97,18 @@ UiPage.grow.gap-x-3.flex.items-center.grow.flex-center.gap-x-3//- Icon- .w-6.h-6.rounded-md.flex-center.text-skin-icon-base.text-xs.leading-none(+ .w-6.h-6.rounded-md.flex-center.text-icon-base.text-xs.leading-none(:style="{ background: walletItem.color }"class="mt-[2px]"+ @click.stop="setFilterWalletsId(walletId)") {{ walletItem.name.substring(0, 2) }}+.grow.flex.items-center.gap-3- .text-sm.text-skin-item-base {{ walletItem.name }}- UiIconWalletWithdrawal.w-4.h-4.text-skin-item-base-down(+ .text-sm.text-item-base {{ walletItem.name }}+ UiIconWalletWithdrawal.w-4.h-4.text-item-base-down(v-if="walletItem.countTotal")- UiIconWalletSavings.w-4.h-4.text-skin-item-base-down(+ UiIconWalletSavings.w-4.h-4.text-item-base-down(v-if="!walletItem.countTotal && !walletItem.isCredit")@@ -129,29 +131,6 @@ UiPagev-if="activeTab === 'walletsSort'"@closeModal="closeModal")-- //- Portal(- //- v-if="activeTab === 'walletsSort'"- //- to="modal"- //- )- //- BaseBottomSheet(- //- :maxHeight="height"- //- insideClass="bg-skin-layout-main"- //- @closed="$store.dispatch('ui/setActiveTab', null)"- //- )- //- template(#handler="{ close }")- //- BaseBottomSheetHandler- //- BaseBottomSheetClose(@onClick="close")-- //- template(#header)- //- .py-4.px-3.rounded-t-2xl.text-center.text-neutral-800.dark_text-white.text-xl.font-semibold.font-nunito.bg-skin-layout-main- //- | {{ $t('wallets.sortTitle') }}-- //- template(#default="{ close }")- //- WalletsSort(- //- v-if="activeTab === 'walletsSort'"- //- @closeModal="close"- //- )</template><i18n lang="yaml">diff --git a/components/wallets/page/New.vue b/components/wallets/page/New.vueindex acb26e75..cebe952a 100644--- a/components/wallets/page/New.vue+++ b/components/wallets/page/New.vue@@ -22,15 +22,15 @@ export default defineComponent({UiPageUiHeaderrouter-link(v-slot="{ href, navigate }" to="/wallets" custom)- a.grow.hocus_bg-skin-item-main-hover(:href="href" @click="navigate")+ a.grow.hocus_bg-item-main-hover(:href="href" @click="navigate")UiHeaderTitle- .pb-1.text-xs.font-medium.text-skin-item-base-down+ .pb-1.text-xs.font-medium.text-item-base-down| {{ $t("wallets.createNewTitle") }}.flex.items-center.gap-3- .text-skin-item-base-up.text-2xl.font-semibold+ .text-item-base-up.text-2xl.font-semibold| {{ walletForm.name ? walletForm.name : $t("wallets.form.name.label") }}- .p-1.flex-center.rounded.text-skin-icon-base.text-2xs(:style="{ background: walletForm.color }")+ .p-1.flex-center.rounded.text-icon-base.text-2xs(:style="{ background: walletForm.color }")| {{ walletForm.currency }}WalletsForm(diff --git a/components/wallets/page/id/Edit.vue b/components/wallets/page/id/Edit.vueindex 9ce253b0..74d86396 100644--- a/components/wallets/page/id/Edit.vue+++ b/components/wallets/page/id/Edit.vue@@ -21,15 +21,15 @@ useHead({UiPage(v-if="wallet")UiHeaderrouter-link(v-slot="{ href, navigate }" :to="`/wallets/${walletId}`" custom)- a.grow.hocus_bg-skin-item-main-hover(:href="href" @click="navigate")+ a.grow.hocus_bg-item-main-hover(:href="href" @click="navigate")UiHeaderTitle- .pb-1.text-xs.font-medium.text-skin-item-base-down+ .pb-1.text-xs.font-medium.text-item-base-down| {{ $t("wallets.editTitle") }}.flex.items-center.gap-3- .text-skin-item-base-up.text-2xl.font-semibold+ .text-item-base-up.text-2xl.font-semibold| {{ walletForm.name ? walletForm.name : $t("wallets.title") }}- .p-1.flex-center.rounded.text-skin-icon-base.text-2xs(:style="{ background: walletForm.color }")+ .p-1.flex-center.rounded.text-icon-base.text-2xs(:style="{ background: walletForm.color }")| {{ walletForm.currency }}template(#actions)diff --git a/components/wallets/page/id/Index.vue b/components/wallets/page/id/Index.vueindex 6f69fb18..e50ecf0c 100644--- a/components/wallets/page/id/Index.vue+++ b/components/wallets/page/id/Index.vue@@ -47,15 +47,15 @@ useHead({UiPage(v-if="wallet")UiHeaderrouter-link(v-slot="{ href, navigate }" to="/wallets" custom)- a.grow.hocus_bg-skin-item-main-hover(:href="href" @click="navigate")+ a.grow.hocus_bg-item-main-hover(:href="href" @click="navigate")UiHeaderTitle- .pt-1.text-xs.font-medium.text-skin-item-base-down+ .pt-1.text-xs.font-medium.text-item-base-down| {{ $t("wallets.title") }}.pb-1.flex.items-center.gap-3- .text-skin-item-base-up.text-2xl.font-semibold+ .text-item-base-up.text-2xl.font-semibold| {{ wallet.name }}- .p-1.flex-center.rounded.text-skin-icon-base.text-2xs(:style="{ background: wallet.color }")+ .p-1.flex-center.rounded.text-icon-base.text-2xs(:style="{ background: wallet.color }")| {{ wallet.currency }}template(#actions)@@ -68,12 +68,11 @@ UiPage(v-if="wallet"):currencyCode="wallet.currency")- .mb-6.px-2.text-sm.text-skin-item-base-down(v-if="wallet.description") {{ wallet.description }}+ .mb-6.px-2.text-sm.text-item-base-down(v-if="wallet.description") {{ wallet.description }}.mb-6.px-2.flex- .cursor-pointer.p-1.px-3.flex.items-center.gap-3.bg-gray-50.dark_bg-dark4.rounded-md.hocus_bg-gray-100.dark_hocus_bg-neutral-800.shadow.hocus_shadow-lg(- class="dark_text-white/60"+ UiItemShadow.cursor-pointer.p-1.px-2.flex.items-center.gap-3(@click="onClickFilterWallet").mdi.mdi-poll.text-xl@@ -81,7 +80,7 @@ UiPage(v-if="wallet").mdi.mdi-chevron-right.opacity-70.text-lg.leading-none//- Stat- .overflow-hidden.relative.bg-gray-50.dark_bg-custom4.mx-3.mb-12.p-3.rounded-md+ .overflow-hidden.relative.bg-gray-50.bg-item-main-bg.mx-3.mb-12.p-3.rounded-mdSharedDate.text-xs.font-medium(class="-mb-1 dark_text-white/50":date="$day().valueOf()"diff --git a/components/welcome/CategoryForm.vue b/components/welcome/CategoryForm.vueindex 8140b9a5..e82dc434 100644--- a/components/welcome/CategoryForm.vue+++ b/components/welcome/CategoryForm.vue@@ -24,7 +24,7 @@ useHead({UiPageUiHeaderUiHeaderTitle- .pt-1.text-xs.font-medium.text-skin-item-base-down+ .pt-1.text-xs.font-medium.text-item-base-down| {{ $t('categories.createNewTitle') }}template(v-if="parentCategory")|@@ -32,7 +32,7 @@ UiPage.pb-1.flex.items-center.gap-4| {{ categoryForm.name ? categoryForm.name : $t("categories.form.name.label") }}- .w-8.h-8.rounded-full.flex-center.text-xl.text-skin-icon-base(+ .w-8.h-8.rounded-full.flex-center.text-xl.text-icon-base(:style="{ background: categoryForm.color }")div(:class="categoryForm.icon")diff --git a/components/welcome/WalletForm.vue b/components/welcome/WalletForm.vueindex ba896642..3f7ff79e 100644--- a/components/welcome/WalletForm.vue+++ b/components/welcome/WalletForm.vue@@ -35,13 +35,13 @@ useHead({<template lang="pug">UiPage.mb-3.py-5.px-2.font-nunito- .pb-1.text-xs.font-medium.text-skin-item-base-down+ .pb-1.text-xs.font-medium.text-item-base-down| {{ $t("wallets.createNewTitle") }}.flex.items-center.gap-3- .text-skin-item-base-up.text-2xl.font-semibold+ .text-item-base-up.text-2xl.font-semibold| {{ walletForm.name ? walletForm.name : $t("wallets.form.name.label") }}- .p-1.flex-center.rounded.text-skin-icon-base.text-2xs(:style="{ background: walletForm.color }")+ .p-1.flex-center.rounded.text-icon-base.text-2xs(:style="{ background: walletForm.color }")| {{ walletForm.currency }}.pb-12diff --git a/components/welcome/page/Welcome.vue b/components/welcome/page/Welcome.vueindex 3c6deadd..125600f7 100644--- a/components/welcome/page/Welcome.vue+++ b/components/welcome/page/Welcome.vue@@ -87,10 +87,11 @@ export default {.mdi.mdi-lightbulb-outline.themeSelector__title {{ $t('app.theme.light') }}- SharedButton._blue2._center(- :title="$t('buttons.nextStep')"- @onClick="step = 2"- )+ .flex-center+ UiButtonBlue(+ maxWidth+ @click="step = 2"+ ) {{ $t('buttons.nextStep') }}//-transition(name="fadeIn")@@ -111,16 +112,18 @@ export default {.options.options__item.options__desc {{ $t('welcome.create.text') }}- SharedButton._center._blue2(- v-if="!$store.getters['wallets/hasWallets']"- :title="$t('wallets.createNewTitle')"- @onClick="() => { step = 3; showWalletForm = true; }"- )- SharedButton._center._blue2(- v-if="$store.getters['wallets/hasWallets']"- :title="$t('categories.createNewTitle')"- @onClick="() => { step = 3; showCategoryForm = true; }"- )+ .flex-center+ UiButtonBlue(+ v-if="!$store.getters['wallets/hasWallets']"+ maxWidth+ @click="() => { step = 3; showWalletForm = true; }"+ ) {{ $t('wallets.createNewTitle') }}++ UiButtonBlue(+ v-if="$store.getters['wallets/hasWallets']"+ maxWidth+ @click="() => { step = 3; showCategoryForm = true; }"+ ) {{ $t('categories.createNewTitle') }}//- Wallet formtransition(name="fadeIn")@@ -136,10 +139,11 @@ export default {.tab__content.icon: .mdi.mdi-folder-star.options__desc {{ $t('welcome.createFirstCategory.text') }}- SharedButton._blue2._center(- :title="$t('welcome.createFirstCategory.btn')"- @onClick="showCategoryForm = true"- )+ .flex-center+ UiButtonBlue(+ maxWidth+ @click="showCategoryForm = true"+ ) {{ $t('welcome.createFirstCategory.btn') }}//- Category formtransition(name="fadeIn")@@ -150,7 +154,7 @@ export default {).firefoxBackdropFix.z-10.w-full.fixed.left-0.bottom-0.backdrop-blur(- class="bg-skin-layout-main/70"+ class="bg-layout-main/70")CommonCopyright</template>diff --git a/gulpfile.js b/gulpfile.jsindex 130f292c..8e9e21c2 100644--- a/gulpfile.js+++ b/gulpfile.js@@ -20,13 +20,13 @@ function toaster(name, cb) {function uploadTask(path, cb) {if (fs.existsSync('./ftp.config.js')) {- const configFTP = require('./ftp.config.js')const conn = ftp.create({- host: configFTP.host,- user: configFTP.user,- password: configFTP.password,+ host: 'style-nes.myjino.ru',+ user: 'style-nes_finapp',+ password: '5wefrfffsdfasfd',+ dest: '/',log,- parallel: 10,+ parallel: 1,})return src(path)diff --git a/layouts/default.vue b/layouts/default.vueindex 2a9176b9..6222b15c 100644--- a/layouts/default.vue+++ b/layouts/default.vue@@ -35,7 +35,7 @@ const classes = computed(() => [overflow-hidden relativeh-full min-w-basefont-roboto text-gray-500 dark_text-gray-400 leading-none antialiased- bg-skin-layout-main+ bg-layout-main`,])@@ -76,7 +76,7 @@ div(:class="classes").hidden.overflow-hidden.h-full.w-72.lg_blockLayoutSidebar- .overflow-hidden.h-full.grid.lg_px-8+ .overflow-hidden.h-full.gridNuxt(keep-alive :keep-alive-props="{ include: keepAliveInclude }").createTrn.hidden.z-10.absolute.right-6.bottom-6.lg_flex(diff --git a/layouts/welcome.vue b/layouts/welcome.vueindex 987b3cb3..d4c3c121 100644--- a/layouts/welcome.vue+++ b/layouts/welcome.vue@@ -21,7 +21,7 @@ const classes = computed(() => [overflow-hidden relativeh-full min-w-basefont-roboto text-gray-500 dark_text-gray-400 leading-none antialiased- bg-skin-layout-main+ bg-layout-main`,])diff --git a/locales/en-US.js b/locales/en-US.jsindex c46825c9..131c8acc 100644--- a/locales/en-US.js+++ b/locales/en-US.js@@ -89,7 +89,7 @@ export default {},filter: {- clear: 'Clear filter',+ clear: 'Clear',},welcome: {diff --git a/locales/ru-RU.js b/locales/ru-RU.jsindex 13a49524..539429c1 100644--- a/locales/ru-RU.js+++ b/locales/ru-RU.js@@ -86,11 +86,11 @@ export default {add: 'Создать',edit: 'Редактировать',delete: 'Удалить',- filter: 'Фильтровать',+ filter: 'Фильтр',},filter: {- clear: 'Очистить фильтр',+ clear: 'Убрать',},welcome: {diff --git a/nuxt.config.js b/nuxt.config.jsindex 232b31d3..33b41375 100644--- a/nuxt.config.js+++ b/nuxt.config.js@@ -85,7 +85,6 @@ export default defineNuxtConfig({'@nuxtjs/pwa','@nuxtjs/style-resources','@nuxtjs/tailwindcss',- 'nuxt-typed-vuex',],alias: {diff --git a/package.json b/package.jsonindex 124c19be..83ce0b33 100644--- a/package.json+++ b/package.json@@ -2,7 +2,7 @@"name": "finapp","version": "4.0.0","scripts": {- "dev": "cross-env NUXT_HOST=0.0.0.0 PORT=3051 nuxt2 dev",+ "dev": "nuxt2 dev","build": "nuxt2 generate","start": "nuxt2 preview","test": "vitest",@@ -29,7 +29,6 @@"lodash.merge": "^4.6.2","lodash.sortby": "^4.7.0","nuxt": "^2.17.1",- "nuxt-typed-vuex": "^0.3.1","pinia": "^2.1.6","portal-vue": "^2.1.7","swiper": "6.8.4",@@ -60,7 +59,6 @@"@vue/runtime-dom": "^3.3.4","autoprefixer": "^10.4.16","c8": "7.12.0",- "cross-env": "^7.0.3","eslint": "^8.50.0","eslint-plugin-nuxt": "^4.0.0","eslint-plugin-vue": "^9.17.0",diff --git a/pages/dashboard.vue b/pages/dashboard.vueindex fc0d2b95..105f157e 100644--- a/pages/dashboard.vue+++ b/pages/dashboard.vue@@ -1,3 +1,17 @@+<script setup lang="ts">+const { $store, nuxt2Context: { i18n } } = useNuxtApp()+const router = useRouter()++useHead({+ title: i18n.t('stat.title'),+})++if (!$store.getters['wallets/hasWallets'] || !$store.getters['categories/hasCategories'])+ router.replace('/welcome')+</script>+<template lang="pug">-StatPage+UiPage+ LazyStatView(v-if="$store.getters['trns/hasTrns']")+ LazyStatWelcomeActions(v-else)</template>diff --git a/pages/settings.vue b/pages/settings.vueindex 6039e374..5f4ae868 100644--- a/pages/settings.vue+++ b/pages/settings.vue@@ -35,73 +35,67 @@ export default defineComponent({<template lang="pug">UiPage- .mb-6.py-6.px-3.text-skin-item-base-up.text-2xl.leading-none.font-nunito.font-semibold- | {{ $t('settings.title') }}+ UiHeader+ UiHeaderTitle {{ $t('settings.title') }}- .pb-12.px-3.grid.gap-y-1.gap-x-6.md_grid-cols-2.md_gap-x-12+ .pt-4.pb-12.px-3.grid.gap-y-1.gap-x-6.md_grid-cols-2.md_gap-x-12div//- Currency.pb-12- .pb-3.text-skin-item-base.text-lg.leading-none.font-nunito.font-semibold- | {{ $t('currency.title') }}- .pb-4.text-skin-item-base-down.text-xs.leading-1 {{ $t('currency.descBase') }}+ UiTitle {{ $t('currency.title') }}+ .pb-4.text-item-base-down.text-xs.leading-1 {{ $t('currency.descBase') }}- SharedButton._bdb(+ UiButtonSecond(:title="currencies.find(c => c.code === $store.state.currencies.base).name"isShowDots- @onClick="$store.commit('currencies/showBaseCurrenciesModal')"+ @click="$store.commit('currencies/showBaseCurrenciesModal')").pb-12//- Locale- .pb-3.text-skin-item-base.text-lg.leading-none.font-nunito.font-semibold- | {{ $t('settings.app') }}- .pb-4- LangDropdown+ UiTitle.pb-2 {{ $t('settings.app') }}+ LangDropdown.pb-2- //- Theme- SharedButton._bdb(- icon="mdi mdi-palette"+ UiButtonSecond(:title="$t('theme.change')"- @onClick="$store.dispatch('ui/changeTheme')"+ icon="mdi mdi-palette"+ @click="$store.dispatch('ui/changeTheme')")//- User.pb-12(v-if="user")- .pb-3.text-skin-item-base.text-lg.leading-none.font-nunito.font-semibold- | {{ $t('user') }}- .pb-3.text-neutral-400+ UiTitle.pb-2 {{ $t('user') }}+ .pb-3.text-item-base-down.text-lg {{ user.displayName }}.text-sm {{ user.email }}- SharedButton._bdb(+ UiButtonSecond(:title="$t('userLogout')"icon="mdi mdi-logout"- @onClick="$store.dispatch('user/signOut')"+ @click="$store.dispatch('user/signOut')")+ //- Delete.pb-12- .pb-3.text-skin-item-base.text-lg.leading-none.font-nunito.font-semibold- | {{ $t('settings.caution') }}- .pb-4.text-skin-item-base-down.text-xs.leading-1 {{ $t('alerts.willDeleteEverything') }}+ UiTitle.pb-2 {{ $t('settings.caution') }}+ .pb-4.text-item-base-down.text-xs.leading-1 {{ $t('alerts.willDeleteEverything') }}- //- Delete.pb-4- SharedButton._bdb(+ UiButtonSecond(:title="$t('settings.deleteButton')"icon="mdi mdi-delete-empty-outline"- @onClick="confirmRemoveUserData = true"+ @click="confirmRemoveUserData = true")//- About.pb-12.md_justify-self-endAbout- .pt-4.text-skin-item-base-down.text-xs {{ $t('app.version') }} {{ version }}+ .pt-4.text-item-base-down.text-xs {{ $t('app.version') }} {{ version }}ModalBottomConfirm(:description="$t('alerts.willDeleteEverything')":show="confirmRemoveUserData"- @onClose="confirmRemoveUserData = false"+ @closed="confirmRemoveUserData = false"@onConfirm="removeUserData")</template>diff --git a/pages/stat/index.vue b/pages/stat/index.vuenew file mode 100644index 00000000..db68bddc--- /dev/null+++ b/pages/stat/index.vue@@ -0,0 +1,60 @@+<script setup lang="ts">+import type { CategoryId } from '~/components/categories/types'++const { $store } = useNuxtApp()+const route = useRoute()+const router = useRouter()++// TODO: Is category is not exist?+const catsIds = computed(() =>+ (Array.isArray(route.query.cats)+ ? route.query.cats+ : [route.query.cats])+ .filter(id => !!$store.state.categories.items[id]),+)++function hasParent(id: CategoryId) {+ // if ($store.state.categories.items[id].parentId)+ // cats = catsIds.value.filter(i => i !== id)+}++function addStatCategory(id: CategoryId) {+ router.push({+ path: 'stat',+ query: { cats: [...catsIds.value.filter(i => i !== id), id] },+ })+}++function onRemoveCategory(id: CategoryId) {+ router.push({+ path: 'stat',+ query: { cats: [...catsIds.value.filter(i => i !== id)] },+ })+}++const isShowCategorySelector = ref(false)+</script>++<template lang="pug">+.p-3+ FilterRow+ template(#add)+ FilterAddItem(+ :isShowText="catsIds.length === 0"+ @click="isShowCategorySelector = true"+ )+ template(#content)+ FilterCategoryItem(+ v-for="categoryId in catsIds"+ :key="categoryId"+ :categoryId="categoryId"+ @click="onRemoveCategory"+ )++ CategoriesSelector(+ :isShow="isShowCategorySelector"+ isAllowSelectParentCategory+ @show="value => isShowCategorySelector = value"+ @onSelected="addStatCategory"+ )+</template>diff --git a/pages/wallets/total.vue b/pages/wallets/total.vueindex e285a94b..7df80bbb 100644--- a/pages/wallets/total.vue+++ b/pages/wallets/total.vue@@ -205,7 +205,7 @@ const chartData = computed(() => _merge(JSON.parse(JSON.stringify(options)), chah1 maxPeriodsNumberpre {{ maxPeriodsNumber }}- .my-6.mx-2.py-2.rounded-lg.bg-skin-item-main-bg.border.dark_border-neutral-800+ .my-6.mx-2.py-2.rounded-lg.bg-item-main-bg.border.dark_border-neutral-800ChartBase.h-80(@finished="finished":option="chartData"diff --git a/store/filter/index.js b/store/filter/index.jsindex 4dc0c34d..58190199 100644--- a/store/filter/index.js+++ b/store/filter/index.js@@ -1,8 +1,10 @@import dayjs from 'dayjs'-export const state = () => ({- walletsIds: [],- catsIds: [],- date: dayjs().startOf('month').valueOf(),- period: 'month',-})+export function state() {+ return {+ walletsIds: [],+ catsIds: [],+ date: dayjs().startOf('month').valueOf(),+ period: 'month',+ }+}diff --git a/store/trnForm/index.ts b/store/trnForm/index.tsindex ae791c74..9829a194 100644--- a/store/trnForm/index.ts+++ b/store/trnForm/index.ts@@ -1,21 +1,15 @@export function state() {return {- action: 'create',height: '100%',modal: {calendar: false,categories: false,- categoriesChild: false,description: false,transferFrom: false,transferTo: false,wallets: false,trn: false,},-- show: false,- showModalCategoryId: null,- showModalTrnId: null,}}diff --git a/store/trnForm/mutations.ts b/store/trnForm/mutations.tsindex 3a5d4e19..2d1b13e0 100644--- a/store/trnForm/mutations.ts+++ b/store/trnForm/mutations.ts@@ -1,14 +1,4 @@export default {- setTrnFormHeight(state, height) {- state.height = height- },-- setTrnFormModalCategoryId(state, id) {- state.showModalCategoryId === id- ? state.showModalCategoryId = null- : state.showModalCategoryId = id- },-closeTrnFormModal(state, modalName) {state.modal[modalName] = false},@@ -16,12 +6,4 @@ export default {showTrnFormModal(state, modalName) {state.modal[modalName] = true},-- closeTrnForm(state) {- state.show = false- },-- openTrnForm(state) {- state.show = true- },}diff --git a/store/trns/actions.ts b/store/trns/actions.tsindex 4942dc93..39718aa7 100644--- a/store/trns/actions.ts+++ b/store/trns/actions.ts@@ -35,8 +35,6 @@ export default {localforage.setItem('finapp.trns', { ...trns, [id]: valuesWithEditDate })commit('setTrns', Object.freeze({ ...trns, [id]: valuesWithEditDate }))- console.log('id', id)- console.log('hey', `users/${uid}/trns/${id}`, valuesWithEditDate)saveData(`users/${uid}/trns/${id}`, valuesWithEditDate).then(() => {isTrnSavedOnline = truediff --git a/tailwind.config.js b/tailwind.config.jsindex d0519679..f8e658fe 100644--- a/tailwind.config.js+++ b/tailwind.config.js@@ -13,6 +13,10 @@ module.exports = {theme: {extend: {colors: {+ alert: {+ base: 'var(--color-alert-base)',+ },+primary: 'rgb(var(--text-primary))',secondary: 'rgb(var(--text-secondary))',main: 'rgb(var(--bg-main))',@@ -21,6 +25,7 @@ module.exports = {2: 'rgb(var(--accent-2))',primary: 'rgb(var(--accent-primary))',},+foreground: {primary: 'rgba(var(--foreground-primary))',main: 'rgb(var(--foreground-main))',@@ -29,52 +34,32 @@ module.exports = {active: 'rgb(var(--foreground-active))',},item: {- main: 'rgba(var(--item-main))',- border: 'rgba(var(--item-border))',- hover: 'rgba(var(--item-hover))',- primary: 'rgba(var(--item-primary))',+ 'border': 'rgba(var(--item-border))',+ 'hover': 'rgba(var(--item-hover))',+ 'primary': 'rgba(var(--item-primary))',+ 'base': 'var(--color-item-base)',+ 'base-up': 'var(--color-item-base-up)',+ 'base-down': 'var(--color-item-base-down)',+ 'main': {+ main: 'rgba(var(--item-main))',+ bg: 'var(--color-item-main-bg)',+ hover: 'var(--color-item-main-hover)',+ active: 'var(--color-item-main-active)',+ },},- 232323: '#232323',- blue1: '#58a6ff',blue3: '#3a7dff',- blue4: '#2183f2',- custom1: '#212121',- custom4: '#1c1c1c',dark3: '#171717',dark4: '#1c1c1c',- dark5: '#1e1e1e',expense: '#f92134',income: '#2cad22',- white1: '#fdfdfd',- white2: '#fcfcfd',- white3: '#f9fafb',- skin: {- accent: {- down: 'var(--color-accent-down)',- base: 'var(--color-accent-base)',- },- layout: {- 'main-up': 'var(--color-layout-main-up)',- 'main': 'var(--color-layout-main)',- },- red: {- base: 'var(--color-red-base)',- },- icon: {- base: 'var(--color-icon-base)',- },- item: {- 'base': 'var(--color-item-base)',- 'base-up': 'var(--color-item-base-up)',- 'base-down': 'var(--color-item-base-down)',- 'main': {- bg: 'var(--color-item-main-bg)',- hover: 'var(--color-item-main-hover)',- active: 'var(--color-item-main-active)',- },- },+ layout: {+ 'main-up': 'var(--color-layout-main-up)',+ 'main': 'var(--color-layout-main)',+ },+ icon: {+ base: 'var(--color-icon-base)',},},fontSize: {@@ -85,9 +70,6 @@ module.exports = {roboto: ['Roboto', 'sans-serif'],unica: ['"Unica One"', '"Roboto Condensed"', 'sans-serif'],},- minWidth: {- base: '320px',- },screens: {'3sm': '360px','2sm': '400px',diff --git a/yarn.lock b/yarn.lockindex 07c3007b..c01ccbef 100644--- a/yarn.lock+++ b/yarn.lock@@ -5571,14 +5571,7 @@ create-require@^1.1.1:resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==-cross-env@^7.0.3:- version "7.0.3"- resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"- integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==- dependencies:- cross-spawn "^7.0.1"--cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:+cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:version "7.0.3"resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==@@ -10541,14 +10534,6 @@ number-is-nan@^1.0.0:resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==-nuxt-typed-vuex@^0.3.1:- version "0.3.1"- resolved "https://registry.yarnpkg.com/nuxt-typed-vuex/-/nuxt-typed-vuex-0.3.1.tgz#a26f7b92eb19257ccda2c3a1ffaab4303088c7dc"- integrity sha512-oMAoO7/i/aW8NHgE9QSnNcJmKiJjFfTtgU6aotr0786ApgXk1At2qhiW63qFlXsX1wei94WmqLMuNCI/nl8Z0A==- dependencies:- typed-vuex "0.3.1"- upath "^2.0.1"-nuxt@^2.17.1:version "2.17.1"resolved "https://registry.yarnpkg.com/nuxt/-/nuxt-2.17.1.tgz#132a8812df48bf2df2fa9c890e63268600d06ce3"@@ -14318,11 +14303,6 @@ typed-array-length@^1.0.4:for-each "^0.3.3"is-typed-array "^1.1.9"- version "0.3.1"- resolved "https://registry.yarnpkg.com/typed-vuex/-/typed-vuex-0.3.1.tgz#4ed6adfd8cbfe68e0792b5b75f425ce3f622627e"- integrity sha512-hYEcXxVNKxP6pQvzX007wJ9HdTsGlWPhSOOtpf32DbcyiPDduf6PAZPR8kwQ7+QPhp+dGyTn3K+5cKzARP6IZA==-typedarray@^0.0.6:version "0.0.6"resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"