The reset button in the password dialog now only appears if the password is set

This commit is contained in:
Mathias Wagner
2022-08-28 22:31:01 +02:00
parent 7cab39e10a
commit 17e7d52040

View File

@@ -85,7 +85,7 @@ function DropdownComponent() {
title: "Neues Passwort festlegen",
placeholder: "Neues Passwort",
type: "password",
unsetButton: true,
unsetButton: localStorage.getItem("password") != null,
unsetButtonText: "Sperre aufheben",
onClear: () => {
fetch("/api/config/password", {headers: headers, method: "PATCH", body: JSON.stringify({value: "none"})})