Skip to content

Commit

Permalink
tweak confetti
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Jan 6, 2023
1 parent 70805e0 commit 4b181a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/frontend/src/pages/user/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ onMounted(() => {
const bm = parseInt(props.user.birthday.split('-')[1]);
const bd = parseInt(props.user.birthday.split('-')[2]);
if (m === bm && d === bd) {
confetti();
confetti({
duration: 1000 * 4
});
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/scripts/confetti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _confetti from 'canvas-confetti';
import * as os from '@/os';

export function confetti(options: { duration?: number; } = {}) {
const duration = options.duration ?? 1000 * 5;
const duration = options.duration ?? 1000 * 4;
const animationEnd = Date.now() + duration;
const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: os.claimZIndex('high') };

Expand Down

0 comments on commit 4b181a3

Please sign in to comment.