mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
3a93650d9d
commit
f3366c05b6
12 changed files with 376 additions and 338 deletions
|
|
@ -573,6 +573,7 @@
|
||||||
"--b3-protyle-inline-blockref-color": "Block Ref",
|
"--b3-protyle-inline-blockref-color": "Block Ref",
|
||||||
"sync": "Sync",
|
"sync": "Sync",
|
||||||
"syncNow": "Sync now",
|
"syncNow": "Sync now",
|
||||||
|
"waitSync": "The editing data has not been synchronized to the cloud",
|
||||||
"cloudBook": "Cloud Notebook",
|
"cloudBook": "Cloud Notebook",
|
||||||
"paymentSum": "Cumulatively paid",
|
"paymentSum": "Cumulatively paid",
|
||||||
"refresh": "Refresh",
|
"refresh": "Refresh",
|
||||||
|
|
|
||||||
|
|
@ -573,6 +573,7 @@
|
||||||
"--b3-protyle-inline-blockref-color": "Bloque Ref",
|
"--b3-protyle-inline-blockref-color": "Bloque Ref",
|
||||||
"sync": "Sincronización",
|
"sync": "Sincronización",
|
||||||
"syncNow": "Sincronizar ahora",
|
"syncNow": "Sincronizar ahora",
|
||||||
|
"waitSync": "Los datos de edición no se han sincronizado con la nube",
|
||||||
"cloudBook": "Cuaderno de notas en la nube",
|
"cloudBook": "Cuaderno de notas en la nube",
|
||||||
"paymentSum": "Pagado acumulativamente",
|
"paymentSum": "Pagado acumulativamente",
|
||||||
"refresh": "Actualizar",
|
"refresh": "Actualizar",
|
||||||
|
|
|
||||||
|
|
@ -573,6 +573,7 @@
|
||||||
"--b3-protyle-inline-blockref-color": "Ref Bloc",
|
"--b3-protyle-inline-blockref-color": "Ref Bloc",
|
||||||
"sync": "Synchro",
|
"sync": "Synchro",
|
||||||
"syncNow": "Synchro maintenant",
|
"syncNow": "Synchro maintenant",
|
||||||
|
"waitSync": "Les données d'édition n'ont pas été synchronisées avec le cloud",
|
||||||
"cloudBook": "Carnet de notes du Cloud",
|
"cloudBook": "Carnet de notes du Cloud",
|
||||||
"paymentSum": "Cumulativement payé",
|
"paymentSum": "Cumulativement payé",
|
||||||
"refresh": "Rafraîchir",
|
"refresh": "Rafraîchir",
|
||||||
|
|
|
||||||
|
|
@ -573,6 +573,7 @@
|
||||||
"--b3-protyle-inline-blockref-color": "引用塊",
|
"--b3-protyle-inline-blockref-color": "引用塊",
|
||||||
"sync": "同步",
|
"sync": "同步",
|
||||||
"syncNow": "立即同步",
|
"syncNow": "立即同步",
|
||||||
|
"waitSync": "編輯數據尚未同步到雲端",
|
||||||
"cloudBook": "雲端筆記本",
|
"cloudBook": "雲端筆記本",
|
||||||
"payment": "累計已支付",
|
"payment": "累計已支付",
|
||||||
"refresh": "重新整理",
|
"refresh": "重新整理",
|
||||||
|
|
|
||||||
|
|
@ -573,6 +573,7 @@
|
||||||
"--b3-protyle-inline-blockref-color": "引用块",
|
"--b3-protyle-inline-blockref-color": "引用块",
|
||||||
"sync": "同步",
|
"sync": "同步",
|
||||||
"syncNow": "立即同步",
|
"syncNow": "立即同步",
|
||||||
|
"waitSync": "编辑数据尚未同步到云端",
|
||||||
"cloudBook": "云端笔记本",
|
"cloudBook": "云端笔记本",
|
||||||
"paymentSum": "累计已支付",
|
"paymentSum": "累计已支付",
|
||||||
"refresh": "刷新",
|
"refresh": "刷新",
|
||||||
|
|
|
||||||
|
|
@ -246,6 +246,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#transactionTip {
|
||||||
|
position: fixed;
|
||||||
|
top: 73px;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: var(--b3-theme-background);
|
||||||
|
padding: 4px;
|
||||||
|
box-shadow: var(--b3-point-shadow);
|
||||||
|
z-index: 1;
|
||||||
|
line-height: 28px;
|
||||||
|
left: 8px;
|
||||||
|
right: 8px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.svg {
|
.svg {
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
||||||
|
|
@ -72,5 +72,6 @@
|
||||||
<button data-type="redo"><svg><use xlink:href="#iconRedo"></use></svg></button>
|
<button data-type="redo"><svg><use xlink:href="#iconRedo"></use></svg></button>
|
||||||
<span class="fn__flex-1"></span>
|
<span class="fn__flex-1"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="transactionTip" class="fn__none"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,13 @@ class App {
|
||||||
loadAssets(confResponse.data.conf.appearance);
|
loadAssets(confResponse.data.conf.appearance);
|
||||||
initMessage();
|
initMessage();
|
||||||
initAssets();
|
initAssets();
|
||||||
|
fetchPost("/api/setting/getCloudUser", {}, userResponse => {
|
||||||
|
window.siyuan.user = userResponse.data;
|
||||||
fetchPost("/api/system/getEmojiConf", {}, emojiResponse => {
|
fetchPost("/api/system/getEmojiConf", {}, emojiResponse => {
|
||||||
window.siyuan.emojis = emojiResponse.data as IEmoji[];
|
window.siyuan.emojis = emojiResponse.data as IEmoji[];
|
||||||
initFramework();
|
initFramework();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
addGA();
|
addGA();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import {MobileBookmarks} from "./MobileBookmarks";
|
||||||
import {MobileTags} from "./MobileTags";
|
import {MobileTags} from "./MobileTags";
|
||||||
import {hideKeyboardToolbar, initKeyboardToolbar} from "./showKeyboardToolbar";
|
import {hideKeyboardToolbar, initKeyboardToolbar} from "./showKeyboardToolbar";
|
||||||
import {getSearch} from "../../util/functions";
|
import {getSearch} from "../../util/functions";
|
||||||
|
import {syncGuide} from "../../sync/syncGuide";
|
||||||
|
|
||||||
export const initFramework = () => {
|
export const initFramework = () => {
|
||||||
setInlineStyle();
|
setInlineStyle();
|
||||||
|
|
@ -154,6 +155,11 @@ export const initFramework = () => {
|
||||||
if (window.siyuan.config.newbie) {
|
if (window.siyuan.config.newbie) {
|
||||||
mountHelp();
|
mountHelp();
|
||||||
}
|
}
|
||||||
|
const transactionTipElement = document.getElementById("transactionTip");
|
||||||
|
transactionTipElement.innerHTML = `${window.siyuan.languages.waitSync} <button class="b3-button">${window.siyuan.languages.syncNow}</button>`
|
||||||
|
transactionTipElement.querySelector(".b3-button").addEventListener(getEventName(), () => {
|
||||||
|
syncGuide();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const initEditorName = () => {
|
const initEditorName = () => {
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,6 @@ export const popMenu = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchPost("/api/setting/getCloudUser", {}, userResponse => {
|
|
||||||
window.siyuan.user = userResponse.data;
|
|
||||||
let accountHTML = "";
|
let accountHTML = "";
|
||||||
if (window.siyuan.user) {
|
if (window.siyuan.user) {
|
||||||
accountHTML = `<div class="b3-list-item b3-list-item--big" id="menuAccount">
|
accountHTML = `<div class="b3-list-item b3-list-item--big" id="menuAccount">
|
||||||
|
|
@ -692,5 +690,4 @@ ${accountHTML}
|
||||||
});
|
});
|
||||||
menuElement.style.right = "0";
|
menuElement.style.right = "0";
|
||||||
scrimElement.classList.remove("fn__none");
|
scrimElement.classList.remove("fn__none");
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,12 @@ export const onMessage = (data: IWebSocketData) => {
|
||||||
document.querySelector("#menuSyncNow svg").classList.add("fn__rotate");
|
document.querySelector("#menuSyncNow svg").classList.add("fn__rotate");
|
||||||
} else {
|
} else {
|
||||||
document.querySelector("#menuSyncNow svg").classList.remove("fn__rotate");
|
document.querySelector("#menuSyncNow svg").classList.remove("fn__rotate");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (data.code !== 0) {
|
||||||
|
document.getElementById("transactionTip").classList.add("fn__none")
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "create":
|
case "create":
|
||||||
case "createdailynote":
|
case "createdailynote":
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import {genEmptyElement, genSBElement} from "../../block/util";
|
||||||
import {hideElements} from "../ui/hideElements";
|
import {hideElements} from "../ui/hideElements";
|
||||||
import {reloadProtyle} from "../util/reload";
|
import {reloadProtyle} from "../util/reload";
|
||||||
import {countBlockWord} from "../../layout/status";
|
import {countBlockWord} from "../../layout/status";
|
||||||
|
import {needSubscribe} from "../../util/needSubscribe";
|
||||||
|
|
||||||
const removeTopElement = (updateElement: Element, protyle: IProtyle) => {
|
const removeTopElement = (updateElement: Element, protyle: IProtyle) => {
|
||||||
// 移动到其他文档中,该块需移除
|
// 移动到其他文档中,该块需移除
|
||||||
|
|
@ -73,6 +74,12 @@ const promiseTransaction = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
countBlockWord([], protyle.block.rootID, true);
|
countBlockWord([], protyle.block.rootID, true);
|
||||||
|
/// #if MOBILE
|
||||||
|
if ((0 !== window.siyuan.config.sync.provider || (0 === window.siyuan.config.sync.provider && !needSubscribe(""))) &&
|
||||||
|
window.siyuan.config.repo.key && window.siyuan.config.sync.enabled) {
|
||||||
|
document.getElementById("transactionTip").classList.remove("fn__none")
|
||||||
|
}
|
||||||
|
/// #endif
|
||||||
if (response.data[0].doOperations[0].action === "setAttrs") {
|
if (response.data[0].doOperations[0].action === "setAttrs") {
|
||||||
const gutterFoldElement = protyle.gutter.element.querySelector('[data-type="fold"]');
|
const gutterFoldElement = protyle.gutter.element.querySelector('[data-type="fold"]');
|
||||||
if (gutterFoldElement) {
|
if (gutterFoldElement) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue