update deps
continuous-integration/drone/push Build encountered an error Details

This commit is contained in:
Tim-Paik 2022-07-02 01:20:37 +08:00
parent ed45c5dcd5
commit 8962b3d80b
Signed by: Tim-Paik
GPG Key ID: DC36A050DB42566D
7 changed files with 329 additions and 432 deletions

697
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -4,3 +4,8 @@ members = [
"neutauri_bundler",
"neutauri_data",
]
[profile.release]
lto = true
strip = true
opt-level = "z"

View File

@ -10,7 +10,7 @@ neutauri_data = {path = "../neutauri_data", features = ["bundler"]}
new_mime_guess = "4.0"
serde = {version = "1.0", features = ["derive"]}
toml = "0.5"
wry = {version = "0.16", default-features = false, features = ["protocol", "tray", "gtk-tray", "transparent", "fullscreen", "devtools"]}
wry = {version = "0.19", default-features = false, features = ["protocol", "tray", "transparent", "fullscreen", "devtools"]}
[target.'cfg(windows)'.dependencies]
rcedit = {git = "https://github.com/Tim-Paik/rcedit-rs.git", rev = "2805fca"}
@ -23,8 +23,3 @@ FileDescription = "Neutauri Bundler"
LegalCopyright = "@2022 Neutauri Developers"
OriginalFilename = ""
ProductName = "Neutauri"
[profile.release]
lto = true
strip = true
opt-level = "z"

View File

@ -57,12 +57,15 @@ pub fn dev(config_path: String) -> wry::Result<()> {
)?)),
None => window_builder,
};
let monitor_size = event_loop.primary_monitor().unwrap_or_else(|| {
event_loop
.available_monitors()
.next()
.expect("no monitor found")
}).size();
let monitor_size = event_loop
.primary_monitor()
.unwrap_or_else(|| {
event_loop
.available_monitors()
.next()
.expect("no monitor found")
})
.size();
let window_builder = match config.window_attr()?.inner_size {
Some(size) => window_builder.with_inner_size(get_size(size, monitor_size)),
None => window_builder,
@ -186,9 +189,7 @@ pub fn dev(config_path: String) -> wry::Result<()> {
event: WindowEvent::CloseRequested,
..
} => *control_flow = ControlFlow::Exit,
_ => {
let _ = webview.resize();
}
_ => (),
}
});
}

View File

@ -10,7 +10,7 @@ image = {version = "0.24", optional = true}
new_mime_guess = {version = "4.0", optional = true}
serde = {version = "1.0", features = ["derive"]}
toml = {version = "0.5", optional = true}
wry = {version = "0.16", default-features = false, features = ["protocol", "tray", "gtk-tray", "transparent", "fullscreen"]}
wry = {version = "0.19", default-features = false, features = ["protocol", "tray", "transparent", "fullscreen"]}
[features]
bundler = ["new_mime_guess", "toml", "image"]

View File

@ -5,7 +5,7 @@ version = "0.1.0"
[dependencies]
neutauri_data = {path = "../neutauri_data", features = ["runtime"]}
wry = {version = "0.16", default-features = false, features = ["protocol", "tray", "gtk-tray", "transparent", "fullscreen"]}
wry = {version = "0.19", default-features = false, features = ["protocol", "tray", "transparent", "fullscreen"]}
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
@ -17,9 +17,3 @@ LegalCopyright = ""
OriginalFilename = ""
ProductName = ""
ProductVersion = ""
[profile.release]
lto = true
strip = true
opt-level = "z"
panic = "abort"

View File

@ -58,12 +58,15 @@ fn main() -> wry::Result<()> {
)?)),
None => window_builder,
};
let monitor_size = event_loop.primary_monitor().unwrap_or_else(|| {
event_loop
.available_monitors()
.next()
.expect("no monitor found")
}).size();
let monitor_size = event_loop
.primary_monitor()
.unwrap_or_else(|| {
event_loop
.available_monitors()
.next()
.expect("no monitor found")
})
.size();
let window_builder = match res.window_attr.inner_size {
Some(size) => window_builder.with_inner_size(get_size(size, monitor_size)),
None => window_builder,
@ -141,7 +144,9 @@ fn main() -> wry::Result<()> {
.with_visible(res.window_attr.visible)
.with_transparent(res.window_attr.transparent)
.with_web_context(&mut web_context)
.with_initialization_script(r#"window.oncontextmenu = (event) => { event.preventDefault(); }"#)
.with_initialization_script(
r#"window.oncontextmenu = (event) => { event.preventDefault(); }"#,
)
.with_custom_protocol(PROTOCOL.to_string(), move |request| {
let path = custom_protocol_uri_to_path(PROTOCOL, request.uri())?;
let mut file = match res.open(path) {
@ -177,9 +182,7 @@ fn main() -> wry::Result<()> {
event: WindowEvent::CloseRequested,
..
} => *control_flow = ControlFlow::Exit,
_ => {
let _ = webview.resize();
}
_ => (),
}
});
}