mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
This commit is contained in:
parent
838f8b66dc
commit
cf68b7f664
6 changed files with 8 additions and 27 deletions
|
|
@ -54,9 +54,6 @@ ctrl+p 搜索: 202
|
|||
// 需大于 .block__popover
|
||||
.b3-menu: 210
|
||||
|
||||
// 需小于 .side-panel
|
||||
#transactionTip: 212
|
||||
|
||||
// 需大于 mobile .status
|
||||
.keyboard: 222
|
||||
|
||||
|
|
|
|||
|
|
@ -293,22 +293,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
#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);
|
||||
border: 1px solid var(--b3-theme-surface-lighter);
|
||||
z-index: 1;
|
||||
line-height: 28px;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.svg {
|
||||
fill: currentColor;
|
||||
display: inline-block;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
<use xlink:href="#iconMenu"></use>
|
||||
</svg>
|
||||
<input class="toolbar__title b3-text-field fn__hidden" id="toolbarName">
|
||||
<svg id="toolbarSync" class="toolbar__icon fn__none">
|
||||
<use xlink:href="#iconCloudSucc"></use>
|
||||
</svg>
|
||||
<svg id="toolbarEdit" class="toolbar__icon fn__hidden">
|
||||
<use xlink:href="#iconEdit"></use>
|
||||
</svg>
|
||||
|
|
@ -56,6 +59,5 @@
|
|||
<div id="message" class="b3-snackbars"></div>
|
||||
<div id="status" class="status status--hide"></div>
|
||||
<div id="keyboardToolbar" class="keyboard"></div>
|
||||
<div id="transactionTip" class="fn__none"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -112,6 +112,9 @@ export const initFramework = () => {
|
|||
window.siyuan.config.editor.readOnly = editIconElement.getAttribute("xlink:href") === "#iconEdit";
|
||||
fetchPost("/api/setting/setEditor", window.siyuan.config.editor);
|
||||
});
|
||||
document.getElementById("toolbarSync").addEventListener(getEventName(), () => {
|
||||
syncGuide();
|
||||
});
|
||||
if (navigator.userAgent.indexOf("iPhone") > -1 && !window.siyuan.config.readonly && !window.siyuan.config.editor.readOnly) {
|
||||
// 不知道为什么 iPhone 中如果是编辑状态,点击文档后无法点击标题
|
||||
setTimeout(() => {
|
||||
|
|
@ -132,11 +135,6 @@ export const initFramework = () => {
|
|||
if (window.siyuan.config.openHelp) {
|
||||
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();
|
||||
});
|
||||
if (getOpenNotebookCount() > 0) {
|
||||
if (window.JSAndroid) {
|
||||
if (window.openFileByURL(window.JSAndroid.getBlockURL())) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const onMessage = (data: IWebSocketData) => {
|
|||
case"syncing":
|
||||
processSync(data);
|
||||
if (data.code !== 0) {
|
||||
document.getElementById("transactionTip").classList.add("fn__none");
|
||||
document.getElementById("toolbarSync").classList.add("fn__none");
|
||||
}
|
||||
break;
|
||||
case "create":
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ const promiseTransaction = () => {
|
|||
/// #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");
|
||||
document.getElementById("toolbarSync").classList.remove("fn__none");
|
||||
}
|
||||
/// #endif
|
||||
if (response.data[0].doOperations[0].action === "setAttrs") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue