remove splash

This commit is contained in:
SrGooglo 2023-06-22 19:41:52 +00:00
parent 516dba1209
commit 2fe9756506
3 changed files with 26 additions and 28 deletions

View File

@ -263,26 +263,37 @@ const OpenTagEditor = ({ tag, onFinish = () => app.navigation.softReload() } = {
const TapShareRender = () => {
return <div className="tap-share-render">
{
!app.cores.nfc.scanning && app.isMobile && <antd.Alert
type="warning"
message="NFC is disabled"
description="You can enable it in your device settings."
/>
}
<div className="tap-share-field">
<div className="tap-share-field_header">
<h1>
<Icons.MdSpoke /> Registered Tags
</h1>
</div>
<span className="tip">
{
app.cores.nfc.scanning && <span className="tip">
<Icons.MdInfo /> You can quickly edit your tags by tapping them.
</span>
}
<OwnTags />
</div>
<antd.Button
{
app.isMobile && <antd.Button
type="primary"
icon={<Icons.Plus />}
onClick={() => OpenTagEditor()}
>
Add new
</antd.Button>
}
</div>
}

View File

@ -22,13 +22,6 @@ export default (props) => {
return false
}
const nfcInstance = app.cores.nfc.instance()
if (!nfcInstance) {
setError(NFC_ERRORS.NFC_NOT_AVAILABLE)
return false
}
setError(null)
setLoading(true)
@ -40,7 +33,7 @@ export default (props) => {
return false
}
nfcInstance.write({
app.cores.nfc.writeNdef({
records: [{
recordType: "url",
data: context.values.endpoint_url

View File

@ -66,7 +66,6 @@ import loadable from "@loadable/component"
import { StatusBar, Style } from "@capacitor/status-bar"
import { App as CapacitorApp } from "@capacitor/app"
import { SplashScreen } from "@capacitor/splash-screen"
import { CapacitorUpdater } from "@capgo/capacitor-updater"
import SessionModel from "models/session"
@ -98,6 +97,8 @@ import * as Router from "./router"
import "theme/index.less"
console.log(`REACT VERSION: ${React.version}`)
CapacitorUpdater.notifyAppReady()
class ComtyApp extends React.Component {
@ -118,15 +119,10 @@ class ComtyApp extends React.Component {
}
static splashAwaitEvent = "app.initialization.finish"
static async initialize() {
SplashScreen.show({
autoHide: false,
})
window.app.splash = SplashScreen
window.app.version = config.package.version
window.app.message = antd.message
window.app.isCapacitor = window.navigator.userAgent === "capacitor"
window.localStorage.setItem("last_version", window.app.version)
@ -492,8 +488,6 @@ class ComtyApp extends React.Component {
this.setState({ initialized: true })
Utils.handleOpenDevTools()
SplashScreen.hide()
}
onRuntimeStateUpdate = (state) => {