mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
1946be52e1
commit
9fb4d9da2a
2 changed files with 8 additions and 4 deletions
|
|
@ -20,14 +20,16 @@ export const newDailyNote = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
fetchPost("/api/filetree/createDailyNote", {
|
fetchPost("/api/filetree/createDailyNote", {
|
||||||
notebook: notebookId
|
notebook: notebookId,
|
||||||
|
app: Constants.SIYUAN_APPID,
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const localNotebookId = window.localStorage.getItem(Constants.LOCAL_DAILYNOTEID);
|
const localNotebookId = window.localStorage.getItem(Constants.LOCAL_DAILYNOTEID);
|
||||||
if (localNotebookId && getNotebookName(localNotebookId) && !isMobile()) {
|
if (localNotebookId && getNotebookName(localNotebookId) && !isMobile()) {
|
||||||
fetchPost("/api/filetree/createDailyNote", {
|
fetchPost("/api/filetree/createDailyNote", {
|
||||||
notebook:localNotebookId
|
notebook:localNotebookId,
|
||||||
|
app: Constants.SIYUAN_APPID,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let optionsHTML = "";
|
let optionsHTML = "";
|
||||||
|
|
@ -56,7 +58,8 @@ export const newDailyNote = () => {
|
||||||
const notebook = selectElement.value;
|
const notebook = selectElement.value;
|
||||||
window.localStorage.setItem(Constants.LOCAL_DAILYNOTEID, notebook);
|
window.localStorage.setItem(Constants.LOCAL_DAILYNOTEID, notebook);
|
||||||
fetchPost("/api/filetree/createDailyNote", {
|
fetchPost("/api/filetree/createDailyNote", {
|
||||||
notebook
|
notebook,
|
||||||
|
app: Constants.SIYUAN_APPID,
|
||||||
});
|
});
|
||||||
dialog.destroy();
|
dialog.destroy();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,8 @@ const initBar = () => {
|
||||||
label: item.name,
|
label: item.name,
|
||||||
click: () => {
|
click: () => {
|
||||||
fetchPost("/api/filetree/createDailyNote", {
|
fetchPost("/api/filetree/createDailyNote", {
|
||||||
notebook: item.id
|
notebook: item.id,
|
||||||
|
app: Constants.SIYUAN_APPID,
|
||||||
});
|
});
|
||||||
window.localStorage.setItem(Constants.LOCAL_DAILYNOTEID, item.id);
|
window.localStorage.setItem(Constants.LOCAL_DAILYNOTEID, item.id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue