Skip to content

Open source personal finance application

update trnForm

ilkome09d1375c7c4e
diff --git a/components/base/modal/useTouchClose.ts b/components/base/modal/useTouchClose.ts
index 9862ba04..761396e1 100644
--- a/components/base/modal/useTouchClose.ts
+++ b/components/base/modal/useTouchClose.ts
@@ -66,7 +66,15 @@ export default function useOnTouch () {
const diffTrunc = Math.trunc(diff)
const opacity = diffTrunc === 100 ? 1 : diffTrunc >= 10 ? `0.${diffTrunc}` : `0.0${diffTrunc}`
- wrap.value.style.transform = `translate3d(0, ${currentY - offset}px, 0)`
+ const width = document.documentElement.clientWidth
+ console.log('width', width)
+
+ if (width >= 768) {
+ wrap.value.style.transform = `translate3d(${currentY - offset}px, 0, 0)`
+ } else {
+ wrap.value.style.transform = `translate3d(0, ${currentY - offset}px, 0)`
+ }
+
overflow.value.style.opacity = opacity
}
}
diff --git a/components/trnForm/TrnForm.vue b/components/trnForm/TrnForm.vue
index 9fe4af35..ab82f7e1 100644
--- a/components/trnForm/TrnForm.vue
+++ b/components/trnForm/TrnForm.vue
@@ -362,6 +362,9 @@ $transition-style = cubic-bezier(.17, .04, .03, 1)
transform translate3d(0, 50px, 0)
transition opacity 300ms $transition-style, transform 250ms $transition-style
+ +media-ipad()
+ transform translate3d(50px, 0, 0)
+
&-enter-to
transform translate3d(0, 0, 0)
@@ -370,10 +373,6 @@ $transition-style = cubic-bezier(.17, .04, .03, 1)
&-leave-to
opacity 1
- &-leave-to
- transform translate3d(0, 200%, 0)
- transition opacity 400ms $transition-style, transform 400ms $transition-style
-
.trnForm
&__overflow
position fixed
@@ -383,9 +382,15 @@ $transition-style = cubic-bezier(.17, .04, .03, 1)
height 100%
anim()
- @media $media-laptop
+ +media-ipad()
width 440px
+ &__wrap
+ // width 700px
+ // max-width 760px
+ border 1px solid var(--c-bg-1)
+ box-shadow 0 0 10px 5px var(--c-bg-1)
+
&__title
padding $m8
padding-bottom 0