mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🚨
This commit is contained in:
parent
abdb091c17
commit
2f58714b79
2 changed files with 5 additions and 5 deletions
|
|
@ -424,7 +424,7 @@ export class Asset extends Model {
|
|||
</div>
|
||||
</div> <!-- outerContainer -->
|
||||
<div id="printContainer"></div>`;
|
||||
const localPDF = window.siyuan.storage[Constants.LOCAL_PDFTHEME]
|
||||
const localPDF = window.siyuan.storage[Constants.LOCAL_PDFTHEME];
|
||||
const pdfTheme = window.siyuan.config.appearance.mode === 0 ? localPDF.light : localPDF.dark;
|
||||
const darkElement = this.element.querySelector("#pdfDark");
|
||||
const lightElement = this.element.querySelector("#pdfLight");
|
||||
|
|
|
|||
|
|
@ -141,14 +141,14 @@ export const hotKey2Electron = (key: string) => {
|
|||
|
||||
export const setLocalStorage = (data?: IWebSocketData) => {
|
||||
if (data) {
|
||||
setDefaultStorage(data)
|
||||
setDefaultStorage(data);
|
||||
} else {
|
||||
fetchPost("/api/storage/getLocalStorage", undefined, (response) => {
|
||||
setDefaultStorage(response)
|
||||
setDefaultStorage(response);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const setDefaultStorage = (response: IWebSocketData) => {
|
||||
window.siyuan.storage = response.data;
|
||||
// 历史数据迁移
|
||||
|
|
@ -218,7 +218,7 @@ const setDefaultStorage = (response: IWebSocketData) => {
|
|||
window.siyuan.storage[key] = defaultStorage[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const exportLocalStorage = (cb?: () => void) => {
|
||||
fetchPost("/api/storage/setLocalStorage", {val: window.siyuan.storage}, () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue