Fix workspace creation, reveal sync dir, and don't update timestamps on sync/import

This commit is contained in:
Gregory Schier
2025-01-09 07:50:23 -08:00
parent 0a7257c55a
commit f694456ddc
33 changed files with 312 additions and 219 deletions

9
src-web/lib/reveal.ts Normal file
View File

@@ -0,0 +1,9 @@
import { type } from '@tauri-apps/plugin-os';
const os = type();
export const revealInFinderText =
os === 'macos'
? 'Reveal in Finder'
: os === 'windows'
? 'Show in Explorer'
: 'Show in File Manager';

View File

@@ -7,6 +7,7 @@ import type {
Plugin,
Settings,
Workspace,
WorkspaceMeta,
} from '@yaakapp-internal/models';
import { invokeCmd } from './tauri';
@@ -59,6 +60,10 @@ export async function getWorkspace(id: string | null): Promise<Workspace | null>
return workspace;
}
export async function getWorkspaceMeta(workspaceId: string) {
return invokeCmd<WorkspaceMeta>('cmd_get_workspace_meta', { workspaceId });
}
export async function listWorkspaces(): Promise<Workspace[]> {
const workspaces: Workspace[] = (await invokeCmd('cmd_list_workspaces')) ?? [];
return workspaces;