feat(ios): status bar style changes with logseq theme (#3947)

Co-authored-by: leizhe <leizhe@leizhedeMacBook-Air.local>
This commit is contained in:
llcc
2022-01-21 17:14:18 +08:00
committed by GitHub
parent 4be9f8d987
commit 1c127bb6a9
3 changed files with 31 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import path from 'path/path.js'
import { StatusBar, Style } from '@capacitor/status-bar'
if (typeof window === 'undefined') {
global.window = {}
@@ -294,3 +295,19 @@ export const nodePath = Object.assign({}, path, {
return path.extname(input)
}
})
export const setStatusBarStyleDark = async () => {
await StatusBar.setStyle({ style: Style.Dark });
};
export const setStatusBarStyleLight = async () => {
await StatusBar.setStyle({ style: Style.Light });
};
export const hideStatusBar = async () => {
await StatusBar.hide();
};
export const showStatusBar = async () => {
await StatusBar.show();
};