added gradient bg

This commit is contained in:
Michele Balistreri 2024-10-09 08:03:58 +02:00
parent 2405d0dc1c
commit 3b9defb084
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A
4 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import React, { useEffect, useRef, useState } from 'react';
import { SafeAreaView, StyleSheet, NativeEventEmitter } from 'react-native';
import { SafeAreaView, StyleSheet, NativeEventEmitter, ImageBackground } from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import DiscoveryScreen from './components/steps/DiscoveryScreen';
@ -278,7 +278,7 @@ const Main = () => {
}
return (
<SafeAreaView style={Styles.container}>
<ImageBackground source={require("./images/gradient.png")} resizeMode='stretch' style={Styles.mainContainer}>
{step == Step.Discovery && <DiscoveryScreen onPressFunc={connectCard}></DiscoveryScreen>}
{step == Step.Initialization && <InitializationScreen onPressFunc={initPin} onCancelFunc={cancel}></InitializationScreen>}
{step == Step.Loading && <MnemonicScreen pinRequired={pinRef.current ? false : true} pinRetryCounter={pinDisplayCounter()} onPressFunc={loadMnemonic} onCancelFunc={cancel}></MnemonicScreen>}
@ -286,7 +286,7 @@ const Main = () => {
{step == Step.Home && <HomeScreen pinRequired={pinRef.current ? false : true} pinRetryCounter={pinDisplayCounter()} walletKey={walletKey.current} onPressFunc={login} onCancelFunc={cancel} onFactoryResetFunc={startFactoryReset}></HomeScreen>}
{step == Step.FactoryReset && <FactoryResetScreen pinRetryCounter={pinDisplayCounter()} onPressFunc={connectCard} onCancelFunc={cancel}></FactoryResetScreen>}
<NFCModal isVisible={isModalVisible} onChangeFunc={stopNFC}></NFCModal>
</SafeAreaView>
</ImageBackground>
);
}

View File

@ -1,11 +1,15 @@
import { StyleSheet } from "react-native";
const Styles = StyleSheet.create({
container: {
mainContainer: {
backgroundColor: 'black',
width: '100%',
height: '100%'
},
container: {
width: '100%',
height: '100%'
},
textContainer: {
width: '100%',
paddingTop: 80,

View File

@ -1,5 +1,5 @@
import {FC, useEffect, useRef, useState } from "react";
import { SafeAreaView, StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
import Button from "../Button";
import { Camera, useCameraDevice, useCameraPermission, useCodeScanner } from "react-native-vision-camera";
import { hexToBytes } from "@noble/hashes/utils";

BIN
src/images/gradient.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB