瀏覽代碼

:art: fix https://github.com/siyuan-note/siyuan/issues/8622

Vanessa 2 年之前
父節點
當前提交
821d8fb329
共有 3 個文件被更改,包括 11 次插入4 次删除
  1. 1 1
      app/appearance/themes/daylight/theme.css
  2. 3 3
      app/appearance/themes/midnight/theme.css
  3. 7 0
      app/src/dialog/message.ts

+ 1 - 1
app/appearance/themes/daylight/theme.css

@@ -101,7 +101,7 @@
 
 
     /* 阴影 */
     /* 阴影 */
     --b3-point-shadow:  0 0 1px 0px rgba(0, 0, 0, 0.1), 0 0 2px 0px rgba(0, 0, 0, 0.2);
     --b3-point-shadow:  0 0 1px 0px rgba(0, 0, 0, 0.1), 0 0 2px 0px rgba(0, 0, 0, 0.2);
-    --b3-dialog-shadow: 0 8px 24px #010409;
+    --b3-dialog-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
     --b3-button-shadow: 0px 5px 5px -3px rgb(0 0 0 / 0.2), 0px 8px 10px 1px rgb(0 0 0 / 0.14), 0px 3px 14px 2px rgb(0 0 0 / 0.12);
     --b3-button-shadow: 0px 5px 5px -3px rgb(0 0 0 / 0.2), 0px 8px 10px 1px rgb(0 0 0 / 0.14), 0px 3px 14px 2px rgb(0 0 0 / 0.12);
 
 
     /* 图表颜色 */
     /* 图表颜色 */

+ 3 - 3
app/appearance/themes/midnight/theme.css

@@ -13,11 +13,11 @@
     --b3-theme-error: #d23f31;
     --b3-theme-error: #d23f31;
 
 
     /* 文字颜色 */
     /* 文字颜色 */
-    --b3-theme-on-primary: #bababa;
+    --b3-theme-on-primary: #fff;
     --b3-theme-on-secondary: #fff;
     --b3-theme-on-secondary: #fff;
     --b3-theme-on-background: #dadada;
     --b3-theme-on-background: #dadada;
     --b3-theme-on-surface: #9aa0a6;
     --b3-theme-on-surface: #9aa0a6;
-    --b3-theme-on-surface-light: var(--b3-theme-on-primary);
+    --b3-theme-on-surface-light: #bababa;
     --b3-theme-on-error: #fff;
     --b3-theme-on-error: #fff;
 
 
     /* 字体 */
     /* 字体 */
@@ -101,7 +101,7 @@
 
 
     /* 阴影 */
     /* 阴影 */
     --b3-point-shadow: inset 0 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.09), 0 3px 6px rgba(0, 0, 0, .04), 0 0 0 0 transparent;
     --b3-point-shadow: inset 0 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.09), 0 3px 6px rgba(0, 0, 0, .04), 0 0 0 0 transparent;
-    --b3-dialog-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
+    --b3-dialog-shadow: 0 8px 24px #010409;
     --b3-button-shadow: 0px 5px 5px -3px rgb(0 0 0 / 0.2), 0px 8px 10px 1px rgb(0 0 0 / 0.14), 0px 3px 14px 2px rgb(0 0 0 / 0.12);
     --b3-button-shadow: 0px 5px 5px -3px rgb(0 0 0 / 0.2), 0px 8px 10px 1px rgb(0 0 0 / 0.14), 0px 3px 14px 2px rgb(0 0 0 / 0.12);
 
 
     /* 图表颜色 */
     /* 图表颜色 */

+ 7 - 0
app/src/dialog/message.ts

@@ -12,6 +12,13 @@ export const initMessage = () => {
                 hideMessage(target.parentElement.getAttribute("data-id"));
                 hideMessage(target.parentElement.getAttribute("data-id"));
                 event.preventDefault();
                 event.preventDefault();
                 break;
                 break;
+            } else if (target.tagName === "A") {
+                break;
+            } else if (target.classList.contains("b3-snackbar")) {
+                hideMessage(target.getAttribute("data-id"));
+                event.preventDefault();
+                event.stopPropagation();
+                break;
             } else if (target.isSameNode(messageElement.lastElementChild)) {
             } else if (target.isSameNode(messageElement.lastElementChild)) {
                 target.parentElement.classList.remove("b3-snackbars--show");
                 target.parentElement.classList.remove("b3-snackbars--show");
                 setTimeout(() => {
                 setTimeout(() => {