first commit

This commit is contained in:
2024-02-16 22:52:53 +01:00
commit 826c4c0186
13 changed files with 17300 additions and 0 deletions

35
.gitignore vendored Normal file
View File

@@ -0,0 +1,35 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.DS_Store
*.pem
# local env files
.env*.local
# typescript
*.tsbuildinfo

38
App.js Normal file
View File

@@ -0,0 +1,38 @@
import React from 'react';
import { TouchableWithoutFeedback, View, Text, Alert } from 'react-native';
const MyButton = () => {
const handleLongPress = () => {
// Obsługa przytrzymania guzika
Alert.alert('Button Long Pressed', 'You long pressed the button');
};
const handlePress = () => {
// Obsługa zwykłego kliknięcia guzika
fetch('https://wol.turtel.xyz/wolweb/wake/pajonk')
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
console.log(data);
Alert.alert('Response', JSON.stringify(data));
})
.catch(error => {
console.error('There was a problem with the fetch operation:', error);
Alert.alert('Error', 'There was a problem with the request');
});
};
return (
<TouchableWithoutFeedback onPress={handlePress} onLongPress={handleLongPress}>
<View style={{ padding: 10, backgroundColor: 'blue', borderRadius: 5 }}>
<Text style={{ color: 'white' }}>Send Request</Text>
</View>
</TouchableWithoutFeedback>
);
};
export default MyButton;

36
app.json Normal file
View File

@@ -0,0 +1,36 @@
{
"expo": {
"name": "my-app",
"slug": "my-app",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.wol.on"
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "ca66277f-52f0-4c26-a4e9-c34fe5ff64ea"
}
}
}
}

BIN
assets/adaptive-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
assets/splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

6
babel.config.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};

0
components/button.tsx Normal file
View File

21
eas.json Normal file
View File

@@ -0,0 +1,21 @@
{
"build": {
"preview": {
"android": {
"buildType": "apk"
}
},
"preview2": {
"android": {
"gradleCommand": ":app:assembleRelease"
}
},
"preview3": {
"developmentClient": true
},
"preview4": {
"distribution": "internal"
},
"production": {}
}
}

17134
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

26
package.json Normal file
View File

@@ -0,0 +1,26 @@
{
"name": "my-app",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~50.0.3",
"expo-status-bar": "~1.11.1",
"react": "18.2.0",
"react-native": "0.73.2",
"typescript": "^5.3.0",
"@types/react": "~18.2.45",
"react-dom": "18.2.0",
"react-native-web": "~0.19.6",
"@expo/webpack-config": "~19.0.1"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}

4
tsconfig.json Normal file
View File

@@ -0,0 +1,4 @@
{
"compilerOptions": {},
"extends": "expo/tsconfig.base"
}