From 205a5a4cc49e33b86366969a76b3303d71287761 Mon Sep 17 00:00:00 2001 From: wyhaya Date: Sun, 5 Jul 2020 22:34:43 +0800 Subject: Add generate QR code (#330) * Add generate QR code * Add --qrcode option --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 3ff35c8..a9e7944 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,6 +57,9 @@ pub struct MiniserveConfig { /// However, if a directory contains this file, miniserve will serve that file instead. pub index: Option, + /// Enable QR code display + pub show_qrcode: bool, + /// Enable file upload pub file_upload: bool, @@ -258,6 +261,7 @@ fn configure_app(app: App) -> App { let no_symlinks = app.state().no_symlinks; let random_route = app.state().random_route.clone(); let default_color_scheme = app.state().default_color_scheme; + let show_qrcode = app.state().show_qrcode; let file_upload = app.state().file_upload; let tar_enabled = app.state().tar_enabled; let zip_enabled = app.state().zip_enabled; @@ -288,6 +292,7 @@ fn configure_app(app: App) -> App { file_upload, random_route.clone(), default_color_scheme, + show_qrcode, u_r.clone(), tar_enabled, zip_enabled, -- cgit v1.2.3