feat(fs-watcher): add 300ms delayed scanning toast for large project dirs
This commit is contained in:
parent
9d9cc75b28
commit
64ad4d2e58
2 changed files with 17 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ export function getNotifications(): Notification[] {
|
|||
return notifications;
|
||||
}
|
||||
|
||||
export function notify(type: NotificationType, message: string): void {
|
||||
export function notify(type: NotificationType, message: string): string {
|
||||
const id = crypto.randomUUID();
|
||||
notifications.push({ id, type, message, timestamp: Date.now() });
|
||||
|
||||
|
|
@ -29,6 +29,8 @@ export function notify(type: NotificationType, message: string): void {
|
|||
|
||||
// Auto-dismiss
|
||||
setTimeout(() => dismissNotification(id), TOAST_DURATION_MS);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
export function dismissNotification(id: string): void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue