From 00f49f22edcf23ad22221c39e0d0646380203675 Mon Sep 17 00:00:00 2001 From: Front <27463495+Frontesque@users.noreply.github.com> Date: Sun, 13 Mar 2022 14:20:43 -0400 Subject: [PATCH] Fix Issue #4 --- NUXT/layouts/default.vue | 7 +++++++ android/app/capacitor.build.gradle | 2 ++ android/app/src/main/assets/capacitor.plugins.json | 8 ++++++++ android/capacitor.settings.gradle | 6 ++++++ ios/App/App/capacitor.config.json | 2 +- ios/App/Podfile | 2 ++ 6 files changed, 26 insertions(+), 1 deletion(-) diff --git a/NUXT/layouts/default.vue b/NUXT/layouts/default.vue index bd2bf98..4a90140 100644 --- a/NUXT/layouts/default.vue +++ b/NUXT/layouts/default.vue @@ -106,6 +106,13 @@ export default { }), mounted() { CapacitorApp.addListener('backButton', ({canGoBack}) => { + + //--- Back Closes Search ---// + if (this.search) { + this.search = false; + return; + } + if(!canGoBack){ CapacitorApp.exitApp(); } else { diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index 0a28c5a..05542b0 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -10,6 +10,8 @@ android { apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" dependencies { implementation project(':capacitor-community-http') + implementation project(':capacitor-app') + implementation project(':capacitor-browser') } diff --git a/android/app/src/main/assets/capacitor.plugins.json b/android/app/src/main/assets/capacitor.plugins.json index db863e0..be508b6 100644 --- a/android/app/src/main/assets/capacitor.plugins.json +++ b/android/app/src/main/assets/capacitor.plugins.json @@ -2,5 +2,13 @@ { "pkg": "@capacitor-community/http", "classpath": "com.getcapacitor.plugin.http.Http" + }, + { + "pkg": "@capacitor/app", + "classpath": "com.capacitorjs.plugins.app.AppPlugin" + }, + { + "pkg": "@capacitor/browser", + "classpath": "com.capacitorjs.plugins.browser.BrowserPlugin" } ] diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index ab3152c..636677d 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -4,3 +4,9 @@ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/ include ':capacitor-community-http' project(':capacitor-community-http').projectDir = new File('../node_modules/@capacitor-community/http/android') + +include ':capacitor-app' +project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android') + +include ':capacitor-browser' +project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android') diff --git a/ios/App/App/capacitor.config.json b/ios/App/App/capacitor.config.json index d90bd1d..6b6c965 100644 --- a/ios/App/App/capacitor.config.json +++ b/ios/App/App/capacitor.config.json @@ -1,5 +1,5 @@ { - "appId": "com.Frontesque.youtube", + "appId": "com.Frontesque.vuetube", "appName": "VueTube", "webDir": "dist", "bundledWebRuntime": false diff --git a/ios/App/Podfile b/ios/App/Podfile index e3c1569..91c052f 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -10,6 +10,8 @@ def capacitor_pods pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' pod 'CapacitorCommunityHttp', :path => '..\..\node_modules\@capacitor-community\http' + pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app' + pod 'CapacitorBrowser', :path => '..\..\node_modules\@capacitor\browser' end target 'App' do