diff --git a/capacitor/package.json b/capacitor/package.json index 9d05f82..23f5e40 100644 --- a/capacitor/package.json +++ b/capacitor/package.json @@ -41,7 +41,7 @@ "capacitor-plugin-safe-area": "^3.0.3", "capacitor-volume-control": "^0.0.1", "common": "workspace:*", - "cordova-plugin-navigationbar-color": "^0.1.0", + "cordova-plugin-navigationbar": "^1.0.31", "cordova-plugin-pip": "^0.0.2", "cordova-plugin-screen-orientation": "^3.0.4", "es6-promise-plugin": "^4.2.2" diff --git a/capacitor/src/capacitor.js b/capacitor/src/capacitor.js index e0d9cbf..34c34cf 100644 --- a/capacitor/src/capacitor.js +++ b/capacitor/src/capacitor.js @@ -1,4 +1,4 @@ -/* globals NavigationBar, PictureInPicture */ +/* globals navigationbar, PictureInPicture */ import { StatusBar, Style } from '@capacitor/status-bar' import { SafeArea } from 'capacitor-plugin-safe-area' import { App } from '@capacitor/app' @@ -88,8 +88,7 @@ updateInsets() StatusBar.setStyle({ style: Style.Dark }) StatusBar.setOverlaysWebView({ overlay: true }) -// @ts-ignore -NavigationBar.setUp(true) +navigationbar.setUp(true) // cordova screen orientation plugin is also used, and it patches global screen.orientation.lock diff --git a/common/modules/themes.js b/common/modules/themes.js index 77152b7..56a843a 100644 --- a/common/modules/themes.js +++ b/common/modules/themes.js @@ -2,7 +2,6 @@ import { append, element } from 'svelte/internal' import { writable } from 'simple-store-svelte' import { settings } from './settings' import { get } from 'svelte/store' -import { SUPPORTS } from '@/modules/support.js' const style = element('style') style.id = 'customThemes' @@ -47,6 +46,5 @@ export function updateTheme(value) { } else { value += NORMAL } - if (SUPPORTS.isAndroid) window.NavigationBar.backgroundColorByHexString(get(settings).amoledTheme ? "#000000" : "#17191D") style.textContent = `:root{${value.replace(/{|}/g, '')}}` } diff --git a/common/views/Player/Player.svelte b/common/views/Player/Player.svelte index d00a51d..7782977 100644 --- a/common/views/Player/Player.svelte +++ b/common/views/Player/Player.svelte @@ -108,11 +108,9 @@ isFullscreen = !!document.fullscreenElement if (document.fullscreenElement) { window.Capacitor.Plugins.StatusBar.hide() - window.NavigationBar.hide() screen.orientation.lock('landscape') } else { window.Capacitor.Plugins.StatusBar.show() - window.NavigationBar.show() screen.orientation.unlock() } }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a874afb..71c5894 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -108,9 +108,9 @@ importers: common: specifier: workspace:* version: link:../common - cordova-plugin-navigationbar-color: - specifier: ^0.1.0 - version: 0.1.0 + cordova-plugin-navigationbar: + specifier: ^1.0.31 + version: 1.0.31 cordova-plugin-pip: specifier: ^0.0.2 version: 0.0.2 @@ -1913,9 +1913,9 @@ packages: peerDependencies: webpack: ^5.1.0 - cordova-plugin-navigationbar-color@0.1.0: - resolution: {integrity: sha512-O/JfdLerNc0Jcq/4nTvsW45IzojtJT0Biayl8ZKSAKtQv6U7tOLUZ1/k+dRGZnBNoQyNc5gC9Lbn6A573v9UhA==} - engines: {cordovaDependencies: {0.1.0: {cordova: '>=3.0.0'}, 3.0.0: {cordova: '>100'}}} + cordova-plugin-navigationbar@1.0.31: + resolution: {integrity: sha512-xt9tx5Aprf052OvuG2JohjRkkU/6U6XQ8mXOx93HaHFz6cCZI1+B0pl/uoyU/FkJsP41QIw1upnMdzgav11ifw==} + engines: {'0': {name: cordova, version: '>=3.0.0'}} cordova-plugin-pip@0.0.2: resolution: {integrity: sha512-Wy9aK7rQX3kif6+kUl7RwTG/+arixvW5Sphyr0bPxsVrkVIliseW/S/JhO7BVX25/HGU0lGMvQe8a134yvI9iQ==} @@ -7744,7 +7744,7 @@ snapshots: serialize-javascript: 6.0.2 webpack: 5.91.0(webpack-cli@5.1.4) - cordova-plugin-navigationbar-color@0.1.0: {} + cordova-plugin-navigationbar@1.0.31: {} cordova-plugin-pip@0.0.2: {}