mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 激活码不可用时清空输入
This commit is contained in:
@@ -219,7 +219,11 @@ ${window.siyuan.languages.account8}`;
|
||||
});
|
||||
const activationCodeElement = account.element.querySelector("#activationCode");
|
||||
activationCodeElement.addEventListener("click", () => {
|
||||
fetchPost("/api/account/checkActivationcode", {data: (activationCodeElement.previousElementSibling as HTMLInputElement).value}, (response) => {
|
||||
const activationCodeInput = (activationCodeElement.previousElementSibling as HTMLInputElement)
|
||||
fetchPost("/api/account/checkActivationcode", {data: activationCodeInput.value}, (response) => {
|
||||
if (0 !== response.code) {
|
||||
activationCodeInput.value = "";
|
||||
}
|
||||
confirmDialog(window.siyuan.languages.activationCode, response.msg, () => {
|
||||
if (response.code === 0) {
|
||||
fetchPost("/api/account/useActivationcode", {data: (activationCodeElement.previousElementSibling as HTMLInputElement).value}, () => {
|
||||
|
||||
Reference in New Issue
Block a user