fix statusbar

This commit is contained in:
fyears 2024-03-18 23:59:52 +08:00
parent 62b176d709
commit 822941f1c3
1 changed files with 7 additions and 10 deletions

View File

@ -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");
}
};