Skip to content

Open source personal finance application

feat(release): 3.6.1

ilkome6d5bafc004b2
diff --git a/components/amount/Amount2.vue b/components/amount/Amount2.vue
index dbe4aca4..f356a1b8 100644
--- a/components/amount/Amount2.vue
+++ b/components/amount/Amount2.vue
@@ -9,9 +9,9 @@ export default defineComponent({
type: { type: Number, default: null },
},
- setup({ type }) {
+ setup(props) {
const { baseCurrency, formatAmount, getCurrencySymbol, getAmountInBaseCurrency } = useAmount()
- const sign = type === 0 ? '-' : '+'
+ const sign = props.type === 0 ? '-' : '+'
return {
baseCurrency,
diff --git a/components/amount/Amount3.vue b/components/amount/Amount3.vue
deleted file mode 100644
index af656012..00000000
--- a/components/amount/Amount3.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-<script setup lang="ts">
-import currency from 'currency.js'
-
-const props = defineProps<{
- value: number
-}>()
-
-const separator = ' '
-
-const amount = computed(() =>
- currency(props.value, {
- symbol: '',
- precision: 0,
- pattern: '#',
- separator,
- }).format(),
-)
-</script>
-
-<template lang="pug">
-span.whitespace-nowrap.font-unica {{ amount }}
-</template>
diff --git a/components/categories/Item.vue b/components/categories/Item.vue
index 3e703250..686b84dd 100644
--- a/components/categories/Item.vue
+++ b/components/categories/Item.vue
@@ -44,63 +44,25 @@ export default defineComponent({
</script>
<template lang="pug">
-.categoryItem.bg-main.py-2.px-3.gap-x-3.flex.items-center.rounded-md.bg-gray-50.dark_bg-dark5.hocus_bg-gray-100.dark_hocus_bg-neutral-800(
+.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(
v-if="category"
- :class="{ _active: activeItemId === id }"
+ :class="{ '!cursor-default !bg-skin-item-main-active': activeItemId === id }"
@click="onClickItem"
)
- .categoryItem__active(v-if="activeItemId === id")
.w-8.h-8.flex.items-center.justify-center.rounded-full.text-xl.leading-none.text-neutral-50(
:style="{ background: category.color }"
@click.stop="onClickIcon"
): div(:class="category.icon")
- .categoryItem__name.grow.truncate
- .text-xs.text-neutral-500(
+ .grow.truncate
+ .text-xs.text-skin-item-base-down(
v-if="parentCategory && !isHideParentCategory"
class="dark_text-neutral-400"
) {{ parentCategory.name }}
.leading-none.text-sm.text-neutral-700.dark_text-neutral-300 {{ category.name }}
- .font-unica.text-md.text-neutral-500(
+ .font-unica.text-md.text-skin-item-base-down(
v-if="childCategoriesIds.length > 0"
- class="dark_text-neutral-400"
) {{ childCategoriesIds.length }}
</template>
-
-<style lang="stylus" scoped>
-.bg-main
- &._active
- background var(--c-item-bg-hover)
-
-.categoryItem
- overflow hidden
- cursor pointer
- position relative
- color var(--c-font-1)
-
- &__length
- color var(--c-font-4)
-
- &__parent
- color var(--c-font-4)
-
- &__child
- color var(--c-font-1)
-
- /.light &
- color var(--c-font-4)
-
- &__active
- position absolute
- top $m5
- right $m5
- display flex
- align-items center
- justify-content center
- width 8px
- height 8px
- background var(--c-blue-1)
- border-radius 50%
-</style>
diff --git a/components/categories/List.vue b/components/categories/List.vue
index 8f7469eb..6558f5f5 100644
--- a/components/categories/List.vue
+++ b/components/categories/List.vue
@@ -19,7 +19,7 @@ export default {
</script>
<template lang="pug">
-.grid.gap-y-1.gap-x-2.3sm_grid-cols-2.sm_gap-x-6
+.grid.gap-y-1.gap-x-1.3sm_grid-cols-2.sm_gap-x-6
CategoriesItem(
v-for="categoryId in categoresIds"
:category="$store.state.categories.items[categoryId]"
diff --git a/components/categories/page/List.vue b/components/categories/page/List.vue
index 2c20a664..c2024589 100644
--- a/components/categories/page/List.vue
+++ b/components/categories/page/List.vue
@@ -19,7 +19,7 @@ export default defineComponent({
</script>
<template lang="pug">
-.overflow.overflow-x-auto.h-full.grid.max-w-3xl(
+.overflow-y-auto.h-full.grid.max-w-3xl(
class="md_pb-[52px] pb-[44px] lg_pb-0 grid-rows-[1fr_auto]"
)
div
diff --git a/components/currencies/List.vue b/components/currencies/List.vue
index 1cbd45f2..e0b4c9be 100644
--- a/components/currencies/List.vue
+++ b/components/currencies/List.vue
@@ -1,10 +1,9 @@
<script setup lang="ts">
import { currencies } from '~/components/currencies/currencies'
-interface Props {
+const props = defineProps<{
active: string
-}
-const props = defineProps<Props>()
+}>()
const { active } = toRefs(props)
const emit = defineEmits(['onSelect'])
diff --git a/components/currencies/Modal.vue b/components/currencies/Modal.vue
index dfc79ba7..0d06e9ed 100644
--- a/components/currencies/Modal.vue
+++ b/components/currencies/Modal.vue
@@ -25,7 +25,7 @@ Portal(
BaseBottomSheetClose(@onClick="close")
template(#header)
- .py-4.px-3.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl
+ .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl
| {{ $t('currency.selectBaseTitle') }}
template(#default="{ close }")
diff --git a/components/layout/Sidebar.vue b/components/layout/Sidebar.vue
index 2105cff9..f426e4a6 100644
--- a/components/layout/Sidebar.vue
+++ b/components/layout/Sidebar.vue
@@ -1,39 +1,53 @@
<template lang="pug" scoped>
-.sidebar.relative.bg-gray-50.dark_bg-custom5
- .sidebar__content
- .p-4.px-5.flex.items-center.justify-between
- .text-xl.font-bold.text-neutral-500.dark_text-neutral-200.font-nunito
- | {{ $t('appName') }}
+.overflow-y-auto.h-full.bg-skin-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(
- @click="$store.dispatch('ui/changeTheme')"
- )
+ .mdi.mdi-palette.cursor-pointer.text-skin-item-base-down.text-xl.hocus_text-skin-item-base-up(
+ @click="$store.dispatch('ui/changeTheme')"
+ )
- .pt-2.pb-8
- LayoutSidebarMenu
+ .pt-2.pb-8
+ LayoutSidebarMenu
- .pb-12
- WalletsTotal
- WalletsList(
- :limit="6"
- showToogle
- uiSimple
- @onClick="id => $router.push(`/wallets/${id}`)"
- )
-</template>
+ .pb-12
+ WalletsTotal
+
+ WalletsList(
+ :limit="6"
+ isShowToogle
+ @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(
+ v-for="(walletItem, walletId) in walletsItemsLimited"
+ :key="walletId"
+ @click="$router.push(`/wallets/${walletId}`)"
+ )
+ .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(
+ :style="{ background: walletItem.color }"
+ class="mt-[2px]"
+ ) {{ walletItem.name.substring(0, 2) }}
+ //- Name
+ .grow.text-sm.text-skin-item-base {{ walletItem.name }}
-<style lang="stylus" scoped>
-.sidebar
- display grid
- grid-template-columns 1fr
- grid-template-rows minmax(auto, auto) 1fr
- height 100vh
- min-width 280px
+ //- Amount
+ Amount(
+ :currency="walletItem.currency"
+ :value="walletItem.amount"
+ :showBase="false"
+ alwaysShowSymbol
+ vertical="right"
+ )
- &__content
- scrollbar()
- overflow hidden
- overflow-y auto
- height 100%
- padding-bottom $m9
-</style>
+ template(#toogle="{ stateLimit, limit, toogle }")
+ .cursor-pointer.py-3.px-3.text-xs.text-center.hocus_text-skin-item-base-up.hocus_bg-skin-item-main-hover(
+ @click="toogle"
+ )
+ template(v-if="stateLimit > 0") {{ $t('wallets.showAll') }}
+ template(v-else-if="stateLimit !== limit") {{ $t('wallets.showOnly') }} {{ limit }}
+</template>
diff --git a/components/shared/button/Button.vue b/components/shared/button/Button.vue
index 5c78234a..ed02077b 100644
--- a/components/shared/button/Button.vue
+++ b/components/shared/button/Button.vue
@@ -88,10 +88,6 @@ export default defineComponent({
border-radius $m3
anim-background()
- // +media-laptop()
- // padding 12px 20px
- // font-size 14px
-
+media-hover()
color var(--c-font-1)
background var(--c-bg-6)
@@ -150,11 +146,6 @@ export default defineComponent({
max-width 220px
margin 0 auto
- // @media $media-laptop
- // display inline-flex
- // width auto
- // margin 0
-
&._center
align-items center
justify-content center
diff --git a/components/stat/Index.vue b/components/stat/Index.vue
index 675cfd00..3752d406 100644
--- a/components/stat/Index.vue
+++ b/components/stat/Index.vue
@@ -39,7 +39,7 @@ const isShowGroupTrns = computed(() => {
</script>
<template lang="pug">
-.overflow-hidden.overflow-y-auto.h-full.pb-8.js_scroll_page
+.overflow-y-auto.h-full.pb-8.js_scroll_page
.max-w-4xl.pb-6
StatPeriodArrows
StatDate
diff --git a/components/trnForm/TrnFormAmount.vue b/components/trnForm/Amount.vue
similarity index 100%
rename from components/trnForm/TrnFormAmount.vue
rename to components/trnForm/Amount.vue
diff --git a/components/trnForm/TrnFormCategories.vue b/components/trnForm/Categories.vue
similarity index 83%
rename from components/trnForm/TrnFormCategories.vue
rename to components/trnForm/Categories.vue
index 8fcbd3ee..6f48ddcd 100644
--- a/components/trnForm/TrnFormCategories.vue
+++ b/components/trnForm/Categories.vue
@@ -50,20 +50,25 @@ export default {
.scrollBlock.scrollerBlock(
v-if="$store.getters['categories/lastUsedCategoriesIdsByDate'] && $store.getters['categories/lastUsedCategoriesIdsByDate'].length > 0"
)
- .py-5.header {{ $t('categories.lastUsedTitle') }} {{ $t('categories.title') }}
+ .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl
+ | {{ $t('categories.lastUsedTitle') }} {{ $t('categories.title') }}
.pb-1.px-3
CategoriesList(
:activeItemId="$store.state.trnForm.values.categoryId"
:ids="$store.getters['categories/lastUsedCategoriesIdsByDate']"
+ class="!gap-x-1"
@onClick="handleCategoryClick"
)
.swiper-slide
.scrollBlock.scrollerBlock
- .py-5.header {{ $t('categories.title') }}
+ .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl
+ | {{ $t('categories.title') }}
.pb-1.px-3
CategoriesList(
+ :activeItemId="$store.state.trnForm.values.categoryId"
:ids="$store.getters['categories/categoriesRootIds']"
+ class="!gap-x-1"
@onClick="handleCategoryClick"
)
@@ -71,11 +76,13 @@ export default {
.scrollBlock.scrollerBlock(
v-if="$store.getters['categories/quickSelectorCategoriesIds'] && $store.getters['categories/quickSelectorCategoriesIds'].length"
)
- .py-5.header {{ $t('categories.favoriteTitle') }} {{ $t('categories.title') }}
+ .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl
+ | {{ $t('categories.favoriteTitle') }} {{ $t('categories.title') }}
.pb-1.px-3
CategoriesList(
:activeItemId="$store.state.trnForm.values.categoryId"
:ids="$store.getters['categories/quickSelectorCategoriesIds']"
+ class="!gap-x-1"
@onClick="handleCategoryClick"
)
@@ -122,13 +129,4 @@ export default {
+media-laptop()
align-items center
-
-.header
- font-h1()
- font-size 22px
- font-weight 600
- text-align center
-
- +media-laptop()
- font-size 28px
</style>
diff --git a/components/trnForm/TrnFormDate.vue b/components/trnForm/Date.vue
similarity index 85%
rename from components/trnForm/TrnFormDate.vue
rename to components/trnForm/Date.vue
index 3e5203b9..ea529d7a 100644
--- a/components/trnForm/TrnFormDate.vue
+++ b/components/trnForm/Date.vue
@@ -32,16 +32,18 @@ export default {
<template lang="pug">
.trnFormDate.pb-2.px-4
- .shame1._arrow(@click="setPrevDay()"): .mdi.mdi-chevron-left
+ .shame1._arrow.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(
+ @click="setPrevDay()"
+ ): .mdi.mdi-chevron-left
- .trnFormDate__item._date(
+ .cursor-pointer.py-2.px-3.flex-center.rounded-md.text-center.text-sm.leading-none.hocus_bg-skin-item-main-hover(
v-html="formatedDate"
@click="$store.commit('trnForm/showTrnFormModal', 'calendar')"
)
.flex
- .shame1._arrow(
- :class="{ 'opacity-30 cursor-default' : isToday }"
+ .shame1._arrow.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(
+ :class="{ 'opacity-30 !cursor-default' : isToday }"
@click="setNextDay()"
): .mdi.mdi-chevron-right
</template>
@@ -64,10 +66,6 @@ export default {
user-select none
anim(100ms)
- +media-hover()
- background var(--c-bg-7)
- border 1px solid var(--c-bg-8)
-
.trnFormDate
display grid
height 100%
@@ -92,10 +90,6 @@ export default {
width 58px
height 58px
- +media-hover()
- background var(--c-item-bg-hover)
- border 1px solid var(--c-item-bd-hover)
-
&._date
display flex
padding 0
diff --git a/components/trnForm/ModalWallets.vue b/components/trnForm/ModalWallets.vue
new file mode 100644
index 00000000..d49acffc
--- /dev/null
+++ b/components/trnForm/ModalWallets.vue
@@ -0,0 +1,58 @@
+<script setup lang="ts">
+import { useWindowSize } from '@vueuse/core'
+const { height } = useWindowSize()
+
+defineProps<{
+ title: string
+}>()
+
+const emit = defineEmits(['click', 'closed'])
+
+function onClickWallet(walletId, close) {
+ emit('click', walletId)
+ close()
+}
+</script>
+
+<template lang="pug">
+BaseBottomSheet(
+ :maxHeight="height"
+ insideClass="sm_rounded-b-2xl bg-skin-layout-main"
+ @closed="emit('closed')"
+)
+ template(#handler="{ close }")
+ BaseBottomSheetHandler
+ BaseBottomSheetClose(@onClick="close")
+
+ template(#header)
+ .py-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold.bg-skin-layout-main.rounded-t-2xl
+ | {{ title }}
+
+ template(#default="{ close }")
+ WalletsList(#default="{ walletsItemsSorted }")
+ .pb-3.px-3.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(
+ v-for="(walletItem, walletId) in walletsItemsSorted"
+ :key="walletId"
+ @click="onClickWallet(walletId, close)"
+ )
+ .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(
+ :style="{ background: walletItem.color }"
+ class="mt-[2px]"
+ ) {{ walletItem.name.substring(0, 2) }}
+ //- Name
+ .grow.text-sm.text-skin-item-base {{ walletItem.name }}
+
+ //- Amount
+ Amount(
+ :currency="walletItem.currency"
+ :value="walletItem.amount"
+ alwaysShowSymbol
+ showBase
+ vertical="right"
+ )
+</template>
diff --git a/components/trnForm/Modals.vue b/components/trnForm/Modals.vue
new file mode 100644
index 00000000..fcf0020f
--- /dev/null
+++ b/components/trnForm/Modals.vue
@@ -0,0 +1,26 @@
+<template lang="pug">
+div
+ //- Transaction
+ TrnFormModalWallets(
+ v-if="$store.state.trnForm.modal.wallets"
+ :title="$t('wallets.title')"
+ @click="walletId => $store.commit('trnForm/setTrnFormValues', { walletId })"
+ @closed="$store.commit('trnForm/closeTrnFormModal', 'wallets')"
+ )
+
+ //- Transfer: expense
+ TrnFormModalWallets(
+ v-if="$store.state.trnForm.modal.transferFrom"
+ :title="$t('trnForm.transfer.fromLong')"
+ @click="walletId => $store.commit('trnForm/setTrnFormValues', { expenseWalletId: walletId })"
+ @closed="$store.commit('trnForm/closeTrnFormModal', 'transferFrom')"
+ )
+
+ //- Transfer: income
+ TrnFormModalWallets(
+ v-if="$store.state.trnForm.modal.transferTo"
+ :title="$t('trnForm.transfer.toLong')"
+ @click="walletId => $store.commit('trnForm/setTrnFormValues', { incomeWalletId: walletId })"
+ @closed="$store.commit('trnForm/closeTrnFormModal', 'transferTo')"
+ )
+</template>
diff --git a/components/trnForm/Selected.vue b/components/trnForm/Selected.vue
new file mode 100644
index 00000000..ab0cf121
--- /dev/null
+++ b/components/trnForm/Selected.vue
@@ -0,0 +1,11 @@
+<template lang="pug">
+.px-3.pb-6.grid.grid-cols-2.gap-3(
+ v-show="$store.state.trnForm.values.amountType !== 2"
+)
+ TrnFormSelectedWallet(
+ :walletId="$store.state.trnForm.values.walletId"
+ @click="$store.commit('trnForm/showTrnFormModal', 'wallets')"
+ )
+
+ TrnFormSelectedCategory
+</template>
diff --git a/components/trnForm/SelectedCategory.vue b/components/trnForm/SelectedCategory.vue
new file mode 100644
index 00000000..a75bc711
--- /dev/null
+++ b/components/trnForm/SelectedCategory.vue
@@ -0,0 +1,36 @@
+<script>
+export default {
+ // TODO: add check for valid category
+
+ computed: {
+ category() {
+ const categoryId = this.$store.state.trnForm.values.categoryId
+ return this.$store.state.categories.items[categoryId]
+ },
+
+ parentCategory() {
+ return this.$store.state.categories.items[this.category.parentId]
+ },
+ },
+}
+</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(
+ v-if="category"
+ @click="$store.commit('trnForm/showTrnFormModal', 'categories')"
+)
+ .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(
+ v-if="parentCategory"
+ class="dark_text-neutral-400"
+ ) {{ 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
+</template>
diff --git a/components/trnForm/TrnFormHeaderTransfer.vue b/components/trnForm/SelectedTransfer.vue
similarity index 56%
rename from components/trnForm/TrnFormHeaderTransfer.vue
rename to components/trnForm/SelectedTransfer.vue
index 54204cbe..6f3d267b 100644
--- a/components/trnForm/TrnFormHeaderTransfer.vue
+++ b/components/trnForm/SelectedTransfer.vue
@@ -43,29 +43,14 @@ div(v-if="$store.getters['wallets/walletsSortedIds'].length > 1")
//- isSameCurency
template(v-if="!isSameCurency")
.pb-8.px-4.grid.gap-6(class="grid-cols-[1fr_auto]")
- .grid.gap-4
+ .grid.gap-6
div
.opacity-80.pb-1.text-xs.leading-none {{ $t('trnForm.transfer.fromLong') }}
- .overflow-hidden.rounded-xl.bg-custom4
- .flex.items-center.gap-4.py-4.px-4.hocus_bg-gray-100.dark_hocus_bg-neutral-800.rounded-xl(
+ .overflow-hidden.rounded-xl.bg-skin-layout-main-up
+ TrnFormSelectedWallet(
+ :walletId="expenseWalletId"
@click="$store.commit('trnForm/showTrnFormModal', 'transferFrom')"
)
- .rounded-full.w-8.h-8.flex-center.text-xs.text-neutral-50(
- :style="{ background: expenseWallet.color }"
- ) {{ expenseWallet.currency }}
-
- .grow.text-neutral-300
- .text-base.leading-none {{ expenseWallet.name }}
- Amount(
- :currency="expenseWallet.currency"
- :showBase="showBase"
- :size="size"
- :value="expenseWalletTotal"
- vertical="left"
- alwaysShowSymbol
- )
-
- .mdi.mdi-dots-vertical.text-xl.leading-none
input.w-full.p-3.bg-transparent.text-3xl.text-center.font-unica.text-expense.focus_bg-neutral-800(
:value="$store.state.trnForm.values.expenseAmount"
@@ -75,26 +60,11 @@ div(v-if="$store.getters['wallets/walletsSortedIds'].length > 1")
div
.opacity-80.pb-2.text-xs.leading-none {{ $t('trnForm.transfer.toLong') }}
- .overflow-hidden.rounded-xl.bg-custom4
- .flex.items-center.gap-4.py-4.px-4.hocus_bg-gray-100.dark_hocus_bg-neutral-800.rounded-xl(
+ .overflow-hidden.rounded-xl.bg-skin-layout-main-up
+ TrnFormSelectedWallet(
+ :walletId="incomeWalletId"
@click="$store.commit('trnForm/showTrnFormModal', 'transferTo')"
)
- .rounded-full.w-8.h-8.flex-center.text-xs.text-neutral-50(
- :style="{ background: incomeWallet.color }"
- ) {{ incomeWallet.currency }}
-
- .grow.text-neutral-300
- .text-base.leading-none {{ incomeWallet.name }}
- Amount(
- :currency="incomeWallet.currency"
- :showBase="showBase"
- :size="size"
- :value="incomeWalletTotal"
- vertical="left"
- alwaysShowSymbol
- )
-
- .mdi.mdi-dots-vertical.text-xl.leading-none
input.w-full.p-3.bg-transparent.text-3xl.text-center.font-unica.text-income.focus_bg-neutral-800(
:value="$store.state.trnForm.values.incomeAmount"
@@ -102,6 +72,7 @@ div(v-if="$store.getters['wallets/walletsSortedIds'].length > 1")
@input="event => changeAmount('income', event)"
)
+ //- Right
.grid.gap-2(class="grid-rows-[auto,1fr]")
.p-3.text-center.rounded-full.opacity-80.hocus_bg-neutral-700(
:class="['h-[58px]', { 'text-blue1': $store.state.trnForm.values.description }]"
@@ -117,40 +88,23 @@ div(v-if="$store.getters['wallets/walletsSortedIds'].length > 1")
//- Same
.relative.px-3.pb-6.grid.grid-cols-2.gap-3(v-if="isSameCurency")
- //- Wallet from
- template(v-if="expenseWallet")
- .trnFormHeaderItem
- .text-xs.text-neutral-400.pb-1 {{ $t('trnForm.transfer.fromLong') }}
- WalletsItemWalletItem(
- :id="expenseWalletId"
- :showBase="false"
- isAltColor
- ui="tile"
- @onClick="$store.commit('trnForm/showTrnFormModal', 'transferFrom')"
- )
-
- .trnFormHeaderSeparator: .mdi.mdi-chevron-right
-
- //- Wallet to
- template(v-if="incomeWallet")
- .trnFormHeaderItem
- .text-xs.text-neutral-400.pb-1 {{ $t('trnForm.transfer.toLong') }}
- WalletsItemWalletItem(
- :id="incomeWalletId"
- :showBase="false"
- isAltColor
- ui="tile"
- @onClick="$store.commit('trnForm/showTrnFormModal', 'transferTo')"
- )
+ //- Transfer expense
+ div(
+ v-if="expenseWallet"
+ @click="$store.commit('trnForm/showTrnFormModal', 'transferFrom')"
+ )
+ .text-xs.text-neutral-400.pb-1 {{ $t('trnForm.transfer.fromLong') }}
+ TrnFormSelectedWallet(:walletId="expenseWalletId")
+
+ .mdi.mdi-chevron-right.absolute.text-xl(
+ class="top-[30px] left-1/2 -translate-x-1/2"
+ )
+
+ //- Transfer income
+ .cursor-pointer(
+ v-if="incomeWallet"
+ @click="$store.commit('trnForm/showTrnFormModal', 'transferTo')"
+ )
+ .text-xs.text-neutral-400.pb-1 {{ $t('trnForm.transfer.toLong') }}
+ TrnFormSelectedWallet(:walletId="incomeWalletId")
</template>
-
-<style lang="stylus" scoped>
-.trnFormHeaderSeparator
- z-index 2
- position absolute
- top 28px
- left 50%
- color var(--c-font-3)
- font-size 32px
- transform translate(-50%)
-</style>
diff --git a/components/trnForm/SelectedWallet.vue b/components/trnForm/SelectedWallet.vue
new file mode 100644
index 00000000..ab68824f
--- /dev/null
+++ b/components/trnForm/SelectedWallet.vue
@@ -0,0 +1,40 @@
+<script setup lang="ts">
+import useWallets from '~/components/wallets/useWallets'
+
+const props = defineProps<{
+ walletId: string
+}>()
+const emit = defineEmits(['click'])
+
+const { walletsItemsSorted } = useWallets()
+const wallet = computed(() => walletsItemsSorted.value[props.walletId])
+</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(
+ v-if="wallet"
+ @click="emit('click')"
+)
+ .grow
+ .flex-center.gap-x-3
+ //- Icon
+ .w-6.h-6.rounded-md.flex-center.text-skin-icon-base.text-xs.leading-none(
+ :style="{ background: wallet.color }"
+ class="mt-[2px]"
+ ) {{ wallet.name.substring(0, 2) }}
+
+ .grow
+ //- Name
+ .grow.text-sm.text-skin-item-base {{ wallet.name }}
+
+ //- Amount
+ Amount(
+ :currency="wallet.currency"
+ :value="wallet.amount"
+ :showBase="false"
+ alwaysShowSymbol
+ vertical="left"
+ )
+
+ .mdi.mdi-dots-vertical.-mr-1.text-lg.text-skin-item-base-down
+</template>
diff --git a/components/trnForm/TrnForm.vue b/components/trnForm/TrnForm.vue
index b3fcccc1..7b95f304 100644
--- a/components/trnForm/TrnForm.vue
+++ b/components/trnForm/TrnForm.vue
@@ -224,8 +224,8 @@ function handleSubmitForm() {
v-if="!isTransfer || isTransfer && isSameCurency"
@onSubmit="handleSubmitForm"
)
- TrnFormHeader
- LazyTrnFormHeaderTransfer(
+ TrnFormSelected
+ TrnFormSelectedTransfer(
v-if="isTransfer"
@onSubmit="handleSubmitForm"
)
@@ -236,16 +236,36 @@ function handleSubmitForm() {
//- Wallets
.pt-5.pb-7
.subTitle.text-center.pb-2.text-xs {{ $t('wallets.title') }}
- .pb-3.px-3
- WalletsList3(
- :activeItemId="$store.state.trnForm.values.walletId"
- :limit="4"
- :showBase="false"
- @onClick="onClickWallet"
- )
+
+ WalletsList(#default="{ walletsItemsSorted }")
+ .px-3.grid.gap-y-1.gap-x-1.3sm_grid-cols-2
+ //- Wallet
+ .cursor-pointer.relative.flex.items-center.py-2.px-3.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(
+ v-for="(walletItem, walletId) in walletsItemsSorted"
+ :key="walletId"
+ :class="[{ 'cursor-default bg-skin-item-main-active': $store.state.trnForm.values.walletId === walletId }]"
+ @click="onClickWallet(walletId)"
+ )
+ .grow.flex-center.gap-x-3
+ //- Icon
+ .w-6.h-6.rounded-md.flex-center.text-skin-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 }}
+
+ //- Amount
+ Amount(
+ :currency="walletItem.currency"
+ :value="walletItem.amount"
+ alwaysShowSymbol
+ showBase
+ vertical="right"
+ )
//- Favorite categories
- .pb-7
+ .pb-7(v-if="$store.getters['categories/quickSelectorCategoriesIds'] && $store.getters['categories/quickSelectorCategoriesIds'].length > 0")
.subTitle.text-center.pb-2.text-xs {{ $t('categories.favoriteTitle') }} {{ $t('categories.title') }}
.px-3
CategoriesList(
@@ -253,6 +273,7 @@ function handleSubmitForm() {
:ids="$store.getters['categories/quickSelectorCategoriesIds']"
:activeItemId="$store.state.trnForm.values.categoryId"
:slider="sliderObj"
+ class="!gap-x-1"
@onClick="onCategoryClick"
)
@@ -265,6 +286,7 @@ function handleSubmitForm() {
:ids="$store.getters['categories/lastUsedCategoriesIdsByDate']"
:activeItemId="$store.state.trnForm.values.categoryId"
:slider="sliderObj"
+ class="!gap-x-1"
@onClick="onCategoryClick"
)
@@ -285,22 +307,15 @@ function handleSubmitForm() {
//- Modals
Portal(to="modal")
+ TrnFormModals
+
TrnFormModalCalendar(v-if="$store.state.trnForm.modal.calendar")
TrnFormModalCats(v-if="$store.state.trnForm.modal.categories")
TrnFormModalCatsChild(v-if="$store.state.trnForm.modal.categoriesChild")
TrnFormModalDescription(v-if="$store.state.trnForm.modal.description")
- TrnFormModalTransferFrom(v-if="$store.state.trnForm.modal.transferFrom")
- TrnFormModalTransferTo(v-if="$store.state.trnForm.modal.transferTo")
- TrnFormModalWallets(v-if="$store.state.trnForm.modal.wallets")
</template>
<style lang="stylus">
-.trnFormWalletsList .wallets__grid
-.trnForm .wallets__grid
- grid-template-columns repeat(2, 1fr) !important
- grid-column-gap $m6 !important
- grid-row-gap $m6 !important
-
.trnForm
&__pagination
z-index 2
diff --git a/components/trnForm/TrnFormHeader.vue b/components/trnForm/TrnFormHeader.vue
deleted file mode 100644
index cd593d94..00000000
--- a/components/trnForm/TrnFormHeader.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-<script>
-export default {
- name: 'TrnFormHeader',
-}
-</script>
-
-<template lang="pug">
-.px-3.pb-6.grid.grid-cols-2.gap-3(
- v-show="$store.state.trnForm.values.amountType !== 2"
-)
- TrnFormHeaderItemWallet
- TrnFormHeaderItemCategory
-</template>
-
-<style lang="stylus">
-.trnFormHeaderItem
- cursor pointer
- position relative
- flex-grow 1
- color var(--c-bg-5)
- border-radius $m5
- anim()
-
- &__dots
- position absolute
- top $m6
- right $m4
- color var(--c-font-2)
- font-size 16px
-
- /.light &
- color var(--c-item-stat-icon)
-</style>
diff --git a/components/trnForm/TrnFormHeaderItemCategory.vue b/components/trnForm/TrnFormHeaderItemCategory.vue
deleted file mode 100644
index 54d46181..00000000
--- a/components/trnForm/TrnFormHeaderItemCategory.vue
+++ /dev/null
@@ -1,67 +0,0 @@
-<script>
-export default {
- // TODO: add check for valid category
-
- computed: {
- category() {
- const categoryId = this.$store.state.trnForm.values.categoryId
- return this.$store.state.categories.items[categoryId]
- },
-
- parentCategory() {
- return this.$store.state.categories.items[this.category.parentId]
- },
- },
-}
-</script>
-
-<template lang="pug">
-.trnFormHeaderItem._category.gap-x-3.flex(
- v-if="category"
- @click="$store.commit('trnForm/showTrnFormModal', 'categories')"
-)
- transition(name="slide2")
- .text-neutral-50.text-xl.leading-none.w-8.h-8.rounded-full.justify-center.items-center.flex(
- :style="{ background: category.color }"
- @click.stop="handleIconClick"
- ): div(:class="category.icon")
-
- .trnFormHeaderItem__name
- .text-xs.text-neutral-500(
- v-if="parentCategory"
- class="dark_text-neutral-400"
- ) {{ parentCategory.name }}
- .text-sm.text-neutral-700(class="dark_text-neutral-300") {{ category.name }}
-
- .trnFormHeaderItem__dots.text-neutral-500.dark_text-neutral-400(
- ): .mdi.mdi-dots-vertical
-</template>
-
-<style lang="stylus" scoped>
-.trnFormHeaderItem
- +media-hover()
- transform scale(1.04)
-
- &._category
- display flex
- align-items center
- padding $m5 $m6
- background var(--c-item-bg-main)
-
- .trnFormHeaderItem__icon
- padding-right $m4
-
- .trnFormHeaderItem__name
- flex-grow 1
- color var(--c-font-1)
- text-align left
-
- .parent
- opacity .8
- padding-bottom $m2
- color var(--c-font-1)
- font-size 12px
-
- .child
- font-size 16px
-</style>
diff --git a/components/trnForm/TrnFormHeaderItemWallet.vue b/components/trnForm/TrnFormHeaderItemWallet.vue
deleted file mode 100644
index 62932016..00000000
--- a/components/trnForm/TrnFormHeaderItemWallet.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-<script>
-// TODO: add check for valid wallet
-export default {
- name: 'TrnFormHeaderItemWallet',
-
- computed: {
- wallet() {
- const walletId = this.$store.state.trnForm.values.walletId
- return this.$store.state.wallets.items[walletId]
- },
- },
-}
-</script>
-
-<template lang="pug">
-.trnFormHeaderItem(
- v-if="wallet"
- @click="$store.commit('trnForm/showTrnFormModal', 'wallets')"
-)
- WalletsItemWalletItem(
- :id="$store.state.trnForm.values.walletId"
- :showBase="false"
- )
-
- .trnFormHeaderItem__dots.text-neutral-500(
- class="dark_text-neutral-400"
- ): .mdi.mdi-dots-vertical
-</template>
-
-<style lang="stylus" scoped>
-.trnFormHeaderItem
- +media-hover()
- transform scale(1.04)
-
- .walletItemGrid
- width 100%
-</style>
diff --git a/components/trnForm/TrnFormTrns.vue b/components/trnForm/Trns.vue
similarity index 100%
rename from components/trnForm/TrnFormTrns.vue
rename to components/trnForm/Trns.vue
diff --git a/components/trnForm/TrnFormTypes.vue b/components/trnForm/Types.vue
similarity index 98%
rename from components/trnForm/TrnFormTypes.vue
rename to components/trnForm/Types.vue
index ff08ea93..504277f5 100644
--- a/components/trnForm/TrnFormTypes.vue
+++ b/components/trnForm/Types.vue
@@ -1,7 +1,5 @@
<script>
export default {
- name: 'TrnFormTypes',
-
setup() {
const { $store } = useNuxtApp()
diff --git a/components/trnForm/modal/TrnFormModal.vue b/components/trnForm/modal/TrnFormModal.vue
index 006333d1..0d290caf 100644
--- a/components/trnForm/modal/TrnFormModal.vue
+++ b/components/trnForm/modal/TrnFormModal.vue
@@ -1,58 +1,32 @@
-<script lang="ts">
-export default defineComponent({
- setup() {
- const documentHeight = ref('100%')
- onMounted(() => {
- documentHeight.value = `${document.documentElement.clientHeight}px`
- })
- return {
- documentHeight,
- }
- },
-})
+<script setup lang="ts">
+import { useWindowSize } from '@vueuse/core'
+const { height } = useWindowSize()
</script>
<template lang="pug">
Portal(to="modal")
BaseBottomSheet(
+ insideClass="sm_rounded-b-2xl bg-skin-layout-main"
show
+ :maxHeight="height"
@closed="$emit('closed')"
)
template(#handler="{ close }")
- .handler
+ BaseBottomSheetHandler
BaseBottomSheetClose(@onClick="close")
- template(#default="{ close }")
- .content(
- :class="{ _withHeader: $slots.header }"
- :style="{ maxHeight: documentHeight }"
- )
- .header(v-if="$slots.header")
- slot(name="header")
+ template(
+ 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")
- slot(name="default" :close="close")
+ template(#default="{ close }")
+ slot(name="default" :close="close")
</template>
<style lang="stylus" scoped>
-.handler
- z-index 2
- position absolute
- top 0
- left 0
- display flex
- align-items center
- justify-content center
- width 100%
- height 16px
-
- &:after
- content ''
- display block
- width 32px
- height 4px
- background var(--c-bg-8)
- border-radius 4px
-
.content
overflow hidden
display grid
@@ -62,24 +36,4 @@ Portal(to="modal")
+media(600px)
border-radius 16px
-
- &._withHeader
- grid-template-rows minmax(min-content, auto) minmax(50px, min-content)
-
-.header
- position relative
- display flex
- align-items center
- justify-content center
- padding $m7
- padding-top $m4
- padding-bottom $m8
- color var(--c-font-3)
- font-size 22px
- font-weight 700
- letter-spacing 1px
- fontFamilyNunito()
-
- /.light &
- color var(--c-font-4)
</style>
diff --git a/components/trnForm/modal/TrnFormModalCatsChild.vue b/components/trnForm/modal/TrnFormModalCatsChild.vue
index 6ede6e7e..65167e60 100644
--- a/components/trnForm/modal/TrnFormModalCatsChild.vue
+++ b/components/trnForm/modal/TrnFormModalCatsChild.vue
@@ -43,14 +43,10 @@ TrnFormModal(@closed="afterClose")
template(#default="{ close }")
template(v-if="id && category")
- .pb_base
+ .pb-3.px-3
CategoriesList(
:ids="childCategoriesIds"
+ class="!gap-x-1"
@onClick="catId => handleCategoryClick(catId, close)"
)
</template>
-
-<style lang="stylus">
-.pb_base
- padding-bottom 16px
-</style>
diff --git a/components/trnForm/modal/TrnFormModalDescription.vue b/components/trnForm/modal/TrnFormModalDescription.vue
index e07d7d74..223dd312 100644
--- a/components/trnForm/modal/TrnFormModalDescription.vue
+++ b/components/trnForm/modal/TrnFormModalDescription.vue
@@ -45,54 +45,20 @@ TrnFormModal(@closed="afterClose")
template {{ $t('trnForm.description.title') }}
template(#default="{ close }")
- .p-4.pb-2
- .relative.pb-6
- textarea.textarea.rounded-md(
- v-model="description"
- :placeholder="$t('trnForm.description.placeholder')"
- )
+ .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(
+ v-model="description"
+ :placeholder="$t('trnForm.description.placeholder')"
+ )
- .gap-4.items-center.justify-end.flex
- .text-neutral-500.py-4.px-3.items-center.justify-center.flex(
- class="dark_text-neutral-400"
- @click="handleCancel(close)"
- ) {{ $t('close') }}
- .shame1.py-4.px-6.rounded-full.items-center.justify-center.flex(
- class="min-w-[120px]"
- @click="handleSave(close)"
- ) {{ $t('base.save') }}
-</template>
-
-<style lang="stylus" scoped>
-.shame1
- background var(--c-blue-3)
- media-hover()
- background var(--c-blue-3)
-
-.textarea
- width 100%
- min-height 100px
- padding $m7
- color var(--color-white)
- font-size 16px
- background var(--c-bg-2)
- border 1px solid var(--c-bg-5)
- anim()
+ .pb-4.px-3.flex.justify-evenly.gap-6
+ .cursor-pointer.grow.py-3.px-5.flex-center.rounded-full.text-skin-item-base-down.text-sm.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(
+ class="basis-1/2 max-w-[280px]"
+ @click="handleCancel(close)"
+ ) {{ $t('close') }}
- &:focus
- border-color var(--c-blue-1)
-
-.textarea
- width 100%
- min-height 100px
- padding $m7
- color var(--color-white)
- font-size 16px
- background var(--c-bg-2)
- border 1px solid var(--c-bg-5)
- border-radius $borderRadiusMd
- anim()
-
- &:focus
- border-color var(--c-blue-1)
-</style>
+ .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(
+ class="basis-1/2 max-w-[280px]"
+ @click="handleSave(close)"
+ ) {{ $t('base.save') }}
+</template>
diff --git a/components/trnForm/modal/TrnFormModalTransferFrom.vue b/components/trnForm/modal/TrnFormModalTransferFrom.vue
deleted file mode 100644
index 85c4cd2e..00000000
--- a/components/trnForm/modal/TrnFormModalTransferFrom.vue
+++ /dev/null
@@ -1,44 +0,0 @@
-<script setup lang="ts">
-import { useWindowSize } from '@vueuse/core'
-
-const { $store } = useNuxtApp()
-const { height } = useWindowSize()
-
-function onClickWallet(walletId, close) {
- $store.commit('trnForm/setTrnFormValues', { expenseWalletId: walletId })
- close()
-}
-
-function closed() {
- $store.commit('trnForm/closeTrnFormModal', 'transferFrom')
-}
-</script>
-
-<template lang="pug">
-BaseBottomSheet(
- :maxHeight="height"
- insideClass="rounded-t-2xl bg-skin-layout-main"
- @closed="closed"
-)
- template(#handler="{ close }")
- BaseBottomSheetHandler
- BaseBottomSheetClose(@onClick="close")
-
- template(#default="{ close }")
- .subTitle.pt-6.text-center.text-xs {{ $t('transfer') }}
- .pt-3.pb-3.px-3
- WalletsList3(
- @onClick="walletId => onClickWallet(walletId, close)"
- )
-</template>
-
-<i18n lang="json5">
-{
- "en": {
- "transfer": "Transfer from wallet",
- },
- "ru": {
- "transfer": "Перевод из кошелька",
- },
-}
-</i18n>
diff --git a/components/trnForm/modal/TrnFormModalTransferTo.vue b/components/trnForm/modal/TrnFormModalTransferTo.vue
deleted file mode 100644
index 3251c613..00000000
--- a/components/trnForm/modal/TrnFormModalTransferTo.vue
+++ /dev/null
@@ -1,44 +0,0 @@
-<script setup lang="ts">
-import { useWindowSize } from '@vueuse/core'
-
-const { $store } = useNuxtApp()
-const { height } = useWindowSize()
-
-function onClickWallet(walletId, close) {
- $store.commit('trnForm/setTrnFormValues', { incomeWalletId: walletId })
- close()
-}
-
-function closed() {
- $store.commit('trnForm/closeTrnFormModal', 'transferTo')
-}
-</script>
-
-<template lang="pug">
-BaseBottomSheet(
- :maxHeight="height"
- insideClass="rounded-t-2xl bg-skin-layout-main"
- @closed="closed"
-)
- template(#handler="{ close }")
- BaseBottomSheetHandler
- BaseBottomSheetClose(@onClick="close")
-
- template(#default="{ close }")
- .subTitle.pt-6.text-center.text-xs {{ $t('transfer') }}
- .pt-3.pb-3.px-3
- WalletsList3(
- @onClick="walletId => onClickWallet(walletId, close)"
- )
-</template>
-
-<i18n lang="json5">
-{
- "en": {
- "transfer": "Transfer to wallet",
- },
- "ru": {
- "transfer": "Перевод в кошелек",
- },
-}
-</i18n>
diff --git a/components/trnForm/modal/TrnFormModalWallets.vue b/components/trnForm/modal/TrnFormModalWallets.vue
deleted file mode 100644
index 55920223..00000000
--- a/components/trnForm/modal/TrnFormModalWallets.vue
+++ /dev/null
@@ -1,34 +0,0 @@
-<script setup lang="ts">
-import { useWindowSize } from '@vueuse/core'
-
-const { $store } = useNuxtApp()
-const { height } = useWindowSize()
-
-function onClickWallet(walletId, close) {
- $store.commit('trnForm/setTrnFormValues', { walletId })
- close()
-}
-
-function closed() {
- $store.commit('trnForm/closeTrnFormModal', 'wallets')
-}
-</script>
-
-<template lang="pug">
-BaseBottomSheet(
- :maxHeight="height"
- insideClass="rounded-t-2xl bg-skin-layout-main"
- @closed="closed"
-)
- template(#handler="{ close }")
- BaseBottomSheetHandler
- BaseBottomSheetClose(@onClick="close")
-
- template(#default="{ close }")
- .pt-6.pb-3.px-3
- WalletsList3(
- :activeItemId="$store.state.trnForm.values.walletId"
- :showBase="false"
- @onClick="walletId => onClickWallet(walletId, close)"
- )
-</template>
diff --git a/components/trns/History.vue b/components/trns/History.vue
index 8395faa1..618e418a 100644
--- a/components/trns/History.vue
+++ b/components/trns/History.vue
@@ -3,13 +3,11 @@ import type { TrnID } from '~/components/trns/types'
type TrnType = null | 0 | 1 | 2
-interface Props {
+const props = withDefaults(defineProps<{
hideTransfers?: boolean
trnsIds: TrnID[]
trnType: TrnType
-}
-
-const props = withDefaults(defineProps<Props>(), {
+}>(), {
hideTransfers: false,
})
diff --git a/components/trns/item/TrnItem.vue b/components/trns/item/TrnItem.vue
index 534d965b..5b1eaad9 100644
--- a/components/trns/item/TrnItem.vue
+++ b/components/trns/item/TrnItem.vue
@@ -72,13 +72,13 @@ export default {
.trnItem__categoryName {{ $t('trnForm.transferTitle') }}
.trnItem__date {{ formatedDate }}
.trnItem__wallet
- WalletsItemWalletItem(
+ WalletsItem(
:id="trn.expenseWalletId"
isAltColor
ui="tile"
)
.trnFormHeaderSeparator: .mdi.mdi-chevron-right
- WalletsItemWalletItem(
+ WalletsItem(
:id="trn.incomeWalletId"
isAltColor
ui="tile"
@@ -118,13 +118,13 @@ export default {
.trnItem__categoryName {{ $t('trnForm.transferTitle') }}
.trnItem__date {{ formatedDate }}
.trnItem__wallet
- WalletsItemWalletItem(
+ WalletsItem(
:id="trn.walletFromId"
isAltColor
ui="tile"
)
.trnFormHeaderSeparator: .mdi.mdi-chevron-right
- WalletsItemWalletItem(
+ WalletsItem(
:id="trn.walletToId"
isAltColor
ui="tile"
diff --git a/components/wallets/Delete.vue b/components/wallets/Delete.vue
index c293f7c6..fdda1db0 100644
--- a/components/wallets/Delete.vue
+++ b/components/wallets/Delete.vue
@@ -4,10 +4,9 @@ import { random, successEmo } from '~/assets/js/emo'
import { removeData } from '~/services/firebase/api'
import type { WalletID } from '~/components/wallets/types'
-interface Props {
+const props = defineProps<{
walletId: WalletID
-}
-const props = defineProps<Props>()
+}>()
const { walletId } = toRefs(props)
const { $store, $notify } = useNuxtApp()
diff --git a/components/wallets/Form.vue b/components/wallets/Form.vue
index f85afe43..32d6ba9e 100644
--- a/components/wallets/Form.vue
+++ b/components/wallets/Form.vue
@@ -1,14 +1,13 @@
<script setup lang="ts">
import { allColors, popularColors } from '~/assets/js/colorsPopular'
-interface Props {
+const props = defineProps<{
walletForm: {
name: string
color: string
currency: string
}
-}
-const props = defineProps<Props>()
+}>()
const { walletForm } = toRefs(props)
const emit = defineEmits(['updateValue', 'onSave'])
diff --git a/components/wallets/FormWelcome.vue b/components/wallets/FormWelcome.vue
index 1edd4ead..7f70b40f 100644
--- a/components/wallets/FormWelcome.vue
+++ b/components/wallets/FormWelcome.vue
@@ -3,10 +3,9 @@ import { popularColors } from '~/assets/js/colorsPopular'
import { random } from '~/assets/js/emo'
import generateId from '~/utils/id'
-interface Props {
+const props = defineProps<{
saved: Function
-}
-const props = defineProps<Props>()
+}>()
const { $store, $notify, nuxt2Context: { i18n } } = useNuxtApp()
diff --git a/components/wallets/item/WalletItem.vue b/components/wallets/Item.vue
similarity index 61%
rename from components/wallets/item/WalletItem.vue
rename to components/wallets/Item.vue
index e17885db..b5b56dfa 100644
--- a/components/wallets/item/WalletItem.vue
+++ b/components/wallets/Item.vue
@@ -19,19 +19,18 @@ export default defineComponent({
methods: {
handleClick() {
- if (this.$listeners.onClick)
- this.$listeners.onClick(this.id)
+ if (this.$listeners.onClick) this.$listeners.onClick(this.id)
},
},
})
</script>
<template lang="pug">
-.walletItemGrid.p-2.rounded-md(
+.p-2.rounded-md(
:class="{ _active: activeItemId === id }"
@click="handleClick"
)
- .walletItemGridActive(v-if="activeItemId === id")
+ div.bg-red-300.h-8(v-if="activeItemId === id")
.gap-x-3.flex
.text-neutral-50.text-xs.leading-none.w-6.h-6.rounded-md.justify-center.items-center.flex(
:style="{ background: wallet.color }"
@@ -42,36 +41,9 @@ export default defineComponent({
.text-sm.text-neutral-500(class="dark_text-neutral-400") {{ wallet.name }}
Amount(
:currency="wallet.currency"
- :showBase="showBase"
- :size="size"
:value="wallet.total"
- :vertical="vertical"
alwaysShowSymbol
+ showBase
+ vertical="right"
)
</template>
-
-<style lang="stylus">
-.sidebar .walletItemGrid
- background none
-
-.walletItemGrid
- cursor pointer
- position relative
- background var(--c-item-bg-main)
- anim()
-
- +media-hover()
- background var(--c-item-bg-hover)
-
-.walletItemGridActive
- position absolute
- top $m6
- right $m5
- display flex
- align-items center
- justify-content center
- width 8px
- height 8px
- background var(--c-blue-1)
- border-radius 50%
-</style>
diff --git a/components/wallets/item/Simple.vue b/components/wallets/ItemAlt.vue
similarity index 72%
rename from components/wallets/item/Simple.vue
rename to components/wallets/ItemAlt.vue
index 67c20098..00b1cd4a 100644
--- a/components/wallets/item/Simple.vue
+++ b/components/wallets/ItemAlt.vue
@@ -4,9 +4,6 @@ import useFilter from '~/modules/filter/useFilter'
export default defineComponent({
props: {
id: { type: String, required: true },
- showBase: { type: Boolean, default: true },
- vertical: { type: String, default: 'left' },
- size: { type: String, default: null },
activeItemId: { type: String, default: null },
},
@@ -35,8 +32,7 @@ export default defineComponent({
methods: {
handleClick() {
- if (this.$listeners.onClick)
- this.$listeners.onClick(this.id)
+ if (this.$listeners.onClick) this.$listeners.onClick(this.id)
},
},
})
@@ -44,26 +40,24 @@ export default defineComponent({
<template lang="pug">
.cursor-pointer.py-1.px-5.gap-x-3.flex.items-center.hocus_bg-gray-200.dark_hocus_bg-neutral-800.border-b.border-gray-200.dark_border-neutral-800(
- :class="[{ _active: activeItemId === id }, 'min-h-[48px]']"
+ :class="[{ _active: activeItemId === id }]"
@click="handleClick"
)
//- Icon
- .w-6.h-6.flex-center.rounded-md.text-neutral-50.text-xs.leading-none(
+ .w-6.h-6.flex-center.rounded-md.text-skin-icon-base.text-xs.leading-none(
:style="{ background: wallet.color }"
@click.stop="onClickFilterWallet"
) {{ wallet.name.substring(0, 2) }}
.grow
.py-1.items-center.flex
- .grow.text-xs.text-neutral-600(
- class="dark_text-neutral-400"
- ) {{ wallet.name }}
+ .grow.text-xs.text-skin-item-base-down
+ | {{ wallet.name }}
Amount(
:currency="wallet.currency"
:value="wallet.total"
alwaysShowSymbol
- showBase
vertical="right"
)
</template>
diff --git a/components/wallets/List.vue b/components/wallets/List.vue
new file mode 100644
index 00000000..f348286d
--- /dev/null
+++ b/components/wallets/List.vue
@@ -0,0 +1,63 @@
+<script setup lang="ts">
+import useWallets from '~/components/wallets/useWallets'
+
+const props = withDefaults(
+ defineProps<{
+ limit?: number
+ isShowToogle?: boolean
+ }>(),
+ {
+ limit: 0,
+ },
+)
+
+const stateLimit = ref(0)
+const { walletsIdsSorted, walletsItemsSorted } = useWallets()
+
+const walletsIdsLimited = computed(() => {
+ if (stateLimit.value !== 0)
+ return walletsIdsSorted.value.slice(0, stateLimit.value)
+ return walletsIdsSorted.value
+})
+
+const walletsItemsLimited = computed(() => {
+ if (stateLimit.value !== 0) {
+ let wallets = {}
+ for (const id of walletsIdsLimited.value) {
+ wallets = {
+ ...wallets,
+ [id]: walletsItemsSorted.value[id],
+ }
+ }
+ return wallets
+ }
+
+ return walletsItemsSorted.value
+})
+
+onMounted(() => {
+ stateLimit.value = props.limit
+})
+
+function toogle() {
+ stateLimit.value > 0 ? (stateLimit.value = 0) : (stateLimit.value = props.limit)
+}
+</script>
+
+<template lang="pug">
+div
+ slot(
+ :walletsIdsLimited="walletsIdsLimited"
+ :walletsIdsSorted="walletsIdsSorted"
+ :walletsItemsLimited="walletsItemsLimited"
+ :walletsItemsSorted="walletsItemsSorted"
+ )
+
+ slot(
+ v-if="isShowToogle && walletsIdsSorted.length > limit"
+ name="toogle"
+ :stateLimit="stateLimit"
+ :limit="limit"
+ :toogle="toogle"
+ )
+</template>
diff --git a/components/wallets/sort/WalletsSort.vue b/components/wallets/Sort.vue
similarity index 95%
rename from components/wallets/sort/WalletsSort.vue
rename to components/wallets/Sort.vue
index 41e0122e..98605f82 100644
--- a/components/wallets/sort/WalletsSort.vue
+++ b/components/wallets/Sort.vue
@@ -23,7 +23,10 @@ export default {
for (const [idx, walletId] of this.sortedWalletsIds.entries())
sortedWallets[walletId] = idx
- const result = await this.$store.dispatch('wallets/saveWalletsOrder', sortedWallets)
+ const result = await this.$store.dispatch(
+ 'wallets/saveWalletsOrder',
+ sortedWallets,
+ )
if (result.succsess) {
if (this.$listeners.closeModal) this.$listeners.closeModal()
this.$notify({
@@ -41,7 +44,7 @@ export default {
.h-full.overflow.overflow-x-auto.bg-skin-layout-main
//- Header
//-----------------------------------
- .pb-6.text-neutral-800.dark_text-white.text-2xl.font-semibold.font-nunito
+ .pb-4.px-3.text-center.text-skin-item-base.text-xl.font-nunito.font-semibold
| {{ $t('wallets.sortTitle') }}
//- Items
diff --git a/components/wallets/total/WalletsTotal.vue b/components/wallets/Total.vue
similarity index 100%
rename from components/wallets/total/WalletsTotal.vue
rename to components/wallets/Total.vue
diff --git a/components/wallets/total/WalletsTotalAlt.vue b/components/wallets/TotalAlt.vue
similarity index 100%
rename from components/wallets/total/WalletsTotalAlt.vue
rename to components/wallets/TotalAlt.vue
diff --git a/components/wallets/functions/getWalletAmount.ts b/components/wallets/functions/getWalletAmount.ts
deleted file mode 100644
index f216be7f..00000000
--- a/components/wallets/functions/getWalletAmount.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import type { TrnID, TrnItem } from '~/components/trns/types'
-import { TrnType } from '~/components/trns/types'
-import type { WalletID } from '~/components/wallets/types'
-
-interface Types {
- walletId: WalletID
- trnsIds: TrnID[]
- trnsItems: Record<TrnID, TrnItem>
-}
-
-export function getWalletAmount({ walletId, trnsIds, trnsItems }: Types): {
- income: number
- expense: number
- total: number
-} {
- let sum = 0
- let income = 0
- let expense = 0
-
- for (const trnId of trnsIds) {
- const trn = trnsItems[trnId]
-
- // Income
- if (trn.type === TrnType.Income) {
- sum = sum + trn.amount
- income = income + trn.amount
- }
-
- // Expense
- if (trn.type === TrnType.Expense) {
- sum = sum - trn.amount
- expense = expense + trn.amount
- }
-
- // Transfer
- if (trn.type === TrnType.Transfer) {
- if (!trn.incomeAmount || !trn.expenseAmount) {
- return {
- total: sum,
- income,
- expense,
- }
- }
-
- if (trn.incomeWalletId === walletId) {
- sum = sum + trn.incomeAmount
- income = income + trn.incomeAmount
- }
-
- if (trn.expenseWalletId === walletId) {
- sum = sum - trn.expenseAmount
- expense = expense + trn.expenseAmount
- }
- }
- }
-
- return {
- total: income - expense,
- income,
- expense,
- }
-}
diff --git a/components/wallets/item/walletItem.styl b/components/wallets/item/walletItem.styl
deleted file mode 100644
index ff81e162..00000000
--- a/components/wallets/item/walletItem.styl
+++ /dev/null
@@ -1,122 +0,0 @@
-.walletItem
- position relative
- margin-top -1px
- padding 0 $m7
- padding-top $m6
- border 1px solid transparent
-
- @media $media-laptop
- padding 0 $m8
- padding-top $m6
-
- +media-hover()
- color var(--c-text-1)
- background var(--c-bg-6)
-
- &__grid
- display grid
- grid-template-columns minmax(10px, max-content) 1fr minmax(10px, max-content)
- grid-template-rows repeat(2, 1fr)
- grid-column-gap $m8
-
- &__amount
- grid-column 3 / 4
- grid-row 1 / 3
- align-self center
- justify-self end
-
- &__icon
- grid-column 1 / 2
- grid-row 1 / -1
- align-self center
-
- @media $media-laptop
- .icon
- width 24px
- height 24px
-
- .icon__abbr
- font-size 11px
-
- &:hover
- cursor pointer
- transform scale(1.3)
-
- &__line
- grid-column 2 / 4
- grid-row -1 / -1
- padding-bottom $m6
- border-bottom 1px solid var(--c-bg-6)
-
- @media $media-laptop
- padding-bottom $m6
-
- ^[0]:last-child &
- border-color transparent
-
- &__name
- grid-column 2 / 3
- grid-row 1 / 3
- align-self center
- color var(--c-font-4)
- font-size 14px
-
-.walletItemTile
- overflow hidden
- position relative
- display flex
- flex-flow column nowrap
- align-items flex-start
- justify-content center
- min-height 61px
- padding $m6 $m7
- color var(--c-font-1)
- border-radius $m5
-
- @media $media-laptop
- min-height 66px
-
- &__name
- overflow hidden
- min-height 16px
- padding-bottom $m5
- text-align left
- fs-m()
-
- .amount
- color var(--c-font-1)
- opacity .8
-
- .amount__wrap._small
- display none
-
-.walletItemLine
- flex 1 1
- display flex
- flex-flow column nowrap
- align-items flex-end
- justify-content center
- min-height 91px
- padding $m7
- margin-right $m6
- color var(--c-font-1)
- border-radius $m4
-
- &:last-child
- margin-right 0
-
- @media $media-laptop
- min-height 66px
-
- &__name
- overflow hidden
- min-height 16px
- padding-bottom $m5
- fs-m()
-
- .amount
- opacity .8
- color var(--c-font-1)
-
- .amount__wrap._small
- display none
diff --git a/components/wallets/list/WalletsList.vue b/components/wallets/list/WalletsList.vue
deleted file mode 100644
index 7e9c8f07..00000000
--- a/components/wallets/list/WalletsList.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-<script>
-export default {
- props: {
- limit: { type: [Number, Boolean], default: null },
- showToogle: { type: Boolean, default: false },
- uiSimple: { type: Boolean, default: false },
- },
-
- data() {
- return {
- stateLimit: 0,
- }
- },
-
- computed: {
- walletsIds() {
- const walletsIds = this.$store.getters['wallets/walletsSortedIds']
- if (this.stateLimit)
- return walletsIds.slice(0, this.stateLimit)
-
- return walletsIds
- },
- },
-
- mounted() {
- this.stateLimit = this.limit
- },
-
- methods: {
- toogleWallets() {
- this.stateLimit > 0
- ? this.stateLimit = 0
- : this.stateLimit = this.limit
- },
- },
-}
-</script>
-
-<template lang="pug">
-.wallets
- WalletsItemWalletItem(
- v-if="!uiSimple"
- v-for="walletId in walletsIds"
- :id="walletId"
- :key="walletId"
- :ui="ui"
- v-on="$listeners"
- )
-
- WalletsItemSimple(
- v-if="uiSimple"
- v-for="walletId in walletsIds"
- :id="walletId"
- :key="walletId"
- :ui="ui"
- v-on="$listeners"
- )
-
- .walletsList__toogle(
- v-if="showToogle && $store.getters['wallets/walletsSortedIds'].length > limit"
- @click="toogleWallets"
- )
- template(v-if="stateLimit > 0") {{ $t('wallets.showAll') }}
- template(v-else) {{ $t('wallets.showOnly') }} {{ limit }}
-</template>
diff --git a/components/wallets/list/WalletsList2.vue b/components/wallets/list/WalletsList2.vue
deleted file mode 100644
index 3171b49c..00000000
--- a/components/wallets/list/WalletsList2.vue
+++ /dev/null
@@ -1,30 +0,0 @@
-<script>
-export default {
- props: {
- limit: {
- type: Number,
- default: null,
- },
- },
-
- computed: {
- wallets() {
- const wallets = {}
-
- for (const walletId of this.$store.getters['wallets/walletsSortedIds']) {
- wallets[walletId] = {
- ...this.$store.state.wallets.items[walletId],
- total: this.$store.getters['wallets/walletsTotal'][walletId].base,
- }
- }
-
- return wallets
- },
- },
-}
-</script>
-
-<template lang="pug">
-.walletsList
- slot(:wallets="wallets")
-</template>
diff --git a/components/wallets/list/WalletsList3.vue b/components/wallets/list/WalletsList3.vue
deleted file mode 100644
index 6dc8438c..00000000
--- a/components/wallets/list/WalletsList3.vue
+++ /dev/null
@@ -1,49 +0,0 @@
-<script>
-export default {
- props: {
- activeItemId: { type: String, default: null },
- limit: { type: [Number, Boolean], default: null },
- showBase: { type: Boolean, default: true },
- showToogle: { type: Boolean, default: false },
- },
-
- data() {
- return {
- stateLimit: 0,
- }
- },
-
- computed: {
- walletsIds() {
- const walletsIds = this.$store.getters['wallets/walletsSortedIds']
- if (this.stateLimit) return walletsIds.slice(0, this.stateLimit)
- return walletsIds
- },
- },
-
- mounted() {
- this.stateLimit = this.limit
- },
-
- methods: {
- toogleWallets() {
- if (this.stateLimit > 0)
- this.stateLimit = 0
- else
- this.stateLimit = this.limit
- },
- },
-}
-</script>
-
-<template lang="pug">
-.grid.gap-y-1.gap-2.3sm_grid-cols-2.sm_gap-x-6
- WalletsItemWalletItem(
- :activeItemId="activeItemId"
- v-for="walletId in walletsIds"
- :id="walletId"
- :key="walletId"
- :showBase="showBase"
- v-on="$listeners"
- )
-</template>
diff --git a/components/wallets/list/walletsList.styl b/components/wallets/list/walletsList.styl
deleted file mode 100644
index b6d6ca3d..00000000
--- a/components/wallets/list/walletsList.styl
+++ /dev/null
@@ -1,43 +0,0 @@
-.walletsList
- margin-bottom 0
-
- &__title
- padding $m9 $m7
- padding-top 0
- typo-money()
- font-size 20px
- letter-spacing 1.4px
- color var(--c-font-4)
-
- @media $media-laptop
- padding $m5 40px
- padding-top 0
- margin-left -40px
- margin-right -40px
- font-size 20px
- letter-spacing 2px
-
- &__toogle
- cursor pointer
- margin-top -1px
- margin-right $m7
- margin-left $m7
- padding $m7 0
- color var(--c-font-4)
- font-size 12px
- anim()
-
- +media-hover()
- color var(--c-blue-1)
-
-.walletsTiles
- display grid
- grid-template-columns repeat(2, 1fr)
- grid-column-gap $m6
- grid-row-gap $m6
- padding 0 $m7
-
- +media(600px)
- grid-template-columns repeat(auto-fill, minmax(200px, 1fr))
- grid-column-gap $m6
- grid-row-gap $m6
diff --git a/components/wallets/page/List.vue b/components/wallets/page/List.vue
index f45516fe..5c7b0538 100644
--- a/components/wallets/page/List.vue
+++ b/components/wallets/page/List.vue
@@ -1,11 +1,6 @@
<script setup lang="ts">
-import { useWindowSize } from '@vueuse/core'
-import useWallets from '~/components/wallets/useWallets'
-
const { $store } = useNuxtApp()
-const { height } = useWindowSize()
const activeTab = computed(() => $store.state.ui.activeTab)
-const { walletsItemsSorted } = useWallets()
</script>
<script lang="ts">
@@ -19,8 +14,8 @@ export default defineComponent({
</script>
<template lang="pug">
-.overflow.overflow-x-auto.h-full.grid.max-w-3xl(
- class="md_pb-[52px] pb-[44px] lg_pb-0 grid-rows-[1fr_auto]"
+.overflow-y-auto.h-full.grid.max-w-3xl(
+ class="grid-rows-[1fr_auto] md_pb-[52px] pb-[44px] lg_pb-0"
)
div
//- Header
@@ -55,31 +50,32 @@ export default defineComponent({
//- List
//---------------------------------
- .pb-12.px-3.grid.gap-y-1.gap-x-6.md_grid-cols-2
- //- Wallet
- .cursor-pointer.py-2.px-3.rounded-md.bg-skin-item-main-bg.hocus_bg-skin-item-main-hover(
- v-for="(walletItem, walletId) in walletsItemsSorted"
- :key="walletId"
- @click="$router.push(`/wallets/${walletId}`)"
- )
- .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(
- :style="{ background: walletItem.color }"
- class="mt-[2px]"
- ) {{ walletItem.name.substring(0, 2) }}
- //- Name
- .grow.text-sm.text-skin-item-base {{ walletItem.name }}
+ WalletsList(#default="{ walletsItemsSorted }")
+ .pb-12.px-3.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(
+ v-for="(walletItem, walletId) in walletsItemsSorted"
+ :key="walletId"
+ @click="$router.push(`/wallets/${walletId}`)"
+ )
+ .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(
+ :style="{ background: walletItem.color }"
+ class="mt-[2px]"
+ ) {{ walletItem.name.substring(0, 2) }}
+ //- Name
+ .grow.text-sm.text-skin-item-base {{ walletItem.name }}
- //- Amount
- Amount(
- :currency="walletItem.currency"
- :value="walletItem.amount"
- alwaysShowSymbol
- showBase
- vertical="right"
- )
+ //- Amount
+ Amount(
+ :currency="walletItem.currency"
+ :value="walletItem.amount"
+ alwaysShowSymbol
+ showBase
+ vertical="right"
+ )
.pb-4.px-3.flex.justify-evenly.gap-6
//- Sort
diff --git a/components/wallets/page/id/Index.vue b/components/wallets/page/id/Index.vue
index 25b32077..7318ba6b 100644
--- a/components/wallets/page/id/Index.vue
+++ b/components/wallets/page/id/Index.vue
@@ -10,8 +10,7 @@ const router = useRouter()
const walletId = computed(() => route.params.id)
const wallet = computed(() => $store.state.wallets.items[walletId.value])
-if (!wallet.value)
- router.replace('/wallets')
+if (!wallet.value) router.replace('/wallets')
const total = computed(() => $store.getters['wallets/walletsTotal'][walletId.value].base)
const filter = reactive({ trnType: null })
@@ -22,9 +21,14 @@ const trnsIds = computed(() =>
walletsIds: [walletId.value],
trnType: filter.trnType,
trnsItems: trnsItems.value,
- }))
+ }),
+)
-const periodTrnsIds = computed(() => $store.getters['trns/selectedTrnsIdsWithDate'].filter(trnId => $store.state.trns.items[trnId].walletId === walletId.value))
+const periodTrnsIds = computed(() =>
+ $store.getters['trns/selectedTrnsIdsWithDate'].filter(
+ trnId => $store.state.trns.items[trnId].walletId === walletId.value,
+ ),
+)
function handleSetFilterWallet() {
setFilterWalletsId(walletId.value)
diff --git a/finapp.code-workspace b/finapp.code-workspace
index eac5f5bd..c10f8af0 100644
--- a/finapp.code-workspace
+++ b/finapp.code-workspace
@@ -4,5 +4,8 @@
"name": "finapp",
"path": "."
},
- ]
+ ],
+ "settings": {
+ "vue3snippets.enable-compile-vue-file-on-did-save-code": true
+ }
}
diff --git a/layouts/default.vue b/layouts/default.vue
index cd03ecd4..d2a21fe0 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -53,7 +53,7 @@ onMounted(() => {
</script>
<template lang="pug">
-.overflow-hidden.relative.h-full.min-w-base.font-roboto.text-slate-500.dark_text-gray-400.leading-none.antialiased.bg-white.dark_bg-dark3(
+.overflow-hidden.relative.h-full.min-w-base.font-roboto.text-slate-500.dark_text-gray-400.leading-none.antialiased.bg-skin-layout-main(
:class="touchClassNames"
)
LayoutModals
@@ -71,17 +71,16 @@ onMounted(() => {
.h-full.grid(
class="lg_grid-cols-[auto_1fr]"
)
- .hidden.lg_block
+ .hidden.overflow-hidden.h-full.lg_block
LayoutSidebar
- .overflow-hidden.h-full.lg_px-8.grid
+ .overflow-hidden.h-full.grid.lg_px-8
Nuxt(keep-alive :keep-alive-props="{ include: keepAliveInclude }")
- .absolute.right-0.bottom-0.w-full
- .hidden.createTrn.absolute.right-6.bottom-6.lg_flex(
- @click="$store.dispatch('trnForm/openTrnForm', { action: 'create' })"
- )
- .btn: .mdi.mdi-plus
+ .hidden.createTrn.absolute.right-6.bottom-6.lg_flex(
+ @click="$store.dispatch('trnForm/openTrnForm', { action: 'create' })"
+ )
+ .btn: .mdi.mdi-plus
.firefoxBackdropFix.z-10.absolute.bottom-0.left-0.w-full.backdrop-blur.lg_hidden(
class="bg-white/70 dark_bg-dark3/70"
diff --git a/package.json b/package.json
index 27232d88..3a1c8c04 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "finapp",
- "version": "3.6.0",
+ "version": "3.6.1",
"scripts": {
"dev": "cross-env NUXT_HOST=0.0.0.0 PORT=3010 nuxi dev",
"build": "nuxi generate",
diff --git a/pages/settings.vue b/pages/settings.vue
index 176e1654..2a86fbfe 100644
--- a/pages/settings.vue
+++ b/pages/settings.vue
@@ -29,7 +29,7 @@ export default {
</script>
<template lang="pug">
-.overflow.overflow-x-auto.h-full.max-w-3xl(
+.overflow-y-auto.h-full.max-w-3xl(
class="md_pb-[52px] pb-[44px] lg_pb-0"
)
.mb-6.py-6.px-3.text-skin-item-base-up.text-2xl.leading-none.font-nunito.font-semibold