fixed saving/loading of tem files
This commit is contained in:
parent
952a6a40bd
commit
eb7810a99a
10 changed files with 1189 additions and 237 deletions
896
src-tauri/Cargo.lock
generated
896
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -12,18 +12,19 @@ name = "tazik2_lib"
|
|||
crate-type = ["lib", "cdylib", "staticlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.0-beta", features = [] }
|
||||
tauri-build = { version = "^2.0.0-beta", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.0.0-beta", features = ["native-tls"] }
|
||||
tauri-plugin-shell = "2.0.0-beta"
|
||||
tauri = { version = "^2.0.0-beta", features = [] }
|
||||
tauri-plugin-shell = "^2.0.0-beta"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2", features = [] }
|
||||
tauri-plugin-process = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-dialog = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-os = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
native-tls = { version = "0.2", optional = true }
|
||||
tauri-plugin-log = "2.0.0-beta.7"
|
||||
reqwest = { version = "0.10.0-alpha.2" }
|
||||
|
|
|
|||
|
|
@ -17,6 +17,15 @@
|
|||
"shell:allow-open",
|
||||
"fs:read-all",
|
||||
"fs:write-all",
|
||||
"fs:allow-exists",
|
||||
{
|
||||
"identifier": "fs:allow-exists",
|
||||
"allow": [
|
||||
{
|
||||
"path": "$APPDATA/**"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": "fs:write-all",
|
||||
"allow": [
|
||||
|
|
@ -66,10 +75,10 @@
|
|||
"dialog:default",
|
||||
"clipboard-manager:default",
|
||||
"clipboard-manager:allow-write-text",
|
||||
"clipboard-manager:default",
|
||||
"os:allow-version",
|
||||
"os:allow-platform",
|
||||
"os:allow-os-type",
|
||||
"os:allow-arch"
|
||||
"os:allow-arch",
|
||||
"log:default"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
use tauri_plugin_log::{Target, TargetKind};
|
||||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
|
|
@ -7,6 +8,13 @@ fn greet(name: &str) -> String {
|
|||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_log::Builder::new()
|
||||
.targets([
|
||||
Target::new(TargetKind::Stdout),
|
||||
Target::new(TargetKind::LogDir { file_name: None }),
|
||||
Target::new(TargetKind::Webview),
|
||||
])
|
||||
.build())
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
|
|
@ -17,6 +25,7 @@ pub fn run() {
|
|||
.plugin(tauri_plugin_shell::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.invoke_handler(tauri::generate_handler![send_request])
|
||||
// .invoke_handler(tauri::generate_handler![api_post_req])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
|
@ -27,3 +36,16 @@ pub fn run() {
|
|||
fn send_request(url: &str) -> String {
|
||||
format!("You've tried to access this URL: {}.", url)
|
||||
}
|
||||
|
||||
|
||||
// use reqwest::{redirect::Policy};
|
||||
|
||||
|
||||
// #[tauri::command]
|
||||
// async fn api_post_req(url: &str) -> String {
|
||||
|
||||
// let client = reqwest::Client::new();
|
||||
// let u = url;
|
||||
// let res = client.get("http://httpbin.org/post").send();
|
||||
// return "".to_string();//res.wait().is_ok().to_string();
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -10,12 +10,14 @@
|
|||
"windows": [
|
||||
{
|
||||
"title": "tazik2",
|
||||
"width": 1280,
|
||||
"height": 720
|
||||
"width": 1242,
|
||||
"height": 692,
|
||||
"y":0,
|
||||
"x": 68
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": ""
|
||||
"csp": "*"
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue