Updated pushing icon, and removed autofill box
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user