Skip to content

Commit

Permalink
Initial scaffolding for the demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
pcowgill committed Nov 15, 2018
1 parent 0903b83 commit b2947d1
Show file tree
Hide file tree
Showing 16 changed files with 12,265 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.DS_Store
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
10.13
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -20,7 +20,9 @@ In the long run, Tasit will stitch together components from multiple dapps into

### Developers

This is a monorepo for all of the open source Tasit 3rd party mobile apps for Ethereum dapps
This is a monorepo for all of the open-source Tasit 3rd-party mobile apps for Ethereum dapps

These apps all use the [Tasit SDK](https://github.com/tasitlabs/TasitSDK).

For more info, please visit our website:

Expand Down
7 changes: 7 additions & 0 deletions demo/.gitignore
@@ -0,0 +1,7 @@
node_modules/**/*
.expo/*
npm-debug.*
*.jks
*.p12
*.key
*.mobileprovision
1 change: 1 addition & 0 deletions demo/.nvmrc
@@ -0,0 +1 @@
10.13
1 change: 1 addition & 0 deletions demo/.watchmanconfig
@@ -0,0 +1 @@
{}
50 changes: 50 additions & 0 deletions demo/App.js
@@ -0,0 +1,50 @@
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import { AppLoading, Asset, Font } from "expo";

export default class App extends React.Component {
state = {
isLoadingComplete: false
};

render() {
if (!this.state.isLoadingComplete && !this.props.skipLoadingScreen) {
return (
<AppLoading
startAsync={this._loadResourcesAsync}
onError={this._handleLoadingError}
onFinish={this._handleFinishLoading}
/>
);
} else {
return (
<View style={styles.container}>
<Text>Welcome to the Tasit demo app</Text>
</View>
);
}
}

_loadResourcesAsync = async () => {
return Promise.all([Asset.loadAsync([]), Font.loadAsync({})]);
};

_handleLoadingError = error => {
// In this case, you might want to report the error to your error
// reporting service, for example Sentry
console.warn(error);
};

_handleFinishLoading = () => {
this.setState({ isLoadingComplete: true });
};
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center"
}
});
25 changes: 25 additions & 0 deletions demo/app.json
@@ -0,0 +1,25 @@
{
"expo": {
"name": "tasit-demo",
"description": "A demo app showing proper usage of the Tasit SDK",
"slug": "tasit-demo",
"privacy": "unlisted",
"sdkVersion": "31.0.0",
"platforms": ["ios", "android"],
"version": "0.0.1",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
}
}
}
Binary file added demo/assets/images/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/assets/images/splash.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions demo/babel.config.js
@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
Empty file added demo/components
Empty file.
14 changes: 14 additions & 0 deletions demo/constants/Colors.js
@@ -0,0 +1,14 @@
const tintColor = "#2f95dc";

export default {
tintColor,
tabIconDefault: "#ccc",
tabIconSelected: tintColor,
tabBar: "#fefefe",
errorBackground: "red",
errorText: "#fff",
warningBackground: "#EAEB5E",
warningText: "#666804",
noticeBackground: tintColor,
noticeText: "#fff"
};
12 changes: 12 additions & 0 deletions demo/constants/Layout.js
@@ -0,0 +1,12 @@
import { Dimensions } from "react-native";

const width = Dimensions.get("window").width;
const height = Dimensions.get("window").height;

export default {
window: {
width,
height
},
isSmallDevice: width < 375
};

0 comments on commit b2947d1

Please sign in to comment.