mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 04:28:07 +01:00
🎨 Improve exporting assets tip
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
813f523dc6
commit
d484ddc079
1 changed files with 6 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ import {MenuItem} from "./Menu";
|
|||
import {App} from "../index";
|
||||
import {exportByMobile, isInAndroid, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
import {checkFold} from "../util/noRelyPCFunction";
|
||||
import {showMessage} from "../dialog/message";
|
||||
|
||||
export const exportAsset = (src: string) => {
|
||||
return {
|
||||
|
|
@ -27,7 +28,11 @@ export const exportAsset = (src: string) => {
|
|||
properties: ["showOverwriteConfirmation"],
|
||||
});
|
||||
if (!result.canceled) {
|
||||
fetchPost("/api/file/copyFile", {src, dest: result.filePath});
|
||||
fetchPost("/api/file/copyFile", {src, dest: result.filePath}, (response) => {
|
||||
if (response.code === 0) {
|
||||
showMessage(window.siyuan.languages.exported);
|
||||
}
|
||||
});
|
||||
}
|
||||
/// #endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue