mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-05 14:26:23 +01:00
Preserve Editor State (#151)
This commit is contained in:
1 parent
31f2bff0f6
commit
135c366e32
33 files changed
+295
-177
No files matched your search
@@ -1,3 +1,7 @@
|
||||
import { customAlphabet } from 'nanoid';
|
||||
|
||||
const nanoid = customAlphabet('023456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKMNPQRSTUVWXYZ', 10);
|
||||
|
||||
export function generateId(): string {
|
||||
return Math.random().toString(36).slice(2);
|
||||
return nanoid();
|
||||
}
|
||||
@@ -80,7 +80,7 @@ type TauriCmd =
|
||||
| 'cmd_write_file_dev';
|
||||
|
||||
export async function invokeCmd<T>(cmd: TauriCmd, args?: InvokeArgs): Promise<T> {
|
||||
console.log('RUN COMMAND', cmd, args);
|
||||
// console.log('RUN COMMAND', cmd, args);
|
||||
try {
|
||||
return await invoke(cmd, args);
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user