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