Add pending apps and frontend components
- apps/captain-mobile: Mobile API service - apps/flow-ui: Flow UI application - apps/mindlink: Mindlink application - apps/storage: Storage API and workers - apps/tzzr-cli: TZZR CLI tool - deck-frontend/backups: Historical TypeScript versions - hst-frontend: Standalone HST frontend Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
deck-frontend/backups/20260113_221902/src/utils/toast.ts
Normal file
21
deck-frontend/backups/20260113_221902/src/utils/toast.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
let toastEl: HTMLElement | null = null;
|
||||
let toastTimeout: number | null = null;
|
||||
|
||||
export function toast(message: string, duration = 2000): void {
|
||||
if (!toastEl) {
|
||||
toastEl = document.createElement('div');
|
||||
toastEl.className = 'toast';
|
||||
document.body.appendChild(toastEl);
|
||||
}
|
||||
|
||||
if (toastTimeout) {
|
||||
clearTimeout(toastTimeout);
|
||||
}
|
||||
|
||||
toastEl.textContent = message;
|
||||
toastEl.classList.add('show');
|
||||
|
||||
toastTimeout = window.setTimeout(() => {
|
||||
toastEl?.classList.remove('show');
|
||||
}, duration);
|
||||
}
|
||||
Reference in New Issue
Block a user