Skip to content

Commit

Permalink
* always animate dashboard
Browse files Browse the repository at this point in the history
* hide quick date buttons when editing a transasction
  • Loading branch information
cioraneanu committed Jun 17, 2024
1 parent 365456a commit f9de384
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions front/pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ const onRefresh = () => {
const onRefreshDebounce = debounce(onRefresh, 200)
onMounted(() => {
animateDashboard()
if (dataStore.dashboard.transactionsListLastWeek.length > 0) {
return
}
onRefreshDebounce()
animateDashboard()
})
const isLoadingDashboard = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion front/pages/transactions/[[id]].vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<div :style="getStyleForField(FORM_CONSTANTS_TRANSACTION_FIELDS.TRANSACTION_FORM_FIELD_DATE)">
<app-date-time-grid v-model="date" :rules="[{ required: true, message: 'Date is required' }]" required />

<div class="px-3 flex-center-vertical gap-1">
<div v-if="!itemId" class="px-3 flex-center-vertical gap-1">
<van-button size="small" @click="onSubDay">-1 day</van-button>
<van-button size="small" @click="onToday">Today</van-button>
<van-button size="small" @click="onAddDay">+1 day</van-button>
Expand Down
11 changes: 2 additions & 9 deletions front/utils/AnimationUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ 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`,
opacity: [0, 1],
Expand All @@ -75,9 +68,9 @@ export async function animateDashboard() {


anime({
targets: `.van-grid-item, .bar-container`,
targets: `.van-grid-item, .bar-container, .app-select-option-tag`,
opacity: [0, 1],
delay: anime.stagger(45, { start: 250 }),
delay: anime.stagger(25, { start: 250 }),
})


Expand Down

0 comments on commit f9de384

Please sign in to comment.