feat(*): svelte 5 panel view sharing the gateway ui, obsidian theme, preview and tests
This commit is contained in:
1 parent
a1bf4db905
commit
04400c5076
33 files changed
+3378
-1803
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { Notice } from "obsidian";
|
||||
|
||||
const SHORT_MS = 4000;
|
||||
const LONG_MS = 8000;
|
||||
|
||||
function show(message: string, duration: number): Notice {
|
||||
return new Notice(message, duration);
|
||||
}
|
||||
|
||||
// ``svelte-sonner`` as the shared panel code imports it, backed by Obsidian
|
||||
// notices; the esbuild resolver points the bare import here.
|
||||
export const toast = {
|
||||
error: (message: string) => show(`Beaver: ${message}`, LONG_MS),
|
||||
info: (message: string) => show(message, SHORT_MS),
|
||||
message: (message: string) => show(message, SHORT_MS),
|
||||
success: (message: string) => show(message, SHORT_MS),
|
||||
warning: (message: string) => show(message, LONG_MS),
|
||||
};
|
||||
Reference in new issue
Block a user