MCPcopy Create free account
hub / github.com/SnapDrop/snapdrop / Toast

Class Toast

client/scripts/ui.js:382–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382class Toast extends Dialog {
383 constructor() {
384 super('toast');
385 Events.on('notify-user', e => this._onNotfiy(e.detail));
386 }
387
388 _onNotfiy(message) {
389 this.$el.textContent = message;
390 this.show();
391 setTimeout(_ => this.hide(), 3000);
392 }
393}
394
395
396class Notifications {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected