mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
c0b63dffe9
commit
324ccc60c8
3 changed files with 27 additions and 24 deletions
|
|
@ -127,7 +127,7 @@ class App {
|
|||
};
|
||||
fetchPost("/api/system/getConf", {}, response => {
|
||||
window.siyuan.config = response.data.conf;
|
||||
getLocalStorage();
|
||||
getLocalStorage(() => {
|
||||
fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages) => {
|
||||
window.siyuan.languages = lauguages;
|
||||
bootSync();
|
||||
|
|
@ -141,6 +141,7 @@ class App {
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
setNoteBook();
|
||||
initBlockPopover();
|
||||
promiseTransactions();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class App {
|
|||
fetchPost("/api/system/getConf", {}, confResponse => {
|
||||
confResponse.data.conf.keymap = Constants.SIYUAN_KEYMAP;
|
||||
window.siyuan.config = confResponse.data.conf;
|
||||
getLocalStorage();
|
||||
getLocalStorage(() => {
|
||||
fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages) => {
|
||||
window.siyuan.languages = lauguages;
|
||||
document.title = window.siyuan.languages.siyuanNote;
|
||||
|
|
@ -61,6 +61,7 @@ class App {
|
|||
});
|
||||
addGA();
|
||||
});
|
||||
});
|
||||
if (navigator.userAgent.indexOf("iPhone") > -1) {
|
||||
document.addEventListener("touchstart", handleTouchStart, false);
|
||||
document.addEventListener("touchmove", handleTouchMove, false);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ export const hotKey2Electron = (key: string) => {
|
|||
return electronKey + key.substr(key.length - 1);
|
||||
};
|
||||
|
||||
export const getLocalStorage = () => {
|
||||
export const getLocalStorage = (cb:()=>void) => {
|
||||
fetchPost("/api/storage/getLocalStorage", undefined, (response) => {
|
||||
window.siyuan.storage = response.data;
|
||||
// 历史数据迁移
|
||||
|
|
@ -212,6 +212,7 @@ export const getLocalStorage = () => {
|
|||
window.siyuan.storage[key] = defaultStorage[key];
|
||||
}
|
||||
});
|
||||
cb();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue