Commit a347955d by jhrabal

Initial commit

parents
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>radegast</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
boot.validation.initialized=true
eclipse.preferences.version=1
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>redegast</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>RateIT</name>
<parent>
<groupId>com.jh</groupId>
<artifactId>boot-react</artifactId>
<version>0.0.4</version>
<relativePath>../boot-react</relativePath>
</parent>
<properties>
<!-- dependency versions -->
<frontend-maven-plugin-version>1.0</frontend-maven-plugin-version>
<node-version>v8.1.3</node-version>
<npm-version>5.0.3</npm-version>
<boot-common.version>0.0.4</boot-common.version>
</properties>
<dependencies>
<dependency>
<groupId>com.jh</groupId>
<artifactId>boot-react-common</artifactId>
<version>${boot-common.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<!-- barcodes -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.1</version>
</dependency>
<!-- jaxb -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.0</version>
</dependency>
<!-- test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Build an executable JAR -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<version>${project.version}</version>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker build -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.14</version>
<configuration>
<authConfig>
<username>jhdockerhub</username>
<password>Nedele+30</password>
</authConfig>
<retries>0</retries>
<rm>false</rm>
<imageName>jhdockerhub/${project.artifactId}</imageName>
<imageTags>${project.version}</imageTags>
<baseImage>openjdk:8-jre-alpine</baseImage>
<volumes>
<volume>/tmp</volume>
</volumes>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<env>
<HOSTNAME_BASE>https://www.inodio.com</HOSTNAME_BASE>
<MAILSERVER_IP>185.8.237.132</MAILSERVER_IP>
<PROFILE>prod</PROFILE>
</env>
<exposes>
<expose>7070</expose>
</exposes>
<entryPoint>["sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8 -Dspring.profiles.active=default -Dliquibase.scan.packages=liquibase.change,liquibase.changelog,liquibase.database,liquibase.parser,liquibase.precondition,liquibase.datatype,liquibase.serializer,liquibase.sqlgenerator,liquibase.executor,liquibase.snapshot,liquibase.logging,liquibase.diff,liquibase.structure,liquibase.structurecompare,liquibase.lockservice,liquibase.sdk.database,liquibase.ext -Dhostname.base=$HOSTNAME_BASE -Dspring.mail.host=$MAILSERVER_IP -Dspring.profiles.active=$PROFILE -jar /${project.build.finalName}.jar"]</entryPoint>
</configuration>
</plugin>
<!-- clean after docker images -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>prune-images</id>
<phase>package</phase>
<configuration>
<executable>docker</executable>
<arguments>
<argument>system</argument>
<argument>prune</argument>
<argument>-f</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
/*
CREATE DATABASE rateit
WITH
OWNER = postgres
ENCODING = 'utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
*/
--
CREATE SEQUENCE ID_GENERATOR;
CREATE TABLE APP_USER (
ID INT8 NOT NULL,
VERSION INT8 NOT NULL DEFAULT 0,
DELETED BOOLEAN DEFAULT FALSE,
EMAIL VARCHAR(250) NOT NULL,
PASSWORD VARCHAR(500),
PASSWORD_SALT VARCHAR(250),
FIRST_NAME VARCHAR(250),
LAST_NAME VARCHAR(250),
FACEBOOK_ID VARCHAR(500),
GOOGLE_ID VARCHAR(500),
TWITTER_ID VARCHAR(500),
ROLE VARCHAR(100),
UNIT_ID INT8,
CONSTRAINT PK_APP_USER PRIMARY KEY(ID),
CONSTRAINT FK_APP_USER_UNIT FOREIGN KEY (UNIT_ID) REFERENCES UNIT(ID)
);
CREATE INDEX APP_USER_EMAIL_IDX ON APP_USER(lower(EMAIL));
CREATE INDEX APP_USER_EMAIL_UNIT_IDX ON APP_USER(lower(EMAIL), UNIT_ID);
CREATE TABLE UNIT (
ID INT8 NOT NULL,
VERSION NUMERIC(19,0) NOT NULL DEFAULT 0,
DELETED BOOLEAN DEFAULT FALSE,
OWNER_ID INT8 NOT NULL,
NAME VARCHAR(250),
ID_NUMBER VARCHAR(100),
TAX_NUMBER VARCHAR(100),
ADDRESS VARCHAR(500),
EMAIL VARCHAR(250),
WEB VARCHAR(250),
PAYMENT_ACCOUNT VARCHAR(250),
PAYMENT_ACCOUNT_IBAN VARCHAR(250),
--SETTINGS:
TIMEZONE VARCHAR(32),
LOCALE VARCHAR(10),
DATE_FORMAT VARCHAR(10),
CURRENCY_FORMAT VARCHAR(10),
THOUSAND_DELIMITER VARCHAR(10),
DECIMAL_DELIMITER VARCHAR(10),
DECIMAL_PRECISSION NUMERIC(3,0),
ROUNDING_PRECISSION NUMERIC(3, 0),
INVOICE_SEQUENCE_TYPE VARCHAR(16),
CURRENCY VARCHAR(3),
CURRENCY_SYMBOL VARCHAR(16),
VAT BOOLEAN,
EMAIL_SENDER_ADDRESS varchar(200),
INVOICE_EMAIL_SUBJECT varchar(200),
EMAIL_SIGNATURE varchar(200),
INVOICE_THANK_YOU_NOTE varchar(200),
INITIALIZED BOOLEAN,
INVOICE_TEMPLATE varchar(250),
INVOICE_TEMPLATE_LANG varchar(32),
CONSTRAINT PK_UNIT PRIMARY KEY(ID),
CONSTRAINT FK_UNIT_APP_USER FOREIGN KEY (OWNER_ID) REFERENCES APP_USER(ID)
);
CREATE UNIQUE INDEX UNIT_OWNER_IDX ON UNIT(OWNER_ID);
CREATE TABLE SECTION (
ID INT8 NOT NULL,
NAME VARCHAR,
CONSTRAINT PK_RATING PRIMARY KEY(ID)
);
CREATE TABLE RATING (
ID INT8 NOT NULL,
SECTION_ID INT8,
DEVICE_ID VARCHAR,
RATING INT,
CONSTRAINT PK_RATING PRIMARY KEY(ID),
CONSTRAINT FK_RATING_SECTION FOREIGN KEY (SECTION_ID) REFERENCES SECTION(ID)
);
CREATE INDEX RATING_SECTION_IDX ON RATING(SECTION_ID);
package com.jh.rateit;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableJpaRepositories
@EnableAsync
@EnableScheduling
@EnableCaching
@ComponentScan(basePackages = {"com.jh"})
public class RateItApplication {
}
package com.jh.rateit.model;
import java.util.Date;
import com.jh.common.jpa.AbstractIdEntity;
public class Rating extends AbstractIdEntity {
private String deviceId;
private Date created;
private Integer rating;
private Section section;
public Rating() {
}
}
package com.jh.rateit.model;
import com.jh.common.jpa.AbstractIdEntity;
public class Section extends AbstractIdEntity {
private String name;
public Section() {
}
}
package com.jh.rateit.model;
import java.util.Locale;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jh.common.i18n.I18nContext;
import com.jh.common.jpa.AbstractIdEntity;
/**
* The Class Unit.
*/
@Entity
@Table(name = "UNIT")
public class Unit extends AbstractIdEntity implements I18nContext {
/** The Constant UNIT_KEY. */
public static final String UNIT_KEY = "_unit";
/** The version. */
@Column(name = "VERSION")
@Version
private Long version;
/** The deleted. */
@Column(name = "DELETED")
private Boolean deleted;
/** The owner id. */
@Column(name = "OWNER_ID")
private Long ownerId;
/** The name. */
@Column(name = "NAME")
private String name;
/** The timezone. */
@Column(name = "TIMEZONE")
private String timezone;
/** The locale. */
@Column(name = "LOCALE")
private String locale;
/** The decimal precission. */
@Column(name = "DECIMAL_PRECISSION")
private Integer decimalPrecission;
/** The rounding precission. */
@Column(name = "ROUNDING_PRECISSION")
private Integer roundingPrecission;
/** The invoice sequence type. */
@Column(name = "INVOICE_SEQUENCE_TYPE")
private String invoiceSequenceType;
/** The currency. */
@Column(name = "CURRENCY")
private String currency;
/** The currency symbol. */
@Column(name = "CURRENCY_SYMBOL")
private String currencySymbol;
/** The date format. */
@Column(name = "DATE_FORMAT")
private String dateFormat;
/** The currency format. */
@Column(name = "CURRENCY_FORMAT")
private String currencyFormat;
/** The thousand delimiter. */
@Column(name = "THOUSAND_DELIMITER")
private String thousandDelimiter;
/** The decimal delimiter. */
@Column(name = "DECIMAL_DELIMITER")
private String decimalDelimiter;
/** The initialized. */
@Column(name = "initialized")
private Boolean initialized;
/** The resolved locale. */
@Transient
@JsonIgnore
private Locale resolvedLocale;
/**
* Instantiates a new unit.
*/
public Unit() {
super();
}
/**
* Instantiates a new unit.
*
* @param id the id
*/
public Unit(Long id) {
super();
setId(id);
}
public Long getVersion() {
return version;
}
public void setVersion(Long version) {
this.version = version;
}
public Boolean getDeleted() {
return deleted;
}
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
public Long getOwnerId() {
return ownerId;
}
public void setOwnerId(Long ownerId) {
this.ownerId = ownerId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTimezone() {
return timezone;
}
public void setTimezone(String timezone) {
this.timezone = timezone;
}
public String getLocale() {
return locale;
}
public void setLocale(String locale) {
this.locale = locale;
}
public Integer getDecimalPrecission() {
return decimalPrecission;
}
public void setDecimalPrecission(Integer decimalPrecission) {
this.decimalPrecission = decimalPrecission;
}
public Integer getRoundingPrecission() {
return roundingPrecission;
}
public void setRoundingPrecission(Integer roundingPrecission) {
this.roundingPrecission = roundingPrecission;
}
public String getInvoiceSequenceType() {
return invoiceSequenceType;
}
public void setInvoiceSequenceType(String invoiceSequenceType) {
this.invoiceSequenceType = invoiceSequenceType;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getCurrencySymbol() {
return currencySymbol;
}
public void setCurrencySymbol(String currencySymbol) {
this.currencySymbol = currencySymbol;
}
public String getDateFormat() {
return dateFormat;
}
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
}
public String getCurrencyFormat() {
return currencyFormat;
}
public void setCurrencyFormat(String currencyFormat) {
this.currencyFormat = currencyFormat;
}
public String getThousandDelimiter() {
return thousandDelimiter;
}
public void setThousandDelimiter(String thousandDelimiter) {
this.thousandDelimiter = thousandDelimiter;
}
public String getDecimalDelimiter() {
return decimalDelimiter;
}
public void setDecimalDelimiter(String decimalDelimiter) {
this.decimalDelimiter = decimalDelimiter;
}
public Boolean getInitialized() {
return initialized;
}
public void setInitialized(Boolean initialized) {
this.initialized = initialized;
}
public Locale getResolvedLocale() {
return resolvedLocale;
}
public void setResolvedLocale(Locale resolvedLocale) {
this.resolvedLocale = resolvedLocale;
}
public static String getUnitKey() {
return UNIT_KEY;
}
}
package com.jh.rateit.rating;
import org.springframework.stereotype.Repository;
import com.jh.common.jpa.AbstractHibernateRepository;
@Repository
public class RatingRepository extends AbstractHibernateRepository {
}
package com.jh.rateit.rating;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jh.rateit.model.Rating;
@Service
public class RatingService {
@Autowired
private RatingRepository repo;
@Transactional
public void saveBulk(Collection<Rating> ratings) {
}
}
Manifest-Version: 1.0
Implementation-Title: RateIT
Implementation-Version: 0.0.1
Built-By: jh
Implementation-Vendor-Id: com.jh
Build-Jdk: 1.8.0_144
Implementation-URL: https://projects.spring.io/spring-boot/#/spring-bo
ot-starter-parent/boot-react/redegast
Created-By: Maven Integration for Eclipse
#Generated by Maven Integration for Eclipse
#Sat Jun 29 08:55:48 CEST 2019
version=0.0.1
groupId=com.jh
m2e.projectName=radegast
m2e.projectLocation=C\:\\Users\\jh\\git\\radegast\\backend
artifactId=redegast
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>redegast</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>RateIT</name>
<parent>
<groupId>com.jh</groupId>
<artifactId>boot-react</artifactId>
<version>0.0.4</version>
<relativePath>../boot-react</relativePath>
</parent>
<properties>
<!-- dependency versions -->
<frontend-maven-plugin-version>1.0</frontend-maven-plugin-version>
<node-version>v8.1.3</node-version>
<npm-version>5.0.3</npm-version>
<boot-common.version>0.0.4</boot-common.version>
</properties>
<dependencies>
<dependency>
<groupId>com.jh</groupId>
<artifactId>boot-react-common</artifactId>
<version>${boot-common.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<!-- barcodes -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.1</version>
</dependency>
<!-- jaxb -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.0</version>
</dependency>
<!-- test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Build an executable JAR -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<version>${project.version}</version>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker build -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.14</version>
<configuration>
<authConfig>
<username>jhdockerhub</username>
<password>Nedele+30</password>
</authConfig>
<retries>0</retries>
<rm>false</rm>
<imageName>jhdockerhub/${project.artifactId}</imageName>
<imageTags>${project.version}</imageTags>
<baseImage>openjdk:8-jre-alpine</baseImage>
<volumes>
<volume>/tmp</volume>
</volumes>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<env>
<HOSTNAME_BASE>https://www.inodio.com</HOSTNAME_BASE>
<MAILSERVER_IP>185.8.237.132</MAILSERVER_IP>
<PROFILE>prod</PROFILE>
</env>
<exposes>
<expose>7070</expose>
</exposes>
<entryPoint>["sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8 -Dspring.profiles.active=default -Dliquibase.scan.packages=liquibase.change,liquibase.changelog,liquibase.database,liquibase.parser,liquibase.precondition,liquibase.datatype,liquibase.serializer,liquibase.sqlgenerator,liquibase.executor,liquibase.snapshot,liquibase.logging,liquibase.diff,liquibase.structure,liquibase.structurecompare,liquibase.lockservice,liquibase.sdk.database,liquibase.ext -Dhostname.base=$HOSTNAME_BASE -Dspring.mail.host=$MAILSERVER_IP -Dspring.profiles.active=$PROFILE -jar /${project.build.finalName}.jar"]</entryPoint>
</configuration>
</plugin>
<!-- clean after docker images -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>prune-images</id>
<phase>package</phase>
<configuration>
<executable>docker</executable>
<arguments>
<argument>system</argument>
<argument>prune</argument>
<argument>-f</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
react-native-user-identity
react-native-device-info
{
t: "user" / "device",
p: ABC123
}
node_modules/**/*
.expo/*
npm-debug.*
*.jks
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
web-report/
import React from 'react';
import { StyleSheet, Text, View, TouchableOpacity, AsyncStorage, Alert, StatusBar } from 'react-native';
const sendData = async () => {
try {
let response = await fetch('https://radegast.janhrabal.com', {
method: "POST"
});
let responseJson = await response.json();
return responseJson.movies;
} catch (error) {
console.error(error);
}
}
const storeRating = async (rating) => {
let key = new Date().getTime();
await AsyncStorage.setItem(JSON.stringify(key), JSON.stringify({
rating
}));
}
class App extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
mode: 'rating',
stats: {},
statsLoading: false
};
}
componentDidMount() {
//this.timer = setInterval(sendData, 10000);
}
componentWillUnmount() {
//clearInterval(this.timer);
}
renderRating() {
const buttons = [];
for (let i = 5; i; i--) {
let text = "";
for (let j = 0; j < i; j++) {
text += "*";
}
buttons.push(<TouchableOpacity key={ i } onPress={ this.onPress(i) }>
<Text>{ text }</Text>
</TouchableOpacity>
);
}
return (
<View style={styles.container}>
<Text>Radegast Zóna</Text>
{ buttons }
</View>
);
}
onPress(rating) {
return async () => {
try {
this.setState({ mode: "info" });
await storeRating(rating);
setTimeout(() => this.setState({ mode: "rating" }), 2000);
// TODO
let keys = await AsyncStorage.getAllKeys();
let s = keys.join(",\n");
Alert.alert("stats", s);
} catch (e) {
console.error(e);
this.setState({ mode: "rating" });
}
}
}
renderResults() {
return null;
}
renderInfo() {
return <Text>XXX</Text>;
}
render() {
let { mode } = this.state;
let content = null;
switch (mode) {
case 'results':
content = this.renderResults();
break;
case 'info':
content = this.renderInfo();
break;
default:
content = this.renderRating();
}
return (
<View style={styles.container}>
<StatusBar hidden />
{ content }
</View>
);
}
}
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
{
"expo": {
"name": "Radegast Zona",
"slug": "radegastZona",
"privacy": "public",
"sdkVersion": "33.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
\ No newline at end of file
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"expo": "^33.0.0",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-web": "^0.11.4"
},
"devDependencies": {
"babel-preset-expo": "^5.1.1"
},
"private": true
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment