From 78696f2f1000dd8715b76a865ee95da564185d0c Mon Sep 17 00:00:00 2001 From: lumpy Date: Fri, 16 Jan 2026 16:14:04 +0100 Subject: [PATCH 1/7] add password visibility toggle --- src/adminui/templates/auth/login.html | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/adminui/templates/auth/login.html b/src/adminui/templates/auth/login.html index 6a61642..b16e7a5 100644 --- a/src/adminui/templates/auth/login.html +++ b/src/adminui/templates/auth/login.html @@ -4,6 +4,7 @@ {% block title %}Sign into Kiwix Admin{% endblock %} {% block head %} + {% endblock %} @@ -72,14 +81,21 @@ -
+
- {% if is_incorrect and message_content %}
{{ message_content }}
{% endif %}
@@ -90,18 +106,24 @@ {% endblock %} From 136c6309e66e74c90a55a16e5d8207276100c313 Mon Sep 17 00:00:00 2001 From: lumpy Date: Wed, 21 Jan 2026 14:34:22 +0100 Subject: [PATCH 3/7] fix layout and hover visibility --- src/adminui/templates/auth/login.html | 42 +++++++++++---------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/src/adminui/templates/auth/login.html b/src/adminui/templates/auth/login.html index e5be4cb..fa62c13 100644 --- a/src/adminui/templates/auth/login.html +++ b/src/adminui/templates/auth/login.html @@ -56,16 +56,6 @@ --bs-link-hover-color-rgb: 227,130,14; text-decoration: none; } - - #toggle-password { - border: none; - background: transparent; - } - - .items-center { - display: flex; - align-items: center; - } {% endblock %} @@ -81,22 +71,24 @@
-
+
- - - - {% if is_incorrect and message_content %}
{{ message_content }}
{% endif %} +
+ + + + {% if is_incorrect and message_content %}
{{ message_content }}
{% endif %} +
From 1fa98d362345c106d5fe4e95a1073ecc02f4a029 Mon Sep 17 00:00:00 2001 From: lumpy Date: Wed, 21 Jan 2026 15:20:50 +0100 Subject: [PATCH 4/7] Refactor: extract password toggle to macro and put SVGs in files --- src/adminui/templates/auth/login.html | 58 +++++++++-------------- src/adminui/templates/icons/eye-slash.svg | 5 ++ src/adminui/templates/icons/eye.svg | 4 ++ src/adminui/templates/macros.html | 20 ++++++++ 4 files changed, 51 insertions(+), 36 deletions(-) create mode 100644 src/adminui/templates/icons/eye-slash.svg create mode 100644 src/adminui/templates/icons/eye.svg create mode 100644 src/adminui/templates/macros.html diff --git a/src/adminui/templates/auth/login.html b/src/adminui/templates/auth/login.html index fa62c13..7fcecbd 100644 --- a/src/adminui/templates/auth/login.html +++ b/src/adminui/templates/auth/login.html @@ -1,5 +1,8 @@ {% extends "raw_base.html" %} +{# import the macro file to use the password function #} +{% from "macros.html" import password_input %} + {% block theme %}light{% endblock %} {% block title %}Sign into Kiwix Admin{% endblock %} @@ -71,51 +74,34 @@
-
- -
- - - - {% if is_incorrect and message_content %}
{{ message_content }}
{% endif %} -
-
+ {{ password_input(name="password", error=message_content if is_incorrect else None) }}
+{% endblock %} +{% block javascript %} {% endblock %} diff --git a/src/adminui/templates/icons/eye-slash.svg b/src/adminui/templates/icons/eye-slash.svg new file mode 100644 index 0000000..cf2e54d --- /dev/null +++ b/src/adminui/templates/icons/eye-slash.svg @@ -0,0 +1,5 @@ + diff --git a/src/adminui/templates/icons/eye.svg b/src/adminui/templates/icons/eye.svg new file mode 100644 index 0000000..3be9488 --- /dev/null +++ b/src/adminui/templates/icons/eye.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/adminui/templates/macros.html b/src/adminui/templates/macros.html new file mode 100644 index 0000000..73f06ea --- /dev/null +++ b/src/adminui/templates/macros.html @@ -0,0 +1,20 @@ +{% macro password_input(name, label="Password", placeholder="", error=None) %} +
+ +
+ + + + + {% if error %}
{{ error }}
{% endif %} +
+
+{% endmacro %} From 39d4736b421c97ff4e3f73f281afc4578315fb7d Mon Sep 17 00:00:00 2001 From: rgaudin Date: Mon, 26 Jan 2026 12:19:09 +0000 Subject: [PATCH 5/7] Blend-in style Use same border color as the field next to it. --- src/adminui/templates/auth/login.html | 2 ++ src/adminui/templates/macros.html | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/adminui/templates/auth/login.html b/src/adminui/templates/auth/login.html index 7fcecbd..3a597fc 100644 --- a/src/adminui/templates/auth/login.html +++ b/src/adminui/templates/auth/login.html @@ -59,6 +59,8 @@ --bs-link-hover-color-rgb: 227,130,14; text-decoration: none; } + + .password-toggle, .password-toggle:hover, .password-toggle:focus { border-color: var(--bs-border-color); } {% endblock %} diff --git a/src/adminui/templates/macros.html b/src/adminui/templates/macros.html index 73f06ea..8adf0c8 100644 --- a/src/adminui/templates/macros.html +++ b/src/adminui/templates/macros.html @@ -2,18 +2,18 @@
- - - - + {% if error %}
{{ error }}
{% endif %}
From b493d239ed4c25d4f3d7625d1803ded80ebebba1 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Mon, 26 Jan 2026 12:20:15 +0000 Subject: [PATCH 6/7] Fix and harmonize JS - run function is required by the base class - using the `live()` event shortcut as is used on rest of codebase --- src/adminui/templates/auth/login.html | 37 ++++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/adminui/templates/auth/login.html b/src/adminui/templates/auth/login.html index 3a597fc..4315def 100644 --- a/src/adminui/templates/auth/login.html +++ b/src/adminui/templates/auth/login.html @@ -86,24 +86,25 @@ {% endblock %} {% block javascript %} - {% endblock %} From bfbb6544b035d13f2215e2c5c80f69a5ac813022 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Mon, 26 Jan 2026 12:24:21 +0000 Subject: [PATCH 7/7] Updated CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c6d9c1..9aa3db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added + +- Password visibility toggle on login page (dashboard#46) + ## [1.3.2] - 2025-12-11 ### Fixed