diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index b8fc79b..e0314b9 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -180,8 +180,10 @@ export default { handleFullscreenChange() { if (document.fullscreenElement === this.$refs.player) { this.$vuetube.statusBar.hide(); + this.$vuetube.navigationBar.hide(); } else { this.$vuetube.statusBar.show(); + this.$vuetube.navigationBar.show(); } } }, diff --git a/NUXT/plugins/vuetube.js b/NUXT/plugins/vuetube.js index a78e836..4736f21 100644 --- a/NUXT/plugins/vuetube.js +++ b/NUXT/plugins/vuetube.js @@ -1,6 +1,7 @@ //--- Modules/Imports ---// import { Http } from "@capacitor-community/http"; import { StatusBar, Style } from "@capacitor/status-bar"; +import { NavigationBar } from "@hugotomazi/capacitor-navigation-bar"; import constants from "./constants"; import { hexToRgb, rgbToHex } from "./utils"; @@ -57,6 +58,15 @@ const module = { }, }, + navigationBar: { + async hide() { + return await NavigationBar.hide(); + }, + async show() { + return await NavigationBar.show(); + }, + }, + hexToRgb(hex) { return hexToRgb(hex); }, diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index e0a3c24..666d64e 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -16,6 +16,7 @@ dependencies { implementation project(':capacitor-share') implementation project(':capacitor-splash-screen') implementation project(':capacitor-status-bar') + implementation project(':hugotomazi-capacitor-navigation-bar') } diff --git a/android/app/src/main/assets/capacitor.plugins.json b/android/app/src/main/assets/capacitor.plugins.json index 74ab1b1..e645402 100644 --- a/android/app/src/main/assets/capacitor.plugins.json +++ b/android/app/src/main/assets/capacitor.plugins.json @@ -26,5 +26,9 @@ { "pkg": "@capacitor/status-bar", "classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin" + }, + { + "pkg": "@hugotomazi/capacitor-navigation-bar", + "classpath": "br.com.tombus.capacitor.plugin.navigationbar.NavigationBarPlugin" } ] diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index 6e813ce..01b0a32 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -22,3 +22,6 @@ project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capa include ':capacitor-status-bar' project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android') + +include ':hugotomazi-capacitor-navigation-bar' +project(':hugotomazi-capacitor-navigation-bar').projectDir = new File('../node_modules/@hugotomazi/capacitor-navigation-bar/android') diff --git a/ios/App/Podfile b/ios/App/Podfile index a568824..a80b0b5 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -16,6 +16,7 @@ def capacitor_pods pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share' pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen' pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar' + pod 'HugotomaziCapacitorNavigationBar', :path => '../../node_modules/@hugotomazi/capacitor-navigation-bar' end target 'App' do diff --git a/package.json b/package.json index 754c44a..8cb9db5 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "@capacitor/device": "^1.1.2", "@capacitor/share": "^1.1.2", "@capacitor/splash-screen": "^1.2.2", - "@capacitor/status-bar": "^1.0.8" + "@capacitor/status-bar": "^1.0.8", + "@hugotomazi/capacitor-navigation-bar": "^1.1.1" } }