Add interface languages and improve themes and workspace controls for 0.1.36
This commit is contained in:
@@ -2,8 +2,9 @@ import { invoke } from "@tauri-apps/api/core";
|
||||
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
import { open as openDialog } from "@tauri-apps/plugin-dialog";
|
||||
import type { TreeEntry, WorkspaceEvent, WorkspaceInfo } from "./types";
|
||||
import { tr } from "../i18n/index.ts";
|
||||
|
||||
export async function pickWorkspaceFolder(title = "Open workspace"): Promise<string | null> {
|
||||
export async function pickWorkspaceFolder(title = tr("Open workspace")): Promise<string | null> {
|
||||
const selected = await openDialog({
|
||||
directory: true,
|
||||
multiple: false,
|
||||
@@ -31,6 +32,10 @@ export function workspaceRecent(): Promise<string[]> {
|
||||
return invoke("workspace_recent");
|
||||
}
|
||||
|
||||
export function workspaceForget(path: string): Promise<string[]> {
|
||||
return invoke("workspace_forget", { path });
|
||||
}
|
||||
|
||||
export function workspaceNew(parent: string, name: string): Promise<void> {
|
||||
return invoke("workspace_new", { parent, name });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user