From 6f8eb97caedc0ff849190b099b0aa5f15592d984 Mon Sep 17 00:00:00 2001 From: Qetesh <4559341+Qetesh@users.noreply.github.com> Date: Mon, 27 Oct 2025 15:08:58 +0800 Subject: [PATCH] fix: swap width and height to correct default dimensions --- README.md | 8 ++++---- src/config.rs | 4 ++-- src/lib.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6f5076e..41f62f4 100644 --- a/README.md +++ b/README.md @@ -68,12 +68,12 @@ Following are the ENVs related to chrome and SMTP. * means required - ZO_CHROME_WINDOW_WIDTH Browser window width -1370 +730 ZO_CHROME_WINDOW_HEIGHT Browser window height -730 +1370 SMTP Settings @@ -150,8 +150,8 @@ ZO_SMTP_ENCRYPTION = "ssltls" # Or "starttls" # It will automatically download system specific chromium in the `./download` folder. # ZO_CHROME_CHECK_DEFAULT_PATH = false -ZO_CHROME_WINDOW_WIDTH = 1440 -ZO_CHROME_WINDOW_HEIGHT = 730 +ZO_CHROME_WINDOW_WIDTH = 730 +ZO_CHROME_WINDOW_HEIGHT = 1370 ``` On the OpenObserve part, you need to include the below ENVs - diff --git a/src/config.rs b/src/config.rs index 009c9c7..d5de3d7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -74,9 +74,9 @@ pub struct Chrome { pub chrome_with_head: bool, #[env_config(name = "ZO_CHROME_SLEEP_SECS", default = 20)] pub chrome_sleep_secs: u16, - #[env_config(name = "ZO_CHROME_WINDOW_WIDTH", default = 1370)] + #[env_config(name = "ZO_CHROME_WINDOW_WIDTH", default = 730)] pub chrome_window_width: u32, - #[env_config(name = "ZO_CHROME_WINDOW_HEIGHT", default = 730)] + #[env_config(name = "ZO_CHROME_WINDOW_HEIGHT", default = 1370)] pub chrome_window_height: u32, #[env_config(name = "ZO_CHROME_ADDITIONAL_ARGS", default = "")] pub chrome_additional_args: String, diff --git a/src/lib.rs b/src/lib.rs index a01e747..f84fb5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,8 +65,8 @@ pub struct ReportAttachmentDimensions { impl Default for ReportAttachmentDimensions { fn default() -> Self { Self { - height: CONFIG.chrome.chrome_window_width, - width: CONFIG.chrome.chrome_window_height, + height: CONFIG.chrome.chrome_window_height, + width: CONFIG.chrome.chrome_window_width, } } }