feat: select directory to save last book cover image (#2521)

This commit is contained in:
Huang Xin
2025-11-24 00:00:49 +08:00
committed by GitHub
parent c792c18e01
commit 8f22a5c570
44 changed files with 306 additions and 39 deletions
+12
View File
@@ -84,6 +84,13 @@ interface GetExternalSDCardPathResponse {
error?: string;
}
interface SelectDirectoryResponse {
cancelled?: boolean;
uri?: string;
path?: string;
error?: string;
}
export async function copyURIToPath(request: CopyURIRequest): Promise<CopyURIResponse> {
const result = await invoke<CopyURIResponse>('plugin:native-bridge|copy_uri_to_path', {
payload: request,
@@ -190,3 +197,8 @@ export async function getExternalSDCardPath(): Promise<GetExternalSDCardPathResp
);
return result;
}
export async function selectDirectory(): Promise<SelectDirectoryResponse> {
const result = await invoke<SelectDirectoryResponse>('plugin:native-bridge|select_directory');
return result;
}