From bbfc638546593364e1b0afaf5f16833a423efdc4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 6 Jun 2022 21:17:41 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5111 --- app/src/assets/scss/_snackbar.scss | 17 ++++++++++++++++- app/src/mobile/index.ts | 4 +++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/src/assets/scss/_snackbar.scss b/app/src/assets/scss/_snackbar.scss index 44cf0a9d5..09d3f1e4a 100644 --- a/app/src/assets/scss/_snackbar.scss +++ b/app/src/assets/scss/_snackbar.scss @@ -20,7 +20,7 @@ transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms; &--show { - transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) !important; } & > .b3-button { @@ -85,3 +85,18 @@ } } } + +@media screen and (max-width: 520px) { + .b3-snackbars { + top: 35px; + right: calc(10vw - 18px); + } + + .b3-snackbar__content { + max-width: 80vw + } + + .b3-snackbars { + transform: translate3d(100vw, 0, 0); + } +} diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts index 2c6dc72d9..2c578e117 100644 --- a/app/src/mobile/index.ts +++ b/app/src/mobile/index.ts @@ -14,7 +14,7 @@ import {initAssets, loadAssets} from "../util/assets"; import {openMobileFileById} from "./editor"; import {promiseTransactions} from "../protyle/wysiwyg/transaction"; import {bootSync} from "../dialog/processSystem"; -import {initMessage} from "../dialog/message"; +import {initMessage, showMessage} from "../dialog/message"; class App { constructor() { @@ -60,6 +60,8 @@ class App { window.JSAndroid.changeStatusBarColor(getComputedStyle(document.body).getPropertyValue("--b3-theme-background"), window.siyuan.config.appearance.mode); } initMessage(); + showMessage("ww", 0, "error"); + showMessage("dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", 0) }); }); if (navigator.userAgent.indexOf("iPhone") > -1) {