Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .expo-shared/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true,
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
}
9 changes: 9 additions & 0 deletions .expo/packager-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"devToolsPort": 19002,
"expoServerPort": null,
"packagerPort": null,
"packagerPid": null,
"expoServerNgrokUrl": null,
"packagerNgrokUrl": null,
"ngrokPid": null
}
7 changes: 7 additions & 0 deletions .expo/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"hostType": "tunnel",
"lanType": "ip",
"dev": true,
"minify": false,
"urlRandomness": "7n-2uq"
}
49 changes: 42 additions & 7 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,54 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/

import React, {Component} from 'react';
//import React from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import DrawerNavigator from './navigation/DrawerNavigator';

export default class App extends React.Component {
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});

render(){
return <DrawerNavigator/>;
type Props = {};
export default class App extends React.Component<Props> {
render() {
return (
/**<View style={styles.container}>
<Text style={styles.welcome}>Welcome to React Native!</Text>
<Text style={styles.instructions}>To get started, edit App.js</Text>
<Text style={styles.instructions}>{instructions}</Text>
</View>
*/
<DrawerNavigator/>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#480372',
alignItems: 'center',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#480372',
},
/**welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
*/
});
9 changes: 9 additions & 0 deletions ReqEng.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Binary file added assets/sounds/fire.mp3
Binary file not shown.
Binary file added assets/sounds/music.mp3
Binary file not shown.
Binary file added assets/sounds/rain.mp3
Binary file not shown.
Binary file added assets/sounds/water.mp3
Binary file not shown.
Binary file added assets/sounds/wind.mp3
Binary file not shown.
26 changes: 26 additions & 0 deletions components/AddSound.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, { Component } from "react";
import Icon from "@builderx/icons";
import { StyleSheet, TouchableOpacity } from "react-native";
export default class AddSound extends Component {
render() {
return (
<TouchableOpacity style={[styles.root, this.props.style]}>
<Icon style={styles.caption} name="plus" type="Octicons" />
</TouchableOpacity>
);
}
}
const styles = StyleSheet.create({
root: {
backgroundColor: "transparent",
justifyContent: "center",
alignItems: "center",
flexDirection: "row",
borderRadius: 2,
flex: 1
},
caption: {
color: "rgba(167,164,203,1)",
fontSize: 100
}
});
4 changes: 2 additions & 2 deletions components/CloseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class CloseButton extends React.Component{
style={styles.menuIcon}
onPress={() => this.props.navigation.toggleDrawer()}
/>
)
)
}
}

Expand All @@ -21,7 +21,7 @@ const styles = StyleSheet.create({
zIndex:9,
position:'absolute',
top:40,
right:20,
right:20,
}

})
67 changes: 67 additions & 0 deletions components/EinschlafhilfeSoundButtonFire.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import React, { Component } from "react";
import Icon from "@builderx/icons";
import { StyleSheet, TouchableOpacity, ToastAndroid, View, Slider } from "react-native";
import { Audio, Video } from 'expo-av';

Audio.setIsEnabledAsync(true);
const soundFire = new Audio.Sound();
try {
soundFire.loadAsync(require('../assets/sounds/fire.mp3'));
} catch (e) {
console.log('cannot load file', e);
}
export default class SoundButtonRain extends Component {
constructor(props) {
super(props)

this.state = {
play: false,
};
}

onPressButton() {
if(!this.state.play) {
try {
soundFire.playAsync();
soundFire.setIsLoopingAsync(true)
} catch (e) {
alert('Cannot play the song');
}
} else {
soundFire.stopAsync();
}
this.setState({ play: !this.state.play });
}

render() {
if (!this.state.play) {
return (
<TouchableOpacity style={[styles.root, this.props.style]} onPress={this.onPressButton.bind(this)}>
<Icon style={styles.caption} name="ios-bonfire" type="Ionicons" />
</TouchableOpacity>
);
}
else {
return (
<TouchableOpacity style={[styles.root, this.props.style]} onPress={this.onPressButton.bind(this)}>
<Icon style={styles.caption} name="ios-pause" type="Ionicons" />
</TouchableOpacity>
);
}
}
}

const styles = StyleSheet.create({
root: {
backgroundColor: "transparent",
justifyContent: "center",
alignItems: "center",
flexDirection: "row",
borderRadius: 2,
flex: 1
},
caption: {
color: "rgba(167,164,203,1)",
fontSize: 100
},
});
66 changes: 66 additions & 0 deletions components/EinschlafhilfeSoundButtonMusic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React, { Component } from "react";
import Icon from "@builderx/icons";
import { StyleSheet, TouchableOpacity, ToastAndroid } from "react-native";
import { Audio, Video } from 'expo-av';

Audio.setIsEnabledAsync(true);
const soundMusic = new Audio.Sound();
try {
soundMusic.loadAsync(require('../assets/sounds/music.mp3'));
} catch (e) {
console.log('cannot load file', e);
}
export default class SoundButtonRain extends Component {
constructor(props) {
super(props)

this.state = {
play: false,
};
}

onPressButton() {
if(!this.state.play) {
try {
soundMusic.playAsync();
soundMusic.setIsLoopingAsync(true)
} catch (e) {
alert('Cannot play the song');
}
} else {
soundMusic.stopAsync();
}
this.setState({ play: !this.state.play });
}

render() {
if (!this.state.play) {
return (
<TouchableOpacity style={[styles.root, this.props.style]} onPress={this.onPressButton.bind(this)}>
<Icon style={styles.caption} name="ios-musical-notes" type="Ionicons" />
</TouchableOpacity>
);
}
else {
return (
<TouchableOpacity style={[styles.root, this.props.style]} onPress={this.onPressButton.bind(this)}>
<Icon style={styles.caption} name="ios-pause" type="Ionicons" />
</TouchableOpacity>
);
}
}
}
const styles = StyleSheet.create({
root: {
backgroundColor: "transparent",
justifyContent: "center",
alignItems: "center",
flexDirection: "row",
borderRadius: 2,
flex: 1
},
caption: {
color: "rgba(167,164,203,1)",
fontSize: 100
}
});
67 changes: 67 additions & 0 deletions components/EinschlafhilfeSoundButtonRain.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import React, { Component } from "react";
import Icon from "@builderx/icons";
import { StyleSheet, TouchableOpacity, ToastAndroid, Text, View } from "react-native";
import { Audio, Video } from 'expo-av';

Audio.setIsEnabledAsync(true);
const soundRain = new Audio.Sound();
try {
soundRain.loadAsync(require('../assets/sounds/rain.mp3'));
} catch (e) {
console.log('cannot load file', e);
}
export default class SoundButtonRain extends Component {
constructor(props) {
super(props)

this.state = {
play: false,
};
}

onPressButton() {
if(!this.state.play) {
try {
soundRain.playAsync();
soundRain.setIsLoopingAsync(true)
} catch (e) {
alert('Cannot play the song');
}
} else {
soundRain.stopAsync();
}
this.setState({ play: !this.state.play });
}


render() {
if (!this.state.play) {
return (
<TouchableOpacity style={[styles.root, this.props.style]} onPress={this.onPressButton.bind(this)}>
<Icon style={styles.caption} name="md-rainy" type="Ionicons" />
</TouchableOpacity>
);
}
else {
return (
<TouchableOpacity style={[styles.root, this.props.style]} onPress={this.onPressButton.bind(this)}>
<Icon style={styles.caption} name="ios-pause" type="Ionicons" />
</TouchableOpacity>
);
}
}
}
const styles = StyleSheet.create({
root: {
backgroundColor: "transparent",
justifyContent: "center",
alignItems: "center",
flexDirection: "row",
borderRadius: 2,
flex: 1
},
caption: {
color: "rgba(167,164,203,1)",
fontSize: 100
}
});
Loading