Skip to content

Open source personal finance application

chore(TrnModal): move modal to right side

Ilya Komichev544409b4e20f
diff --git a/app/components/trnForm/Sidebar.vue b/app/components/trnForm/Sidebar.vue
index 0ede812c..abb23d55 100644
--- a/app/components/trnForm/Sidebar.vue
+++ b/app/components/trnForm/Sidebar.vue
@@ -13,12 +13,12 @@ const isShow = computed(() => trnsFormStore.ui.isShow)
/**
* Slider
*/
-const sliderRef2 = ref<any>(null)
+const sliderRef = ref<any>(null)
const sliderObj = ref<any>(null)
function init() {
if (!sliderObj.value) {
- sliderObj.value = new Swiper(sliderRef2.value, {
+ sliderObj.value = new Swiper(sliderRef.value, {
init: true,
initialSlide: 0,
longSwipesMs: 60,
@@ -49,14 +49,14 @@ watch(isShow, (v) => {
<Transition name="fadeIn" appear>
<div
v-if="isShow"
- class="@container/trnForm trnForm absolute inset-y-0 z-50 h-full w-[360px] py-2"
+ class="@container/trnForm trnForm absolute inset-y-0 z-50 right-0 h-full w-[360px] py-2"
>
- <div class="border-left relative h-full overflow-hidden rounded-r-xl border-item-6 border border-l-0 border-item-4 bg-item-2 shadow-2xl">
+ <div class="border-left relative h-full overflow-hidden rounded-l-xl border-item-6 border border-r-0 border-item-4 bg-item-2 shadow-2xl">
<div class="absolute right-2 top-2">
<BottomSheetClose @onClick="trnsFormStore.onClose()" />
</div>
- <div ref="sliderRef2" class="swiper-container h-full">
+ <div ref="sliderRef" class="swiper-container h-full">
<div class="swiper-wrapper">
<!-- Main -->
<div class="swiper-slide h-full bg-default">
@@ -66,7 +66,10 @@ watch(isShow, (v) => {
class="!pb-0"
typesPosition="top"
/>
- <div class="-mt-6 grid gap-2">
+ <div
+ v-if="trnsFormStore.values.trnType !== 2"
+ class="-mt-6 grid gap-2"
+ >
<TrnFormSelectionCategoriesFast
@onSelectCategory="id => trnsFormStore.values.categoryId = id"
/>
@@ -110,6 +113,6 @@ watch(isShow, (v) => {
.fadeIn-enter-from,
.fadeIn-leave-to {
- @apply opacity-0 -translate-x-12;
+ @apply opacity-0 translate-x-full;
}
</style>
diff --git a/app/components/ui/PopoverWrap.vue b/app/components/ui/PopoverWrap.vue
index e026305c..67407899 100644
--- a/app/components/ui/PopoverWrap.vue
+++ b/app/components/ui/PopoverWrap.vue
@@ -29,9 +29,5 @@ const emit = defineEmits<{
>
<slot />
</div>
-
- <!-- <div v-if="$slots.custom">
- <slot name="custom" />
- </div> -->
</div>
</template>
diff --git a/app/components/wallets/Selector.vue b/app/components/wallets/Selector.vue
index 0023cd7f..f847ea95 100644
--- a/app/components/wallets/Selector.vue
+++ b/app/components/wallets/Selector.vue
@@ -39,9 +39,11 @@ function onClickWallet(walletId: WalletId) {
class="grid gap-2 h-full overflow-hidden"
:class="{ 'grid-rows-[auto_1fr]': walletsStore.currenciesUsed.length > 1 }"
>
- <div class="grid md:max-w-xs">
+ <div
+ v-if="walletsStore.currenciesUsed.length > 1"
+ class="grid md:max-w-xs"
+ >
<WalletsCurrencies
- v-if="walletsStore.currenciesUsed.length > 1"
:currencyFiltered
@onSelectFilterCurrency="code => currencyFiltered = code"
/>
diff --git a/app/layouts/default.vue b/app/layouts/default.vue
index 48b804c4..2c3e39c4 100644
--- a/app/layouts/default.vue
+++ b/app/layouts/default.vue
@@ -64,7 +64,7 @@ usePageScroll()
<template>
<div
- :class="{ 'md:pl-20': trnsFormStore.ui.isShow && isShowSidebar && width >= 767 }"
+ :class="{ 'md:pr-[360px]': trnsFormStore.ui.isShow && isShowSidebar && width >= 767 }"
class="h-dvh overflow-hidden transition-all duration-300 ease-in-out bg-[var(--item-1)]"
style="margin-left: env(safe-area-inset-left)"
>