MCPcopy Create free account
hub / github.com/massCodeIO/massCode / showToast

Function showToast

src/renderer/composables/useDonationTriggers.ts:63–84  ·  view source on GitHub ↗
(title: string)

Source from the content-addressed store, hash-verified

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(

Callers 1

useDonationTriggersFunction · 0.85

Calls 3

useAppFunction · 0.90
todayFunction · 0.85
setGreetingDayFunction · 0.85

Tested by

no test coverage detected