Skip to content

Commit

Permalink
* enabled decimal values for amounts typed in the assistant
Browse files Browse the repository at this point in the history
* fixed UI glitch in which bottom popups did not cover full screen
  • Loading branch information
cioraneanu committed Jun 16, 2024
1 parent a35db9d commit 881ed4e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion front/components/transaction/transaction-assistant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const processAssistantText = () => {
? null
: amountWords
.reduce((total, value) => {
return total + parseInt(value)
return total + parseFloat(value)
}, 0)
.toString()
Expand Down
41 changes: 21 additions & 20 deletions front/utils/AnimationUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ export function animateSwipeList(list) {
})
}


export async function animateTransactionForm () {
export async function animateTransactionForm() {
await nextTick()

const targets = `.vant-card, .transaction-type-container, .van-cell-group`
anime({
targets: `.vant-card, .transaction-type-container, .van-cell-group`,
targets: targets,
// scale: [1.2, 1.0],
translateY: [-100, 0],
opacity: [0, 1],
duration: 1000,
complete: function (anim) {
// Temporary fix... for some reason leaving "transform: translateY(0px);" after the animation is finished on .van-cell-group causes the app-select popup to not go fullscreen... Hmmm...
document.querySelector(".van-cell-group").removeAttribute('style')
},
// easing: 'easeOutElastic(1, .6)'
})
}
Expand Down Expand Up @@ -56,28 +60,25 @@ export async function animateSettings() {
export async function animateDashboard() {
await nextTick()

// anime({
// targets: `.van-cell-group`,
// translateX: [-50, 0],
// opacity: [0, 1],
// delay: anime.stagger(200, { start: 0 }),
// })

anime({
targets: `.van-cell-group`,
translateX: [-50, 0],
opacity: [0, 1],
delay: anime.stagger(200, { start: 0 }),
delay: anime.stagger(100, { start: 0 }),
})

// for (let i = 1; i <= 6; i++) {
// let selector = `.app-form .van-cell-group:nth-child(${i + 1})`
// // let translate = i % 2 === 0 ? [-100, 0] : [100, 0]
// let translate = [-100, 0]
// let delay = 50 * i
// anime({
// targets: selector,
// translateX: translate,
// delay: delay,
// duration: 500,
// // opacity: [0, 1],
// // delay: anime.stagger(200, { start: 0 }),
// })
// }

}
anime({
targets: `.van-grid-item`,
opacity: [0, 1],
delay: anime.stagger(45, { start: 250 }),
})


}

0 comments on commit 881ed4e

Please sign in to comment.