mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-31 22:43:11 +02:00
Fix workspace creation, reveal sync dir, and don't update timestamps on sync/import
This commit is contained in:
9
src-web/lib/reveal.ts
Normal file
9
src-web/lib/reveal.ts
Normal 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';
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user