Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-07-09 18:15:54 +08:00
commit 775ac0413a
7 changed files with 24 additions and 21 deletions

View file

@ -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}, () => {

View file

@ -44,9 +44,6 @@ export const openFileById = (options: {
lockFile(data.data);
return;
}
if (data.code === 1) {
showMessage(data.msg);
}
openFile({
fileName: data.data.rootTitle,
rootIcon: data.data.rootIcon,

View file

@ -49,10 +49,6 @@ export const openMobileFileById = (id: string, hasContext?: boolean, action = [C
lockFile(data.data);
return;
}
if (data.code === 1) {
showMessage(data.msg);
return;
}
if (window.siyuan.mobileEditor) {
addLoading(window.siyuan.mobileEditor.protyle);
fetchPost("/api/filetree/getDoc", {