mirror of
https://github.com/adriankumpf/tesla_auth.git
synced 2026-02-27 09:54:03 +08:00
Upgrade wry to 0.35
This commit is contained in:
Generated
+566
-542
File diff suppressed because it is too large
Load Diff
+6
-5
@@ -16,13 +16,14 @@ license = "MIT OR Apache-2.0"
|
||||
anyhow = "1.0.75"
|
||||
argh = "0.1.12"
|
||||
log = "0.4.20"
|
||||
muda = "0.9.3"
|
||||
muda = "0.11.2"
|
||||
oauth2 = "4.4.2"
|
||||
reqwest = { version = "0.11.22", default-features = false, features = ["json", "rustls-tls"] }
|
||||
serde = { version = "1.0.189", default-features = false, features = ["derive"] }
|
||||
serde_json = "1.0.107"
|
||||
simple_logger = { version = "4.2.0", default-features = false, features = ["stderr"] }
|
||||
wry = { version = "0.33.1", default-features = false, features = ["devtools", "tao"] }
|
||||
serde = { version = "1.0.193", default-features = false, features = ["derive"] }
|
||||
serde_json = "1.0.108"
|
||||
simple_logger = { version = "4.3.0", default-features = false, features = ["stderr"] }
|
||||
tao = { version = "0.24", default-features = false, features = [ "rwh_05" ] }
|
||||
wry = { version = "0.35.0", default-features = false, features = ["devtools"] }
|
||||
|
||||
[build-dependencies]
|
||||
static_vcruntime = "2.0.0"
|
||||
|
||||
+30
-7
@@ -8,14 +8,16 @@ use oauth2::url::Url;
|
||||
use simple_logger::SimpleLogger;
|
||||
|
||||
use muda::{Menu, PredefinedMenuItem, Submenu};
|
||||
use wry::application::event::{Event, WindowEvent};
|
||||
use wry::application::event_loop::{ControlFlow, EventLoopBuilder, EventLoopProxy};
|
||||
use tao::{
|
||||
event::{Event, WindowEvent},
|
||||
event_loop::{ControlFlow, EventLoopBuilder, EventLoopProxy},
|
||||
window::WindowBuilder,
|
||||
};
|
||||
#[cfg(target_os = "linux")]
|
||||
use wry::application::platform::unix::WindowExtUnix;
|
||||
use tao::platform::unix::WindowExtUnix;
|
||||
#[cfg(target_os = "windows")]
|
||||
use wry::application::platform::windows::WindowExtWindows;
|
||||
use wry::application::window::WindowBuilder;
|
||||
use wry::webview::WebViewBuilder;
|
||||
use tao::platform::windows::WindowExtWindows;
|
||||
use wry::WebViewBuilder;
|
||||
|
||||
mod auth;
|
||||
mod htime;
|
||||
@@ -119,7 +121,28 @@ fn main() -> anyhow::Result<()> {
|
||||
|
||||
let proxy = event_proxy.clone();
|
||||
|
||||
let webview = WebViewBuilder::new(window)?
|
||||
#[cfg(any(
|
||||
target_os = "windows",
|
||||
target_os = "macos",
|
||||
target_os = "ios",
|
||||
target_os = "android"
|
||||
))]
|
||||
let builder = WebViewBuilder::new(&window);
|
||||
|
||||
#[cfg(not(any(
|
||||
target_os = "windows",
|
||||
target_os = "macos",
|
||||
target_os = "ios",
|
||||
target_os = "android"
|
||||
)))]
|
||||
let builder = {
|
||||
use tao::platform::unix::WindowExtUnix;
|
||||
use wry::WebViewBuilderExtUnix;
|
||||
let vbox = window.default_vbox().unwrap();
|
||||
WebViewBuilder::new_gtk(vbox)
|
||||
};
|
||||
|
||||
let webview = builder
|
||||
.with_initialization_script(INITIALIZATION_SCRIPT)
|
||||
.with_navigation_handler(move |uri: String| {
|
||||
let uri = Url::parse(&uri).expect("not a valid URL");
|
||||
|
||||
Reference in New Issue
Block a user