feat: select directory to save last book cover image (#2521)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user