aboutsummaryrefslogtreecommitdiffstats
path: root/src/renderer.rs
diff options
context:
space:
mode:
authorDean Li <deantvv@gmail.com>2021-04-11 03:00:16 +0000
committerDean Li <deantvv@gmail.com>2021-04-11 03:00:16 +0000
commit2bae301ed8efcf4239849a45b94cdc42e398b905 (patch)
tree06cfbebfc33cca930a80b9c080de3af1dcfdc815 /src/renderer.rs
parentMerge pull request #488 from svenstaro/dependabot/cargo/http-0.2.4 (diff)
downloadminiserve-2bae301ed8efcf4239849a45b94cdc42e398b905.tar.gz
miniserve-2bae301ed8efcf4239849a45b94cdc42e398b905.zip
Separate tar archive and tar flags
It used to have one flag (-r) to enable both tar archive and tar. Now it has two flags [ -r: for tar, -g: for tar archive]. Related to #451
Diffstat (limited to '')
-rw-r--r--src/renderer.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index c9ec9cd..71a929a 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -26,6 +26,7 @@ pub fn page(
encoded_dir: &str,
breadcrumbs: Vec<Breadcrumb>,
tar_enabled: bool,
+ tar_archive_enabled: bool,
zip_enabled: bool,
hide_version_footer: bool,
) -> Markup {
@@ -94,10 +95,10 @@ pub fn page(
}
}
div.toolbar {
- @if tar_enabled || zip_enabled {
+ @if tar_enabled || tar_archive_enabled || zip_enabled {
div.download {
@for compression_method in CompressionMethod::iter() {
- @if compression_method.is_enabled(tar_enabled, zip_enabled) {
+ @if compression_method.is_enabled(tar_enabled, tar_archive_enabled, zip_enabled) {
(archive_button(compression_method, sort_method, sort_order))
}
}