From c3d25353e242751a2a4f9c897480838e179843ee Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 24 Jan 2023 15:05:25 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/7041 --- app/appearance/icons/ant/icon.js | 16 ++++++++++------ app/appearance/icons/material/icon.js | 12 ++++++++---- app/src/dialog/processSystem.ts | 9 ++++++--- app/src/mobile/util/menu.ts | 2 +- app/src/mobile/util/onMessage.ts | 11 ++--------- app/src/protyle/breadcrumb/index.ts | 2 +- app/src/util/onGetConfig.ts | 2 +- 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/app/appearance/icons/ant/icon.js b/app/appearance/icons/ant/icon.js index 0d33e0b0a..98a2428b3 100644 --- a/app/appearance/icons/ant/icon.js +++ b/app/appearance/icons/ant/icon.js @@ -1,10 +1,17 @@ document.body.insertAdjacentHTML('afterBegin', ` - - + + + + + - + + + + + @@ -348,9 +355,6 @@ document.body.insertAdjacentHTML('afterBegin', ` - - - diff --git a/app/appearance/icons/material/icon.js b/app/appearance/icons/material/icon.js index ba1dc39e8..ef3eb232c 100644 --- a/app/appearance/icons/material/icon.js +++ b/app/appearance/icons/material/icon.js @@ -1,10 +1,17 @@ document.body.insertAdjacentHTML('afterbegin', ` + + + + + + - + + @@ -347,9 +354,6 @@ document.body.insertAdjacentHTML('afterbegin', ` - - - diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index 4879bbbba..3d7f320f6 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -317,7 +317,10 @@ export const downloadProgress = (data: { id: string, percent: number }) => { }; export const processSync = (data?: IWebSocketData) => { - const iconElement = document.querySelector("#barSync") + const iconElement = document.querySelector(isMobile()?"#menuSyncNow" : "#barSync") + if (!iconElement) { + return; + } const useElement = iconElement.querySelector("use") if (!data) { if (!window.siyuan.config.sync.enabled || (0 === window.siyuan.config.sync.provider && needSubscribe(""))) { @@ -326,7 +329,7 @@ export const processSync = (data?: IWebSocketData) => { useElement.setAttribute("xlink:href", "#iconCloudOff") } else { iconElement.classList.remove("toolbar__item--active"); - useElement.setAttribute("xlink:href", "#iconCloud") + useElement.setAttribute("xlink:href", "#iconCloudSucc") } return; } @@ -338,7 +341,7 @@ export const processSync = (data?: IWebSocketData) => { useElement.setAttribute("xlink:href", "#iconCloudError") } else if (data.code === 1) { // success iconElement.classList.remove("toolbar__item--active"); - useElement.setAttribute("xlink:href", "#iconCloud") + useElement.setAttribute("xlink:href", "#iconCloudSucc") } iconElement.setAttribute("aria-label", data.msg); } diff --git a/app/src/mobile/util/menu.ts b/app/src/mobile/util/menu.ts index 7b2864a0b..134c1ac89 100644 --- a/app/src/mobile/util/menu.ts +++ b/app/src/mobile/util/menu.ts @@ -148,7 +148,7 @@ export const popMenu = () => { ${window.siyuan.languages.newNotebook}
- +