[Native] Hide splash screen manually

This commit is contained in:
Marcel Klehr 2021-09-09 16:59:26 +02:00
Родитель 9a167ba254
Коммит 881d6ffc17
7 изменённых файлов: 27 добавлений и 1 удалений

Просмотреть файл

@ -11,6 +11,7 @@ apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-http')
implementation project(':capacitor-device')
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-storage')
}

Просмотреть файл

@ -6,7 +6,7 @@
"webDir": "dist",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
"launchAutoHide": false
}
},
"cordova": {}

Просмотреть файл

@ -7,6 +7,10 @@
"pkg": "@capacitor/device",
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
},
{
"pkg": "@capacitor/splash-screen",
"classpath": "com.capacitorjs.plugins.splashscreen.SplashScreenPlugin"
},
{
"pkg": "@capacitor/storage",
"classpath": "com.capacitorjs.plugins.storage.StoragePlugin"

Просмотреть файл

@ -8,5 +8,8 @@ project(':capacitor-community-http').projectDir = new File('../node_modules/@cap
include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')
include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android')
include ':capacitor-storage'
project(':capacitor-storage').projectDir = new File('../node_modules/@capacitor/storage/android')

15
package-lock.json сгенерированный
Просмотреть файл

@ -14,6 +14,7 @@
"@capacitor/cli": "^3.0.0",
"@capacitor/core": "^3.0.0",
"@capacitor/device": "^1.0.0",
"@capacitor/splash-screen": "^1.1.2",
"@capacitor/storage": "^1.0.0",
"async-lock": "^1.2.8",
"async-parallel": "^1.2.3",
@ -2828,6 +2829,14 @@
"@capacitor/core": "^3.2.0"
}
},
"node_modules/@capacitor/splash-screen": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@capacitor/splash-screen/-/splash-screen-1.1.2.tgz",
"integrity": "sha512-LWI40hYAdce/3Nniuerz+18y8jaLI+qJyPf8dzBmM1FYXeTXGq0uP+FG4S/MqeBFxm6fVANq2lIMSWwwKzWnSQ==",
"peerDependencies": {
"@capacitor/core": "^3.0.0"
}
},
"node_modules/@capacitor/storage": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@capacitor/storage/-/storage-1.0.3.tgz",
@ -24732,6 +24741,12 @@
"integrity": "sha512-Eq17Y+UDHFmYGaZcObvxHAcHw0fF9TCBAg1f5f6qdV8ab3cKKEUB9xMvoCSZAueBfxFARrD18TsZJKoxh2YsLA==",
"requires": {}
},
"@capacitor/splash-screen": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@capacitor/splash-screen/-/splash-screen-1.1.2.tgz",
"integrity": "sha512-LWI40hYAdce/3Nniuerz+18y8jaLI+qJyPf8dzBmM1FYXeTXGq0uP+FG4S/MqeBFxm6fVANq2lIMSWwwKzWnSQ==",
"requires": {}
},
"@capacitor/storage": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@capacitor/storage/-/storage-1.0.3.tgz",

Просмотреть файл

@ -63,6 +63,7 @@
"@capacitor/cli": "^3.0.0",
"@capacitor/core": "^3.0.0",
"@capacitor/device": "^1.0.0",
"@capacitor/splash-screen": "^1.1.2",
"@capacitor/storage": "^1.0.0",
"async-lock": "^1.2.8",
"async-parallel": "^1.2.3",

Просмотреть файл

@ -8,10 +8,12 @@
<script>
import { actions } from '../../store/native'
import { routes } from '../../NativeRouter'
import { SplashScreen } from '@capacitor/splash-screen'
export default {
name: 'Home',
async created() {
SplashScreen.hide()
await this.$store.dispatch(actions.LOAD_ACCOUNTS)
if (Object.keys(this.$store.state.accounts).length) {
const accountId = Object.keys(this.$store.state.accounts)[0]