using @tauri-apps/plugin-http replace @tauri-apps/api/http

This commit is contained in:
lloydzhou
2024-09-25 19:49:11 +08:00
parent 29296d42d7
commit 4c9fe56f33
7 changed files with 35 additions and 43 deletions

10
src-tauri/Cargo.lock generated
View File

@@ -3820,7 +3820,7 @@ dependencies = [
"webkit2gtk",
"webview2-com",
"windows 0.58.0",
"wry",
"wry 0.43.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -4594,7 +4594,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.59.0",
"windows-sys 0.52.0",
]
[[package]]
@@ -4945,6 +4945,12 @@ name = "wry"
version = "0.43.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4d715cf5fe88e9647f3d17b207b6d060d4a88e7171d4ccb2d2c657dd1d44728"
replace = "wry 0.43.1 (git+https://github.com/lloydzhou/wry?branch=webkitgtk-data_manager-directory)"
[[package]]
name = "wry"
version = "0.43.1"
source = "git+https://github.com/lloydzhou/wry?branch=webkitgtk-data_manager-directory#b854092847fadbc398aa727a1ed710adb3f4c8ea"
dependencies = [
"base64 0.22.1",
"block",

View File

@@ -4,7 +4,7 @@ version = "0.1.0"
description = "A cross platform app for LLM ChatBot."
authors = ["GPTsMotion Tech LLC"]
license = "mit"
repository = ""
repository = "https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web"
default-run = "nextchat"
edition = "2021"
rust-version = "1.71"
@@ -24,7 +24,7 @@ serde = { version = "1.0", features = ["derive"] }
log = "0.4"
tauri = { version = "2.0.0-rc.15", features = [] }
tauri-plugin-log = "2.0.0-rc"
tauri-plugin-http = "2.0.0-rc"
tauri-plugin-http = "2.0.0-rc.5"
[replace]
# using this version from github fixed data_directory for webkitgtk
@@ -36,7 +36,7 @@ panic = "abort" # Strip expensive panic clean-up logic
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
lto = true # Enables link to optimizations
opt-level = "s" # Optimize for binary size
strip = true # Remove debug symbols
# strip = true # Remove debug symbols
[features]
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.

View File

@@ -7,13 +7,8 @@
"core:default",
"core:window:allow-start-dragging",
"core:window:allow-maximize",
"http:default",
"http:allow-fetch",
"http:allow-fetch-cancel",
"http:allow-fetch-read-body",
"http:allow-fetch-send",
{
"identifier": "http:allow-fetch",
"identifier": "http:default",
"allow": [
{
"url": "https://*"

View File

@@ -1,6 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
"productName": "NextChat",
"mainBinaryName": "next-chat",
"identifier": "com.yida.chatgpt.next.web",
"version": "2.15.4",
"build": {
@@ -45,4 +46,4 @@
"icons/icon.ico"
]
}
}
}