mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 03:40:15 +01:00
This commit is contained in:
parent
95bb18afe1
commit
00eaf9b4b4
21 changed files with 123 additions and 111 deletions
|
|
@ -46,7 +46,7 @@ export const fetchPost = (url: string, data?: any, cb?: (response: IWebSocketDat
|
|||
}
|
||||
/// #if !BROWSER
|
||||
if (url === "/api/system/exit" || url === "/api/system/setWorkspaceDir" || (
|
||||
["/api/system/setUILayout", "/api/storage/setLocalStorage"].includes(url) && data.exit // 内核中断,点关闭处理
|
||||
["/api/system/setUILayout"].includes(url) && data.exit // 内核中断,点关闭处理
|
||||
)) {
|
||||
ipcRenderer.send(Constants.SIYUAN_CONFIG_CLOSETRAY);
|
||||
ipcRenderer.send(Constants.SIYUAN_QUIT);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {fetchPost} from "./fetch";
|
|||
import {Dialog} from "../dialog";
|
||||
import {getNotebookName, getOpenNotebookCount} from "./pathName";
|
||||
import {validateName} from "../editor/rename";
|
||||
import {setStorageVal} from "../protyle/util/compatibility";
|
||||
|
||||
export const newDailyNote = () => {
|
||||
const exit = window.siyuan.dialogs.find(item => {
|
||||
|
|
@ -67,6 +68,7 @@ export const newDailyNote = () => {
|
|||
btnsElement[1].addEventListener("click", () => {
|
||||
const notebook = selectElement.value;
|
||||
window.siyuan.storage[Constants.LOCAL_DAILYNOTEID] = notebook;
|
||||
setStorageVal(Constants.LOCAL_DAILYNOTEID, window.siyuan.storage[Constants.LOCAL_DAILYNOTEID]);
|
||||
fetchPost("/api/filetree/createDailyNote", {
|
||||
notebook,
|
||||
app: Constants.SIYUAN_APPID,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {openSearch} from "../search/spread";
|
||||
import {exportLayout, JSONToLayout, resetLayout, resizeDrag, resizeTabs} from "../layout/util";
|
||||
import {hotKey2Electron, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
import {hotKey2Electron, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
/// #if !BROWSER
|
||||
import {dialog, getCurrentWindow} from "@electron/remote";
|
||||
import {ipcRenderer, OpenDialogReturnValue} from "electron";
|
||||
|
|
@ -293,6 +293,7 @@ const initBar = () => {
|
|||
app: Constants.SIYUAN_APPID,
|
||||
});
|
||||
window.siyuan.storage[Constants.LOCAL_DAILYNOTEID] = item.id;
|
||||
setStorageVal(Constants.LOCAL_DAILYNOTEID, window.siyuan.storage[Constants.LOCAL_DAILYNOTEID]);
|
||||
}
|
||||
}).element);
|
||||
}
|
||||
|
|
@ -389,6 +390,7 @@ const initWindow = () => {
|
|||
pageSize: ipcData.pdfOptions.pageSize,
|
||||
scale: ipcData.pdfOptions.scale,
|
||||
};
|
||||
setStorageVal(Constants.LOCAL_EXPORTPDF, window.siyuan.storage[Constants.LOCAL_EXPORTPDF]);
|
||||
try {
|
||||
if (window.siyuan.config.export.addFooter) {
|
||||
ipcData.pdfOptions.displayHeaderFooter = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue