Updated pushing icon, and removed autofill box
This commit is contained in:
@@ -464,26 +464,43 @@
|
||||
}
|
||||
|
||||
.gd-sync-icon {
|
||||
position: relative;
|
||||
color: var(--text-muted);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
transition: color 0.16s ease, transform 0.16s ease;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
transition: color 0.16s ease;
|
||||
}
|
||||
|
||||
.gd-sync-btn:hover:not(:disabled) .gd-sync-icon {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.gd-sync-btn.is-loading .gd-sync-icon {
|
||||
animation: gd-sync-spin 1s linear infinite;
|
||||
.gd-sync-icon::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 1px;
|
||||
border: 2px solid transparent;
|
||||
border-top-color: var(--accent);
|
||||
border-right-color: var(--accent);
|
||||
border-radius: 999px;
|
||||
opacity: 0;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.gd-sync-btn.is-loading .gd-sync-icon::before {
|
||||
opacity: 1;
|
||||
animation: gd-sync-progress 0.9s linear infinite;
|
||||
}
|
||||
|
||||
.gd-sync-btn.is-loading .gd-cell-copy {
|
||||
opacity: 0.82;
|
||||
}
|
||||
|
||||
@keyframes gd-sync-spin {
|
||||
@keyframes gd-sync-progress {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
@@ -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