diff options
| author | KunoiSayami <[email protected]> | 2021-08-14 12:11:30 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2021-08-14 12:11:30 +0800 |
| commit | de721bd8ef90f4158007a8e8b9b9e2c431dc46f7 (patch) | |
| tree | 9fa91fe1d91f13c8fd42d3716bf2e3333725bdd5 /src | |
| parent | 5da9a6f954f9ebc8bd796c13bba3b5085e3478ef (diff) | |
feat(core): Show version in authentication pagev3.0.6
Diffstat (limited to 'src')
| -rw-r--r-- | src/authentication_page.html | 2 | ||||
| -rw-r--r-- | src/main.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/authentication_page.html b/src/authentication_page.html index c62dce0..6ece746 100644 --- a/src/authentication_page.html +++ b/src/authentication_page.html @@ -1,4 +1,4 @@ -<h2>Authentication Required</h2> +<h2>Authentication Required<sup style="font-weight: normal;">v{{version}}</sup></h2> <form method="post" action="{{action}}"> <input type="hidden" name="redirect" value={{redirect}}" /> <table> diff --git a/src/main.rs b/src/main.rs index f960422..4b12952 100644 --- a/src/main.rs +++ b/src/main.rs @@ -244,6 +244,7 @@ async fn verify_login(cfg: &Config, data: &FormData) -> Result<bool> { pub struct Meta<'a> { action: &'a str, redirect: &'a str, + version: &'a str, } // Processing the `body` called by cgit. @@ -253,6 +254,7 @@ async fn cmd_body(matches: &ArgMatches<'_>, _cfg: Config) { let meta = Meta { action: matches.value_of("login-url").unwrap_or(""), redirect: matches.value_of("current-url").unwrap_or(""), + version: env!("CARGO_PKG_VERSION"), }; handlebars .render_template_to_write(source, &meta, std::io::stdout()) |
