mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-11 23:22:33 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
775ac0413a
7 changed files with 24 additions and 21 deletions
|
|
@ -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}, () => {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue