mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
277da4da31
commit
58b9a2d708
2 changed files with 6 additions and 2 deletions
|
|
@ -417,16 +417,19 @@ ${accountHTML}
|
||||||
break;
|
break;
|
||||||
} else if (target.id === "menuNewDaily") {
|
} else if (target.id === "menuNewDaily") {
|
||||||
newDailyNote();
|
newDailyNote();
|
||||||
|
closePanel();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
} else if (target.id === "menuCard") {
|
} else if (target.id === "menuCard") {
|
||||||
openCard();
|
openCard();
|
||||||
|
closePanel();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
} else if (target.id === "menuNewNotebook") {
|
} else if (target.id === "menuNewNotebook") {
|
||||||
newNotebook();
|
newNotebook();
|
||||||
|
closePanel();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
|
|
@ -460,6 +463,7 @@ ${accountHTML}
|
||||||
break;
|
break;
|
||||||
} else if (target.id === "menuHistory" && !window.siyuan.config.readonly) {
|
} else if (target.id === "menuHistory" && !window.siyuan.config.readonly) {
|
||||||
openHistory();
|
openHistory();
|
||||||
|
closePanel();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export const newDailyNote = () => {
|
||||||
const localNotebookId = localStorage.getItem(Constants.LOCAL_DAILYNOTEID);
|
const localNotebookId = 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,
|
app: Constants.SIYUAN_APPID,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -68,7 +68,7 @@ export const newDailyNote = () => {
|
||||||
|
|
||||||
export const mountHelp = () => {
|
export const mountHelp = () => {
|
||||||
const notebookId = Constants.HELP_PATH[window.siyuan.config.appearance.lang as "zh_CN" | "en_US"];
|
const notebookId = Constants.HELP_PATH[window.siyuan.config.appearance.lang as "zh_CN" | "en_US"];
|
||||||
fetchPost("/api/notebook/removeNotebook", {notebook: notebookId, callback:Constants.CB_MOUNT_REMOVE}, () => {
|
fetchPost("/api/notebook/removeNotebook", {notebook: notebookId, callback: Constants.CB_MOUNT_REMOVE}, () => {
|
||||||
fetchPost("/api/notebook/openNotebook", {
|
fetchPost("/api/notebook/openNotebook", {
|
||||||
callback: Constants.CB_MOUNT_HELP,
|
callback: Constants.CB_MOUNT_HELP,
|
||||||
notebook: notebookId
|
notebook: notebookId
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue