From 822941f1c3022819edf1b343859955270b89fa80 Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Mon, 18 Mar 2024 23:59:52 +0800 Subject: [PATCH] fix statusbar --- src/misc.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/misc.ts b/src/misc.ts index e3706b4..dfc397e 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -509,17 +509,14 @@ export const stringToFragment = (string: string) => { * @param op */ export const changeMobileStatusBar = (op: "enable" | "disable") => { + const bar = document.querySelector( + ".is-mobile .app-container .status-bar" + ) as HTMLElement; if (op === "enable") { - ( - document.querySelector( - ".is-mobile .app-container .status-bar" - ) as HTMLElement - ).style.setProperty("display", "flex"); + bar.style.setProperty("display", "flex"); + bar.style.setProperty("margin-bottom", "40px"); } else { - ( - document.querySelector( - ".is-mobile .app-container .status-bar" - ) as HTMLElement - ).style.setProperty("display", "none"); + bar.style.removeProperty("display"); + bar.style.removeProperty("margin-bottom"); } };