chore: export markdown

This commit is contained in:
lencx
2023-01-11 00:40:44 +08:00
parent 2dfb9bac2a
commit 7446cfc186
3 changed files with 11 additions and 28 deletions

View File

@@ -40,6 +40,13 @@ pub fn download(_app: AppHandle, name: String, blob: Vec<u8>) {
utils::open_file(path);
}
#[command]
pub fn save_file(_app: AppHandle, name: String, content: String) {
let path = api::path::download_dir().unwrap().join(name);
fs::write(&path, content).unwrap();
utils::open_file(path);
}
#[command]
pub fn open_link(app: AppHandle, url: String) {
api::shell::open(&app.shell_scope(), url, None).unwrap();