Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handler (data, close) {
if (!data.prevent.length) {
close(() => {
Toast.create(`Finally. It's closed now.`)
})
return
}
Toast.create('Untick "Prevent" checkbox to be able to close the Dialog.')
}
}
handler (data) {
clearTimeout(timeout)
Toast.create('Canceled...')
}
}
handler (data) {
LocalStorage.set('habot.googleApiKey', data.key)
Toast.create('API Key Set for this device')
}
}
basicToastWithLongMessage () {
Toast.create('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.')
},
toastWithType (type) {
notify (eventName) {
Toast.create(`Event "${eventName}" was triggered.`)
},
openSpecialPosition (position) {
handler () {
Toast.create('Tapped on item 1.3')
},
children: []
toastWithOnDismiss () {
Toast.create({
html: 'Showing Dialog after Toast is dismissed.',
timeout: 5000,
onDismiss () {
Dialog.create({
title: 'Dismissed',
message: 'Toast was just dismissed!',
buttons: ['OK']
})
}
})
},
toastWithTimeout () {
handler () {
Toast.create('But, but... I just showed you..')
}
}
click (target) {
Toast.create('clicked')
if (target) {
target.close()
}
}
}
handler () {
Toast.create('Disagreed...')
}
},