move source to src/
This commit is contained in:
parent
444c737e4e
commit
70227f50c0
24
.vscode/.react/index.bundle
vendored
24
.vscode/.react/index.bundle
vendored
@ -1279,7 +1279,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
|
||||
var _reactNative = _$$_REQUIRE(_dependencyMap[1], "react-native");
|
||||
|
||||
var _App = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2], "./App"));
|
||||
var _App = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2], "./src/App"));
|
||||
|
||||
var _app = _$$_REQUIRE(_dependencyMap[3], "./app.json");
|
||||
|
||||
@ -95976,7 +95976,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
|
||||
var _themes = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[14], "./config/themes"));
|
||||
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/App.js";
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/src/App.js";
|
||||
var AppNavigator = (0, _reactNavigationTabs.createBottomTabNavigator)({
|
||||
Home: _home.default,
|
||||
Help: _help.default,
|
||||
@ -96065,7 +96065,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
var _c;
|
||||
|
||||
$RefreshReg$(_c, "AppContainer");
|
||||
},447,[1,24,25,32,34,37,54,448,530,611,776,783,784,785,777],"App.js");
|
||||
},447,[1,24,25,32,34,37,54,448,530,611,776,783,784,785,777],"src/App.js");
|
||||
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
@ -119034,7 +119034,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
|
||||
var _reactNative = _$$_REQUIRE(_dependencyMap[9], "react-native");
|
||||
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/home.js";
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/home.js";
|
||||
|
||||
var HomeScreen = function (_React$Component) {
|
||||
(0, _inherits2.default)(HomeScreen, _React$Component);
|
||||
@ -119196,7 +119196,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
}(_react.default.Component);
|
||||
|
||||
exports.default = HomeScreen;
|
||||
},776,[1,103,24,25,32,34,37,54,777,2],"routes/home.js");
|
||||
},776,[1,103,24,25,32,34,37,54,777,2],"src/routes/home.js");
|
||||
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
|
||||
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
@ -119230,7 +119230,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
|
||||
var _default = theme;
|
||||
exports.default = _default;
|
||||
},777,[1,46,778],"config/themes.js");
|
||||
},777,[1,46,778],"src/config/themes.js");
|
||||
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
|
||||
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
@ -119700,7 +119700,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
|
||||
var _reactNative = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
||||
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/help.js";
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/help.js";
|
||||
|
||||
var HelpScreen = function (_React$Component) {
|
||||
(0, _inherits2.default)(HelpScreen, _React$Component);
|
||||
@ -119747,7 +119747,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
}(_react.default.Component);
|
||||
|
||||
exports.default = HelpScreen;
|
||||
},783,[1,24,25,32,34,37,54,777,2],"routes/help.js");
|
||||
},783,[1,24,25,32,34,37,54,777,2],"src/routes/help.js");
|
||||
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
|
||||
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
@ -119772,7 +119772,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
|
||||
var _reactNative = _$$_REQUIRE(_dependencyMap[8], "react-native");
|
||||
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/contact.js";
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/contact.js";
|
||||
|
||||
var ContactScreen = function (_React$Component) {
|
||||
(0, _inherits2.default)(ContactScreen, _React$Component);
|
||||
@ -119819,7 +119819,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
}(_react.default.Component);
|
||||
|
||||
exports.default = ContactScreen;
|
||||
},784,[1,24,25,32,34,37,54,777,2],"routes/contact.js");
|
||||
},784,[1,24,25,32,34,37,54,777,2],"src/routes/contact.js");
|
||||
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
|
||||
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], "@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
@ -119846,7 +119846,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
|
||||
var _reactNative = _$$_REQUIRE(_dependencyMap[9], "react-native");
|
||||
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/routes/settings.js";
|
||||
var _jsxFileName = "/home/flummi/dev/f0ckapp/src/routes/settings.js";
|
||||
|
||||
var _theme = _syncStorage.default.get("theme") === "dark";
|
||||
|
||||
@ -119901,7 +119901,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
||||
}(_react.default.Component);
|
||||
|
||||
exports.default = SettingScreen;
|
||||
},785,[1,24,25,32,34,37,54,777,778,2],"routes/settings.js");
|
||||
},785,[1,24,25,32,34,37,54,777,778,2],"src/routes/settings.js");
|
||||
__d(function(global, require, _aUnused, _bUnused, module, exports, _cUnused) {
|
||||
module.exports = {
|
||||
"name": "f0ckapp",
|
||||
|
2
.vscode/.react/index.map
vendored
2
.vscode/.react/index.map
vendored
File diff suppressed because one or more lines are too long
6
index.js
6
index.js
@ -2,8 +2,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
import App from './App';
|
||||
import {name as appName} from './app.json';
|
||||
import {AppRegistry} from "react-native";
|
||||
import App from "./src/App";
|
||||
import {name as appName} from "./app.json";
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
"name": "f0ckapp",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android": "react-native run-android",
|
||||
"ios": "react-native run-ios",
|
||||
"start": "react-native start",
|
||||
"test": "jest",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native-community/async-storage": "^1.7.1",
|
||||
"react": "16.9.0",
|
||||
"react-native": "0.61.5",
|
||||
"react-native-vector-icons": "^6.6.0",
|
||||
"sync-storage": "^0.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.6.2",
|
||||
"@babel/runtime": "^7.6.2",
|
||||
"@react-native-community/eslint-config": "^0.0.5",
|
||||
"babel-jest": "^24.9.0",
|
||||
"eslint": "^6.5.1",
|
||||
"jest": "^24.9.0",
|
||||
"metro-react-native-babel-preset": "^0.56.0",
|
||||
"react-test-renderer": "16.9.0"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
}
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
import theme from "../config/themes";
|
||||
|
||||
import { Text, View, TouchableOpacity, FlatList } from 'react-native';
|
||||
import FastImage from 'react-native-fast-image';
|
||||
|
||||
export default class HomeScreen extends React.Component {
|
||||
state = {
|
||||
dataSource: [],
|
||||
debug: "deeeebug"
|
||||
};
|
||||
handleScroll = e => {
|
||||
const el = e.nativeEvent;
|
||||
this.setState({
|
||||
debug: `${el.contentOffset.y.toFixed(2)}px`
|
||||
});
|
||||
};
|
||||
handleLayout = e => {
|
||||
console.log(e.nativeEvent.layout);
|
||||
};
|
||||
|
||||
async componentDidMount() {
|
||||
const res = await (await fetch("https://dev.f0ck.me/api/p?eps=54")).json();
|
||||
const items = res.items.map(e => ({
|
||||
id: e.id,
|
||||
src: `https://f0ck.me/t/${e.id}.png`
|
||||
}));
|
||||
|
||||
this.setState({
|
||||
dataSource: items
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View style={{ flex: 1, backgroundColor: theme.background }}>
|
||||
<FastImage source={{ uri: theme.logo }} style={{ width: 112, height: 28, marginTop: 16 }}></FastImage>
|
||||
<Text style={{ color: "#fff", fontWeight: "bold", textAlign: "right" }}>{this.state.debug}</Text>
|
||||
|
||||
<FlatList
|
||||
data={this.state.dataSource}
|
||||
onScroll={this.handleScroll}
|
||||
onLayout={this.handleLayout}
|
||||
renderItem={({ item }) => (
|
||||
<View style={{ flex: 1, flexDirection: "column", margin: 1 }}>
|
||||
<TouchableOpacity key={item.id} style={{ flex: 1 }} >
|
||||
<FastImage style={{ height: 128, width: 128 }} source={{ uri: item.src }} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
)}
|
||||
numColumns={4}
|
||||
keyExtractor={(item, index) => index.toString()}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ import React from "react";
|
||||
|
||||
import theme from "../config/themes";
|
||||
|
||||
import { Text, View, Image } from 'react-native';
|
||||
import { Text, View, Image } from "react-native";
|
||||
|
||||
export default class ContactScreen extends React.Component {
|
||||
render() {
|
@ -2,7 +2,7 @@ import React from "react";
|
||||
|
||||
import theme from "../config/themes";
|
||||
|
||||
import { Text, View, TouchableOpacity, FlatList, Image } from 'react-native';
|
||||
import { Text, View, TouchableOpacity, FlatList, Image } from "react-native";
|
||||
|
||||
export default class HomeScreen extends React.Component {
|
||||
state = {
|
@ -3,7 +3,7 @@ import React from "react";
|
||||
import theme from "../config/themes";
|
||||
import SyncStorage from "sync-storage";
|
||||
|
||||
import { Text, View, Switch, Image } from 'react-native';
|
||||
import { Text, View, Switch, Image } from "react-native";
|
||||
|
||||
let _theme = SyncStorage.get("theme") === "dark";
|
||||
|
Loading…
Reference in New Issue
Block a user