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 = () => { const TapShareRender = () => {
return <div className="tap-share-render"> 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">
<div className="tap-share-field_header"> <div className="tap-share-field_header">
<h1> <h1>
<Icons.MdSpoke /> Registered Tags <Icons.MdSpoke /> Registered Tags
</h1> </h1>
</div> </div>
<span className="tip"> {
<Icons.MdInfo /> You can quickly edit your tags by tapping them. app.cores.nfc.scanning && <span className="tip">
</span> <Icons.MdInfo /> You can quickly edit your tags by tapping them.
</span>
}
<OwnTags /> <OwnTags />
</div> </div>
<antd.Button {
type="primary" app.isMobile && <antd.Button
icon={<Icons.Plus />} type="primary"
onClick={() => OpenTagEditor()} icon={<Icons.Plus />}
> onClick={() => OpenTagEditor()}
Add new >
</antd.Button> Add new
</antd.Button>
}
</div> </div>
} }

View File

@ -22,13 +22,6 @@ export default (props) => {
return false return false
} }
const nfcInstance = app.cores.nfc.instance()
if (!nfcInstance) {
setError(NFC_ERRORS.NFC_NOT_AVAILABLE)
return false
}
setError(null) setError(null)
setLoading(true) setLoading(true)
@ -40,7 +33,7 @@ export default (props) => {
return false return false
} }
nfcInstance.write({ app.cores.nfc.writeNdef({
records: [{ records: [{
recordType: "url", recordType: "url",
data: context.values.endpoint_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 { StatusBar, Style } from "@capacitor/status-bar"
import { App as CapacitorApp } from "@capacitor/app" import { App as CapacitorApp } from "@capacitor/app"
import { SplashScreen } from "@capacitor/splash-screen"
import { CapacitorUpdater } from "@capgo/capacitor-updater" import { CapacitorUpdater } from "@capgo/capacitor-updater"
import SessionModel from "models/session" import SessionModel from "models/session"
@ -98,6 +97,8 @@ import * as Router from "./router"
import "theme/index.less" import "theme/index.less"
console.log(`REACT VERSION: ${React.version}`)
CapacitorUpdater.notifyAppReady() CapacitorUpdater.notifyAppReady()
class ComtyApp extends React.Component { class ComtyApp extends React.Component {
@ -118,15 +119,10 @@ class ComtyApp extends React.Component {
} }
static splashAwaitEvent = "app.initialization.finish" static splashAwaitEvent = "app.initialization.finish"
static async initialize() { static async initialize() {
SplashScreen.show({
autoHide: false,
})
window.app.splash = SplashScreen
window.app.version = config.package.version window.app.version = config.package.version
window.app.message = antd.message window.app.message = antd.message
window.app.isCapacitor = window.navigator.userAgent === "capacitor"
window.localStorage.setItem("last_version", window.app.version) window.localStorage.setItem("last_version", window.app.version)
@ -492,8 +488,6 @@ class ComtyApp extends React.Component {
this.setState({ initialized: true }) this.setState({ initialized: true })
Utils.handleOpenDevTools() Utils.handleOpenDevTools()
SplashScreen.hide()
} }
onRuntimeStateUpdate = (state) => { onRuntimeStateUpdate = (state) => {