Skip to content

Commit 5af9339

Browse files
committed
Added window size
1 parent e84fd21 commit 5af9339

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kuvpn"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
edition = "2021"
55

66
[dependencies]

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Define the default package (to fix nix run)
2727
packages.default = pkgs.rustPlatform.buildRustPackage {
2828
pname = "kuvpn";
29-
version = "0.6.3";
29+
version = "0.6.4";
3030

3131
src = ./.;
3232

src/main.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ fn create_browser(agent: &str) -> Result<Browser, Box<dyn Error>> {
124124
.headless(false)
125125
.sandbox(false)
126126
.idle_browser_timeout(Duration::MAX)
127+
.window_size(Some((800, 800)))
127128
.args(vec![
128129
body.as_os_str(),
129130
window.as_os_str(),
@@ -175,14 +176,20 @@ pub fn execute_openconnect(
175176
// If a custom run command is provided, check if it's available and prioritize it
176177
if let Some(custom_command) = run_command {
177178
info!("Custom run command provided: {}", custom_command);
178-
179+
179180
if which(custom_command).is_ok() {
180181
info!("Custom command found: {}", custom_command);
181182
default_tools.insert(0, custom_command.as_str());
182183
} else {
183184
// Print message and fallback to default tools
184-
println!("Custom command '{}' not found, falling back to default tools.", custom_command);
185-
info!("Custom command '{}' could not be found, using default tools.", custom_command);
185+
println!(
186+
"Custom command '{}' not found, falling back to default tools.",
187+
custom_command
188+
);
189+
info!(
190+
"Custom command '{}' could not be found, using default tools.",
191+
custom_command
192+
);
186193
}
187194
} else {
188195
info!("No custom run command provided, defaulting to built-in tools.");
@@ -192,7 +199,8 @@ pub fn execute_openconnect(
192199
info!("Checking for available tools/commands: {:?}", default_tools);
193200

194201
// Check for the first available tool/command
195-
let command_to_run = default_tools.iter()
202+
let command_to_run = default_tools
203+
.iter()
196204
.find_map(|&tool| {
197205
if which(tool).is_ok() {
198206
Some(tool)

0 commit comments

Comments
 (0)