diff --git a/.DS_Store b/.DS_Store index 6694a5c6..be1a2e1f 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/README.md b/README.md index 0f0945d7..e49511e6 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,35 @@ ![RPInt Logo](assets/logo.png) # Raspberry-Pint -A great way to monitor the level of your keg, temperature, and show details of the beer you're drinking. +A mobile app that monitors the level of your keg, temperature, and will show details of the beer you're drinking. With just a click you can see all the details of the beer or you can see what the temperature of you keg is at as well as how full your keg is. +## API +- https://github.com/KCN8/Raspberry-Pint-RPI-Software +- https://github.com/KCN8/Raspberry-Pint-API ## Future Plans -- +- HardWare to work +- Polish Appearance ## Built With -- Raspberry pi -- JavaScript -- Node.js -- React Native -- HTML5 -- CSS +- HardWare + - Raspberry pi + - Flow Meter + - Thermometer +- SoftWare + - JavaScript + - Node.js + - React Native + - NativeBase + - Knex + - Heroku + - Expo - Blood - Sweat - Tears -- NativeBase + +## Screenshots + + ## Mockups diff --git a/assets/.DS_Store b/assets/.DS_Store index 4967a9fb..48465952 100644 Binary files a/assets/.DS_Store and b/assets/.DS_Store differ diff --git a/assets/Contact.png b/assets/Contact.png new file mode 100644 index 00000000..10e50d49 Binary files /dev/null and b/assets/Contact.png differ diff --git a/assets/Home_page.png b/assets/Home_page.png new file mode 100644 index 00000000..88714935 Binary files /dev/null and b/assets/Home_page.png differ diff --git a/assets/Keg_stats.png b/assets/Keg_stats.png new file mode 100644 index 00000000..d5c4a037 Binary files /dev/null and b/assets/Keg_stats.png differ diff --git a/assets/Kegs.png b/assets/Kegs.png new file mode 100644 index 00000000..7cb4727c Binary files /dev/null and b/assets/Kegs.png differ diff --git a/components/Contact.js b/components/Contact.js index 833b2e02..a9f0866f 100644 --- a/components/Contact.js +++ b/components/Contact.js @@ -1,42 +1,150 @@ import React, { Component } from 'react'; import { Image } from 'react-native'; -import { Container, Header, Content, Card, CardItem, Thumbnail, Text, Button, Icon, Left, Body } from 'native-base'; +import { Col, Row, Grid } from "react-native-easy-grid"; +import { Container, Header, Content, Card, CardItem, Thumbnail, Text, Button, Icon, Left, Right, Body } from 'native-base'; export default class CardShowcaseExample extends Component { render() { return ( - - - - - - - - NativeBase - April 15, 2016 - - - - - - - - //Your text here - - - - - - - - - - - + + + + + + + + + + Hyunmo Yang + + + + + + + + + /yhmgood0130 + + + + /in/hyunmoyang/ + + + + + + + + + + + + + + Eric Wallen + + + + + + + + + /ericwallen + + + + /in/ericwallen/ + + + + + + + + + + + + + + Recardo Poole + + + + + + + + /MrPoole01 + + + + /in/recardo-poole/ + + + + + + + + + + + + + + + + Casey Herold + + + + + + + + /KCN8 + + + + /in/casey-herold/ + + + + + + + + + + + + + + Jonathan Sax + + + + + + + + /Redrecovery9 + + + + /in/jonathan-sax/ + + + + + + + + ); } } diff --git a/components/KegList.js b/components/KegList.js index 8cf5e68d..dfa519ca 100644 --- a/components/KegList.js +++ b/components/KegList.js @@ -38,15 +38,7 @@ export default class KegList extends Component { style={{width: 100, height: 100}} source={{uri: this.props.beerPhoto}} /> - - - {this.props.BeerDescription} - - KegSizeLiters: {this.props.KegSizeLiters} - litersUsed: {this.props.litersUsed} - - kegTemp: {this.props.kegTemp} @@ -55,7 +47,8 @@ export default class KegList extends Component { - @@ -90,7 +83,7 @@ export default class KegList extends Component { const styles = StyleSheet.create({ container: { - flex: 1, + // flex: 1, alignItems: 'stretch', justifyContent: 'center', }, diff --git a/components/KegStatus.js b/components/KegStatus.js index 6825bd2c..88127e23 100644 --- a/components/KegStatus.js +++ b/components/KegStatus.js @@ -26,9 +26,9 @@ export default class KegStatus extends Component { - + - Detroit Premium Beer + Mojo IPA ABV: 12% @@ -40,7 +40,8 @@ export default class KegStatus extends Component { source={{uri: 'https://images.duckduckgo.com/iu/?u=http%3A%2F%2Fwww.brewpalacekegbot.com%2Fstatic%2Fimages%2Fkeg%2Ffull%2Fkeg-srm14-3.png&f=1'}} style={styles.image}/> - //Your text here + Pints Remaining: 124 + Temperature: 48 diff --git a/components/OnTap.js b/components/OnTap.js index 1973145f..bff6285a 100644 --- a/components/OnTap.js +++ b/components/OnTap.js @@ -19,7 +19,6 @@ const baseURL = 'https://raspberry-pint-api.herokuapp.com' const kegAndBeerResponse = await fetch(`${baseURL}/keg-and-beer`) const kegAndBeerJSON = await kegAndBeerResponse.json() this.setState({kegAndBeer: kegAndBeerJSON}) - console.log(this.state.kegAndBeer); } setCurrentReadOffset = (event) => { @@ -29,13 +28,32 @@ const baseURL = 'https://raspberry-pint-api.herokuapp.com' // this.state.dataset.setReadOffset(currentItemIndex); } + deleteKeg(id) { + let newKegandBeer = this.state.kegAndBeer.filter(keg => { + return keg.id != id + }) + fetch('https://raspberry-pint-api.herokuapp.com/kegs-by-id/' + id, { + method: 'DELETE', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + id: this.props.KegID + }) + }) + .then(response => { + this.setState({kegAndBeer: newKegandBeer}) + }) + } + render() { return ( {this.state.kegAndBeer.map(kegWithItsBeer => { - return(); + return(); })}