aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/base.html.jinja
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-09-09 11:44:59 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 14:03:18 +0200
commitbeb163cfd15b93bf664b6a0590e114d4432e3ef9 (patch)
tree4a98def490dabb5f4df927a7a79504eb2ab66c9c /src/hydrilla/proxy/web_ui/templates/base.html.jinja
parent45e5cf8dc3ca936e2db8e7e45689d0a3331aad43 (diff)
downloadhaketilo-hydrilla-beb163cfd15b93bf664b6a0590e114d4432e3ef9.tar.gz
haketilo-hydrilla-beb163cfd15b93bf664b6a0590e114d4432e3ef9.zip
[proxy] allow prompting the user when a package suitable for current site is found; add proxy's options page
This commit also causes uncached responses to be forced on all HTTP request to external servers. This is needed to make sure that changes Haketilo makes to HTTP response headers are always picked up by the browser. The drawback is that this increases network traffic causing a performance hit. We might optimize this in the future.
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/base.html.jinja')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/base.html.jinja17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja
index 918fb28..06af7d9 100644
--- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja
@@ -20,9 +20,9 @@ in a proprietary work, I am not going to enforce this in court.
-#}
<!DOCTYPE html>
-{% macro button_row(buttons_data) %}
+{% macro button_row(buttons_data, common_fields={}) %}
<div class="flex-row">
- {% for classes, text, action in buttons_data %}
+ {% for classes, text, extra_fields in buttons_data %}
{% if not loop.first %}
<div class="button-row-separator"></div>
{% do classes.append('button-bordering-left') %}
@@ -39,7 +39,13 @@ in a proprietary work, I am not going to enforce this in court.
{% endif %}
<form method="POST" class="flex-row">
- <input name="action" value="{{ action }}" type="hidden">
+ {% for name, value in extra_fields.items() %}
+ <input name="{{ name }}" value="{{ value }}" type="hidden">
+ {% endfor %}
+ {% for name, value in common_fields.items() %}
+ <input name="{{ name }}" value="{{ value }}" type="hidden">
+ {% endfor %}
+
<button class="{{ classes|join(' ') }}"{{ disabled_attr }}>
{{ text }}
</button>
@@ -92,6 +98,10 @@ in a proprietary work, I am not going to enforce this in court.
background-color: #fcc;
}
+ #main > .error-note:first-child {
+ margin-top: 10px;
+ }
+
.block-with-bottom-margin, .flex-row, aside, p {
display: block;
margin: 0 0 10px 0;
@@ -226,6 +236,7 @@ in a proprietary work, I am not going to enforce this in court.
{%
set navigation_bar = [
('home', _('web_ui.base.nav.home')),
+ ('options.options', _('web_ui.base.nav.options')),
('items.packages', _('web_ui.base.nav.packages')),
('items.libraries', _('web_ui.base.nav.libraries')),
('repos.repos', _('web_ui.base.nav.repos')),