mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 22:16:43 -06:00
tweak confetti
This commit is contained in:
parent
70805e00eb
commit
4b181a30da
2 changed files with 4 additions and 2 deletions
|
@ -188,7 +188,9 @@ onMounted(() => {
|
||||||
const bm = parseInt(props.user.birthday.split('-')[1]);
|
const bm = parseInt(props.user.birthday.split('-')[1]);
|
||||||
const bd = parseInt(props.user.birthday.split('-')[2]);
|
const bd = parseInt(props.user.birthday.split('-')[2]);
|
||||||
if (m === bm && d === bd) {
|
if (m === bm && d === bd) {
|
||||||
confetti();
|
confetti({
|
||||||
|
duration: 1000 * 4
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,7 @@ import _confetti from 'canvas-confetti';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
export function confetti(options: { duration?: number; } = {}) {
|
export function confetti(options: { duration?: number; } = {}) {
|
||||||
const duration = options.duration ?? 1000 * 5;
|
const duration = options.duration ?? 1000 * 4;
|
||||||
const animationEnd = Date.now() + duration;
|
const animationEnd = Date.now() + duration;
|
||||||
const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: os.claimZIndex('high') };
|
const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: os.claimZIndex('high') };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue