mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
@@ -9,7 +9,7 @@ android {
|
|||||||
|
|
||||||
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation project(':capacitor-app')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,6 @@
|
|||||||
[]
|
[
|
||||||
|
{
|
||||||
|
"pkg": "@capacitor/app",
|
||||||
|
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
||||||
include ':capacitor-android'
|
include ':capacitor-android'
|
||||||
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
||||||
|
|
||||||
|
include ':capacitor-app'
|
||||||
|
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"version": "0.1.11",
|
"version": "0.1.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@capacitor/app": "1.1.1",
|
||||||
"@babel/core": "7.21.3",
|
"@babel/core": "7.21.3",
|
||||||
"@babel/plugin-syntax-flow": "7.18.6",
|
"@babel/plugin-syntax-flow": "7.18.6",
|
||||||
"@babel/plugin-transform-react-jsx": "7.21.0",
|
"@babel/plugin-transform-react-jsx": "7.21.0",
|
||||||
|
|||||||
+11
-1
@@ -4,6 +4,7 @@ import App from './App';
|
|||||||
import { HelmetProvider } from 'react-helmet-async';
|
import { HelmetProvider } from 'react-helmet-async';
|
||||||
import { HashRouter } from 'react-router-dom';
|
import { HashRouter } from 'react-router-dom';
|
||||||
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
|
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
|
||||||
|
import { App as CapacitorApp } from '@capacitor/app';
|
||||||
|
|
||||||
import PlebbitJs from '@plebbit/plebbit-js';
|
import PlebbitJs from '@plebbit/plebbit-js';
|
||||||
// inject native functions into renderer
|
// inject native functions into renderer
|
||||||
@@ -24,4 +25,13 @@ root.render(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// set up PWA https://cra.link/PWA
|
// set up PWA https://cra.link/PWA
|
||||||
serviceWorkerRegistration.register();
|
serviceWorkerRegistration.register();
|
||||||
|
|
||||||
|
// add back button in android app
|
||||||
|
CapacitorApp.addListener('backButton', ({canGoBack}) => {
|
||||||
|
if (canGoBack) {
|
||||||
|
window.history.back();
|
||||||
|
} else {
|
||||||
|
CapacitorApp.exitApp();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@@ -1229,6 +1229,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@capacitor/android/-/android-3.6.0.tgz#60438a0614415c7c242dda48a031cd45335e067a"
|
resolved "https://registry.yarnpkg.com/@capacitor/android/-/android-3.6.0.tgz#60438a0614415c7c242dda48a031cd45335e067a"
|
||||||
integrity sha512-X6n0OLy7BE3c6qfVuL7UYyq/aIwEsqIAqtyDOwMdj5k+P1rLQVsGaWERXUtC0BGeoKBD5YgbWiyKwAwg5Spjdg==
|
integrity sha512-X6n0OLy7BE3c6qfVuL7UYyq/aIwEsqIAqtyDOwMdj5k+P1rLQVsGaWERXUtC0BGeoKBD5YgbWiyKwAwg5Spjdg==
|
||||||
|
|
||||||
|
"@capacitor/app@1.1.1":
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@capacitor/app/-/app-1.1.1.tgz#bde7202faad1b47c4ae2c4a622285d7569384c5e"
|
||||||
|
integrity sha512-8ADkldHnoE1xkWvPUsGlERVGm6/Zvcxy6hCI80AxydIKyaCG7kbDAvUclebbnw/eFRxj2zBoVatGLjmJNvTbYw==
|
||||||
|
|
||||||
"@capacitor/cli@3.6.0":
|
"@capacitor/cli@3.6.0":
|
||||||
version "3.6.0"
|
version "3.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/@capacitor/cli/-/cli-3.6.0.tgz#31c07f364828e750d20a8e6bb2d516f0d21be81d"
|
resolved "https://registry.yarnpkg.com/@capacitor/cli/-/cli-3.6.0.tgz#31c07f364828e750d20a8e6bb2d516f0d21be81d"
|
||||||
|
|||||||
Reference in New Issue
Block a user