diff --git a/files/app/main/firstuse.ut b/files/app/main/firstuse.ut index 83b70ff7..b480687b 100755 --- a/files/app/main/firstuse.ut +++ b/files/app/main/firstuse.ut @@ -74,18 +74,18 @@ if (request.env.REQUEST_METHOD === "PUT") {
New Password
-
+
Retype Password
-
+
Enter a password, twice, to assign to your node for access to configuration information later
-
+
@@ -107,17 +107,17 @@ if (request.env.REQUEST_METHOD === "PUT") { passwd2.required = passwd1.value ? "required" : ""; passwd2.pattern = passwd1.value; if (name.validity.valid && passwd1.validity.valid && passwd2.validity.valid) { - htmx.find("button").disabled = false; + htmx.find("button.save").disabled = false; } else { - htmx.find("button").disabled = true; + htmx.find("button.save").disabled = true; } } htmx.on("input[name=name]", "keyup", change); htmx.on("input[name=passwd1]", "keyup", change); htmx.on("input[name=passwd2]", "keyup", change); htmx.on("button", "click", _ => { - htmx.find("button").disabled = true; + htmx.find("button.save").disabled = true; htmx.ajax("PUT", "{{request.env.REQUEST_URI}}", { values: { name: htmx.find("input[name=name]").value, @@ -128,5 +128,6 @@ if (request.env.REQUEST_METHOD === "PUT") { }); })(); + {{_R("password-ctrl")}} diff --git a/files/app/main/status/e/basics.ut b/files/app/main/status/e/basics.ut index f5e761cd..37650cfd 100755 --- a/files/app/main/status/e/basics.ut +++ b/files/app/main/status/e/basics.ut @@ -206,7 +206,7 @@ if (request.env.REQUEST_METHOD === "DELETE") {
Change the node password
- + {{_R("password", { name: "passwd1", pattern: "[^#'\"]+" })}}
@@ -215,7 +215,7 @@ if (request.env.REQUEST_METHOD === "DELETE") {
Passwords must match
- + {{_R("password", { name: "passwd2" })}}
{{_H("Set a new password for this device by entering it twice in the boxes. Don't use the # or any quote character. This password @@ -280,14 +280,6 @@ if (request.env.REQUEST_METHOD === "DELETE") { }); } }); - function toggle() - { - const t = htmx.find("dialog input[name=passwd1]").type; - htmx.find("dialog input[name=passwd1]").type = t === "text" ? "password" : "text"; - htmx.find("dialog input[name=passwd2]").type = t === "text" ? "password" : "text"; - } - htmx.on("dialog input[name=passwd1] + button", "click", toggle); - htmx.on("dialog input[name=passwd2] + button", "click", toggle); {% if (includeAdvanced) { %} htmx.on("dialog input[name=ssh_add]", "change", e => { htmx.find("dialog select[name=ssh_remove]").value = "-"; @@ -337,4 +329,5 @@ if (request.env.REQUEST_METHOD === "DELETE") { {% } %} })(); + {{_R("password-ctrl")}} diff --git a/files/app/main/status/e/radio-and-antenna.ut b/files/app/main/status/e/radio-and-antenna.ut index 13a8f2d8..b108e859 100755 --- a/files/app/main/status/e/radio-and-antenna.ut +++ b/files/app/main/status/e/radio-and-antenna.ut @@ -363,7 +363,7 @@ if (request.env.REQUEST_METHOD === "DELETE") {
Hotspot password
- +
@@ -387,7 +387,7 @@ if (request.env.REQUEST_METHOD === "DELETE") {
Client password
- +
@@ -593,4 +593,5 @@ if (request.env.REQUEST_METHOD === "DELETE") { {% } %} })(); + {{_R("password-ctrl")}} diff --git a/files/app/partial/password-ctrl.ut b/files/app/partial/password-ctrl.ut new file mode 100755 index 00000000..ac3552d9 --- /dev/null +++ b/files/app/partial/password-ctrl.ut @@ -0,0 +1,16 @@ + diff --git a/files/app/partial/password.ut b/files/app/partial/password.ut new file mode 100755 index 00000000..68fae751 --- /dev/null +++ b/files/app/partial/password.ut @@ -0,0 +1 @@ + diff --git a/files/app/partial/radio-and-antenna.ut b/files/app/partial/radio-and-antenna.ut index aa140879..bf56cb8c 100755 --- a/files/app/partial/radio-and-antenna.ut +++ b/files/app/partial/radio-and-antenna.ut @@ -100,11 +100,10 @@
{{r.channel}}
channel
-
+
{{r.ssid}}
ssid
-
{% } @@ -113,7 +112,7 @@
WAN Client
-
+
{{r.ssid}}
ssid
diff --git a/files/app/resource/css/admin.css b/files/app/resource/css/admin.css index b9a07dac..c40c1da9 100755 --- a/files/app/resource/css/admin.css +++ b/files/app/resource/css/admin.css @@ -315,27 +315,32 @@ label.switch { text-transform: capitalize; } -#ctrl-modal .basics .password .cols div:last-child + +/* basics end */ + +/* password start */ + +div:has(> input.password-toggle) { position: relative; flex: 0; } -#ctrl-modal .basics .password input +input.password-toggle { - padding-right: 30px; + padding-right: 30px !important; } -#ctrl-modal .basics .password input + button +input.password-toggle + button.icon.eye { - position: absolute; + position: absolute !important; right: 2px; - border: 0; - border-radius: 12px; - scale: 0.8; - background-color: transparent; + border: 0 !important; + border-radius: 12px !important; + scale: 0.8 !important; + background-color: transparent !important; filter: var(--icon-filter); } -/* basics end */ +/* password end */ /* tools start */ @@ -878,7 +883,7 @@ label.switch border: 1px solid black; outline: none; } -.firstuse input[type=password] +.firstuse input.password-toggle { width: 200px; } @@ -891,7 +896,7 @@ label.switch { font-size: 16px; } -.firstuse button +.firstuse button.save { width: 200px; padding: 10px; @@ -901,7 +906,7 @@ label.switch color: white; font: inherit; } -.firstuse button:disabled +.firstuse button.save:disabled { background-color: #e0e0e0; color: #c0c0c0; @@ -925,6 +930,14 @@ label.switch font: inherit; font-size: 12px; } +.firstuse input.password-toggle + button.icon.eye +{ + top: 6px; + right: 6px; + width: 30px; + height: 30px; + filter: none; +} /* reboot and firstuse end */