Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Styling #110

Merged
merged 9 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions wallet/wallet-app/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
import React from 'react';
import { Provider } from 'react-redux';
import { Colors } from 'react-native-ui-lib';
import store from './redux/configureStore';
import AppWrapper from './AppWrapper';

Colors.loadSchemes({
light: {
screenBG: 'transparent',
textColor: Colors.yellow10,
moonOrSun: Colors.yellow30,
mountainForeground: Colors.green30,
mountainBackground: Colors.green50,
},
dark: {
screenBG: Colors.grey10,
textColor: Colors.yellow10,
moonOrSun: Colors.grey80,
mountainForeground: Colors.violet10,
mountainBackground: Colors.violet20,
},
});

export default function App() {
return (
<Provider store={store}>
Expand Down
24 changes: 18 additions & 6 deletions wallet/wallet-app/AppWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Icon from 'react-native-vector-icons/FontAwesome';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { StyleSheet } from 'react-native';
import RequestFrame from './components/frames/RequestFrame';
import ActivityFrame from './components/frames/ActivityFrame';
import ProofOverviewFrame from './components/frames/ProofOverviewFrame';
Expand Down Expand Up @@ -72,16 +73,21 @@ export default function AppWrapper() {
}

// You can return any component that you like here!
return <Icon name={iconName} size={size} color={color} />;
return <Icon style={{ paddingTop: 8 }} name={iconName} size={size} color={color} />;
},
})}
tabBarOptions={{
activeBackgroundColor: '#3aa797',
inactiveBackgroundColor: '#3aa797',
activeTintColor: 'white',
inactiveTintColor: '#1E2B3C',
activeBackgroundColor: 'white',
inactiveBackgroundColor: 'white',
activeTintColor: 'rgb(0,98,184)',
inactiveTintColor: 'rgb(30,46,60)',
style: { height: 85 },
labelStyle: {
fontSize: 10,
paddingBottom: 7,
},
}}>
<Tab.Screen name="Oversikt" component={OverviewStackScreen} />
<Tab.Screen style={styles.textNavBar} name="Oversikt" component={OverviewStackScreen} />
<Tab.Screen name="Forespørsler" component={RequestFrame} />
<Tab.Screen name="Aktivitet" component={ActivityFrame} />
<Tab.Screen name="Profil" component={ProfileMenuSlide} />
Expand All @@ -98,3 +104,9 @@ export default function AppWrapper() {
</NavigationContainer>
);
}
const styles = StyleSheet.create({
textNavBar: {
padding: 10,
fontSize: 50,
},
});
17 changes: 8 additions & 9 deletions wallet/wallet-app/components/frames/Access.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
import { useIsFocused } from '@react-navigation/native';
import { signIn } from '../../redux/SignedInSlice';


/**
* Creates a PIN code and a login page where you enter the pin and one delete pin button
* @returns Log-in page
Expand Down Expand Up @@ -85,7 +84,7 @@ export default function Access() {
};

/**
* Clears the inputarea
* Clears the inputarea
*/
const clearPin = () => {
if (text === 'Opprett personlig kode') {
Expand Down Expand Up @@ -128,33 +127,33 @@ export default function Access() {
inputViewEmptyStyle={{
backgroundColor: 'transparent',
borderWidth: 1,
borderColor: '#3aa797',
borderColor: 'rgb(30,46,60)',
}}
inputViewFilledStyle={{
backgroundColor: '#3aa797',
backgroundColor: 'rgb(30,46,60)',
}}
buttonViewStyle={{
borderWidth: 1,
borderColor: '#3aa797',
borderColor: 'rgb(30,46,60)',
backgroundColor: 'rgb(242, 242, 242)',
}}
buttonTextStyle={{
color:'#3aa797',
color: 'rgb(30,46,60)',
}}
onButtonPress={(key) => {
if (key === 'custom_left') {
pinView.current.clear();
}
}}
customLeftButton={
showRemoveButton ? <Icon name="ios-backspace" size={36} color="#3aa797" /> : undefined
showRemoveButton ? <Icon name="ios-backspace" size={36} color="rgb(30,46,60)" /> : undefined
}
customRightButton={
showCompletedButton ? (
<Icon
name="arrow-forward-outline"
size={36}
color="#3aa797"
color="rgb(30,46,60)"
onPress={() => checkPin() && checkHasPin() && clearPin()}
/>
) : undefined
Expand All @@ -164,7 +163,7 @@ export default function Access() {
<TouchableOpacity
style={{
borderRadius: 4,
backgroundColor: '#3aa797',
backgroundColor: 'rgb(30,46,60)',
alignItems: 'center',
width: 150,
marginBottom: 10,
Expand Down
4 changes: 2 additions & 2 deletions wallet/wallet-app/components/frames/Onboarding.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function Onboarding() {
<View style={styles.done}>
<Text style={styles.verifiedText}>
Grunnidentitet verifisert
<Icon name="check" size={25} color="#3aa797" />
<Icon name="check" size={25} color="rgb(0,98,184)" />
</Text>

<TouchableOpacity style={styles.button} onPress={() => navigation.navigate('Adgangskontroll')}>
Expand All @@ -98,7 +98,7 @@ const styles = StyleSheet.create({
},
button: {
borderRadius: 4,
backgroundColor: '#3aa797',
backgroundColor: 'rgb(0,98,184)',
padding: 20,
width: '75%',
alignItems: 'center',
Expand Down
50 changes: 32 additions & 18 deletions wallet/wallet-app/components/frames/ProfileMenu.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import React, { useState } from 'react';
import Icon from 'react-native-vector-icons/FontAwesome';
import { SafeAreaView, TouchableOpacity, Text, View, StyleSheet, Alert, Platform } from 'react-native';
import { SafeAreaView, View, StyleSheet, Alert, Platform } from 'react-native';
import { useDispatch } from 'react-redux';
import { useNavigation } from '@react-navigation/native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import jwtDecode from 'jwt-decode';
import { Button, Text } from 'react-native-ui-lib';
import { func } from 'prop-types';
import { signIn } from '../../redux/SignedInSlice';

import { getWalletID } from '../../utils/sign';
/**
* A profile site for administrativ changes on the profile
* @returns A new site, A logout button and a delete button
Expand Down Expand Up @@ -74,36 +76,46 @@ export default function ProfileMenuSlide() {
};

return (
<SafeAreaView>
<View style={styles.container}>
<Icon name="user" size={100} color="black" />
<SafeAreaView style={{ display: 'flex', flexDirection: 'column', flexWrap: 'nowrap', alignContent: 'center' }}>
<View style={{ alignItems: 'flex-end', marginRight: 20, marginTop: 20 }}>
<Button
label="Slett bruker"
backgroundColor="rgb(194,19,44)"
size={Button.sizes.small}
onPress={buttonAlert}
text90
/>
</View>
<View>
<View style={styles.container} marginTop={40}>
<Icon name="user" size={200} color="rgb(30,46,60)" />
</View>
<Text style={styles.textstyle}>Kari Nordman</Text>
</View>
<Text style={styles.textstyle}>Her kan du administrere profilen din</Text>
<Text style={styles.issuerText}>Du har grunnidentitet utstedt fra: {baseIdIssuer}</Text>

<TouchableOpacity style={styles.logOut} onPress={() => dispatch(signIn(false))}>
<Text style={styles.buttonTextlogOut}>Logg ut</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.deleteUser} onPress={buttonAlert}>
<Text style={styles.buttonTextDeleteUser}>Slett Bruker</Text>
</TouchableOpacity>
<View width={320} style={{ alignSelf: 'center' }}>
<Button backgroundColor="rgb(0,98,184)" onPress={() => dispatch(signIn(false))}>
<Text style={styles.buttonTextlogOut}>Logg ut</Text>
</Button>
</View>
</SafeAreaView>
);
}

const styles = StyleSheet.create({
container: {
padding: 10,
paddingTop: 30,
alignSelf: 'center',
},
textstyle: {
fontSize: 20,
marginLeft: 30,
paddingHorizontal: 20,
alignSelf: 'center',
color: 'rgb(30,46,60)',
},
logOut: {
borderRadius: 4,
backgroundColor: '#3aa797',
backgroundColor: 'rgb(0,98,184)',
padding: 10,
marginTop: 10,
marginBottom: 30,
Expand All @@ -125,13 +137,15 @@ const styles = StyleSheet.create({
},
issuerText: {
marginTop: 70,
marginBottom: 150,
color: 'green',
marginBottom: 100,
paddingHorizontal: 20,
color: 'rgb(30,46,60)',
textAlign: 'center',
fontSize: 20,
},
buttonTextlogOut: {
fontSize: 20,
color: 'white',
},
buttonTextDeleteUser: {
fontSize: 15,
Expand Down
2 changes: 1 addition & 1 deletion wallet/wallet-app/components/frames/ProofOverviewFrame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const styles = StyleSheet.create({
},
logOut: {
borderRadius: 4,
backgroundColor: '#3aa797',
backgroundColor: 'rgb(0,98,184)',
padding: 10,
marginTop: 10,
marginBottom: 30,
Expand Down
Loading