From 34f558a0f4aa76d225233cabfc51bec3b07f959d Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Thu, 29 Dec 2022 03:05:30 +0200 Subject: [PATCH] updating boop.html with new vars --- templates/boop.html | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/templates/boop.html b/templates/boop.html index 9a1d4d5..ee2efd7 100644 --- a/templates/boop.html +++ b/templates/boop.html @@ -1,10 +1,14 @@ {% set title = config["SITE_NAME"] %} {% set fhost_url = url_for("fhost", _external=True).rstrip("/") %} {% set max_size = config["MAX_CONTENT_LENGTH"]|filesizeformat(True) %} +{% set half_size = (config["MAX_CONTENT_LENGTH"]/2)|filesizeformat(True) %} {% set not_allowed = config["FHOST_MIME_BLACKLIST"]|join(", ") %} -{% set half = ((config["MAX_CONTENT_LENGTH"]/2)|filesizeformat(True)).split(" ")[0].rjust(27) %} -{% set max = max_size.split(" ")[0].rjust(27) %} +{% set min = config.get("FHOST_MIN_EXPIRATION", 2592000000)//86400000 %} +{% set half = ((config.get("FHOST_MIN_EXPIRATION", 2592000000)/2 + config.get("FHOST_MAX_EXPIRATION", 31536000000)/2)/86400000) %} +{% set max = config.get("FHOST_MAX_EXPIRATION", 31536000000)//86400000 %} {% set unit = max_size.split(" ")[1].rjust(54) %} +{% set max_size = (max_size|string).split(" ")[0].rjust(27) %} +{% set half_size = (half_size|string).split(" ")[0].rjust(27) %} @@ -151,7 +155,7 @@ retention = min_age + (-max_age + min_age) * pow((file_size / max_size - 1), 3) days - 365 | \\ +{{ '{: 6}'.format(max) }} | \\ | \\ | \\ | \\ @@ -159,7 +163,7 @@ days | \\ | .. | \ -197.5 | ----------..------------------------------------------- +{{ '{: 6.1f}'.format(half) }} | ----------..------------------------------------------- | .. | \ | .. @@ -168,10 +172,11 @@ days | ... | .... | ...... - 30 | .................... - 0{{ half }}{{ max }} +{{ '{: 6}'.format(min) }} | .................... + 0{{ half_size }}{{ max_size }} {{ unit }} +

UPLOAD DIRECTLY