add confetti on dialog announcements
This commit is contained in:
parent
e1bd8c5909
commit
a8db24e074
1 changed files with 7 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ import MkButton from '@/components/MkButton.vue';
|
|||
import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/i.js';
|
||||
import { updateCurrentAccountPartial } from '@/accounts.js';
|
||||
import { confetti } from '@/utility/confetti.js';
|
||||
|
||||
const props = defineProps<{
|
||||
announcement: Misskey.entities.Announcement;
|
||||
|
|
@ -83,6 +84,12 @@ function onBgClick() {
|
|||
const hasReachedBottom = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
if (props.announcement.confetti) {
|
||||
confetti({
|
||||
duration: 1000 * 3,
|
||||
});
|
||||
}
|
||||
|
||||
if (bottomEl.value && rootEl.value) {
|
||||
const bottomElRect = bottomEl.value.getBoundingClientRect();
|
||||
const rootElRect = rootEl.value.getBoundingClientRect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue