forked from retoor/devplacepy
feat: replace DiceBear avatar proxy with local Multiavatar SVG generation and remove avatar_style from signup
This commit is contained in:
@@ -9,8 +9,7 @@ class Application {
|
||||
this.initNotificationDismiss();
|
||||
this.initProfileEdit();
|
||||
this.initProjectForm();
|
||||
this.loadCSS("/static/css/variables.css");
|
||||
this.loadCSS("/static/css/base.css");
|
||||
this.initFormDisable();
|
||||
}
|
||||
|
||||
loadCSS(href) {
|
||||
@@ -83,6 +82,25 @@ class Application {
|
||||
titleCount.textContent = `${title.value.length}/500`;
|
||||
});
|
||||
}
|
||||
|
||||
form.addEventListener("submit", () => {
|
||||
const btn = form.querySelector("button[type='submit']");
|
||||
if (btn) {
|
||||
btn.disabled = true;
|
||||
btn.textContent = "Posting...";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initFormDisable() {
|
||||
document.querySelectorAll("form").forEach((form) => {
|
||||
form.addEventListener("submit", () => {
|
||||
const btn = form.querySelector("button[type='submit']");
|
||||
if (btn) {
|
||||
btn.disabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
initCommentForms() {
|
||||
|
||||
Reference in New Issue
Block a user