Updated pushing icon, and removed autofill box

This commit is contained in:
Andrew Zambazos
2026-05-13 21:11:17 +12:00
parent 6c23871833
commit 22dafdd5b6
2 changed files with 34 additions and 4 deletions
+13
View File
@@ -57,6 +57,16 @@ const defaultBranchName = "main";
const DEFAULT_EDITOR_VALUE = "__default_code__";
const CUSTOM_EDITOR_VALUE = "__custom__";
function disableInputAutocomplete(root = document) {
root.querySelectorAll("input, textarea").forEach((field) => {
if (field instanceof HTMLInputElement && ["button", "checkbox", "file", "hidden", "radio", "reset", "submit"].includes(field.type)) {
return;
}
field.setAttribute("autocomplete", field instanceof HTMLInputElement && field.type === "password" ? "new-password" : "off");
});
}
function escapeSvgAttr(value = "") {
return String(value)
.replaceAll("&", "&")
@@ -895,6 +905,7 @@ function welcomeView() {
</div>
</div>
`;
disableInputAutocomplete(appRoot);
bindServerFormEvents();
}
@@ -1653,6 +1664,7 @@ function dashboardView() {
${branchDialogTemplate(state, displayBranchName)}
`;
disableInputAutocomplete(appRoot);
bindDashboardEvents();
}
@@ -1727,6 +1739,7 @@ function openServerForm(serverId = null) {
const server = getState().settings.servers.find((item) => item.id === serverId) || null;
slot.innerHTML = serverFormTemplate(server);
disableInputAutocomplete(slot);
bindServerFormEvents(server);
}