This commit is contained in:
Vanessa 2022-12-31 22:14:42 +08:00
parent 7688733364
commit 4ee566cbd9
30 changed files with 153 additions and 163 deletions

View file

@ -34,7 +34,7 @@ export const newDailyNote = () => {
});
return;
}
const localNotebookId = localStorage.getItem(Constants.LOCAL_DAILYNOTEID);
const localNotebookId = window.siyuan.storage[Constants.LOCAL_DAILYNOTEID];
if (localNotebookId && getNotebookName(localNotebookId) && !isMobile()) {
fetchPost("/api/filetree/createDailyNote", {
notebook: localNotebookId,
@ -66,7 +66,7 @@ export const newDailyNote = () => {
});
btnsElement[1].addEventListener("click", () => {
const notebook = selectElement.value;
localStorage.setItem(Constants.LOCAL_DAILYNOTEID, notebook);
window.siyuan.storage[Constants.LOCAL_DAILYNOTEID] = notebook;
fetchPost("/api/filetree/createDailyNote", {
notebook,
app: Constants.SIYUAN_APPID,