(title: string)
| 61 | } = useDonations() |
| 62 | |
| 63 | function showToast(title: string) { |
| 64 | const { isSponsored } = useApp() |
| 65 | |
| 66 | if (isSponsored.value || isToastVisible.value) { |
| 67 | return |
| 68 | } |
| 69 | isToastVisible.value = true |
| 70 | |
| 71 | const todayKey = today() |
| 72 | const variant = donations.lastGreetingDay === todayKey ? 'short' : 'full' |
| 73 | if (variant === 'full') { |
| 74 | setGreetingDay(todayKey) |
| 75 | } |
| 76 | |
| 77 | toast.custom(markRaw(Donate), { |
| 78 | componentProps: { title, variant }, |
| 79 | duration: Infinity, |
| 80 | onDismiss: () => { |
| 81 | isToastVisible.value = false |
| 82 | }, |
| 83 | }) |
| 84 | } |
| 85 | |
| 86 | COPY_SPACES.forEach((space) => { |
| 87 | watch( |
no test coverage detected