feat: show toast on some errors

This commit is contained in:
2026-05-07 17:19:08 +02:00
parent f415edab57
commit 4aff3874d3
3 changed files with 19 additions and 8 deletions
+2
View File
@@ -1,5 +1,6 @@
import type { createKeyMap } from '$lib/helpers/createKeyMap';
import { panelState } from '$lib/sidebar/PanelState.svelte';
import { toast } from '@nodarium/ui';
import FileSaver from 'file-saver';
import type { GraphManager } from './graph-manager.svelte';
import type { GraphState } from './graph-state.svelte';
@@ -146,6 +147,7 @@ export function setupKeymaps(keymap: Keymap, graph: GraphManager, graphState: Gr
type: 'application/json;charset=utf-8'
});
FileSaver.saveAs(blob, 'nodarium-graph.json');
toast('Graph downloaded', 'success', 1500);
}
});