Start of command palette

This commit is contained in:
Gregory Schier
2024-03-18 17:09:01 -07:00
parent 17423f8c54
commit a5dd3beb73
13 changed files with 190 additions and 73 deletions

View File

@@ -1,10 +1,13 @@
import { useQuery } from '@tanstack/react-query';
import * as app from '@tauri-apps/api/app';
import * as path from '@tauri-apps/api/path';
import { invoke } from '@tauri-apps/api';
export function useAppInfo() {
return useQuery(['appInfo'], async () => {
const [version, appDataDir] = await Promise.all([app.getVersion(), path.appDataDir()]);
return { version, appDataDir };
return (await invoke('cmd_metadata')) as {
isDev: boolean;
version: string;
name: string;
appDataDir: string;
};
});
}