Mostly working except yaml codeblocks

This commit is contained in:
Zef Hemel
2022-06-13 18:31:36 +02:00
parent 24ac6bbd25
commit c25a53357d
36 changed files with 4893 additions and 43235 deletions
-4
View File
@@ -1,4 +0,0 @@
{
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
}
-14
View File
@@ -1,14 +0,0 @@
node_modules/
.expo/
dist/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
# macOS
.DS_Store
-47
View File
@@ -1,47 +0,0 @@
import { StatusBar } from "expo-status-bar";
import React from "react";
import { SafeAreaView, StyleSheet, Text } from "react-native";
import { WebView } from "react-native-webview";
function safeRun(fn: () => Promise<void>) {
return fn().catch((e) => {
console.error(e);
});
}
export default function App() {
const html = require("./bundle.json");
let ref = React.useRef<WebView>(null);
return (
<SafeAreaView style={styles.container}>
<Text
style={{
color: "#fff",
backgroundColor: "#333",
height: 40,
}}
onPress={() => {
ref.current?.injectJavaScript('receiveMessage("Sup");');
}}
>
This is a header
</Text>
<WebView
style={styles.container}
ref={ref}
originWhitelist={["*"]}
source={{ html: html.html }}
onMessage={(event) => {
console.log("Got event", event.nativeEvent.data);
}}
/>
<StatusBar style="auto" />
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
-32
View File
@@ -1,32 +0,0 @@
{
"expo": {
"name": "mobile",
"slug": "mobile",
"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
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

-6
View File
@@ -1,6 +0,0 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
-6
View File
@@ -1,6 +0,0 @@
import json
html = open("dist/index.html", "r").read()
f = open("bundle.json", "w")
f.write(json.dumps({"html": html}))
f.close()
File diff suppressed because one or more lines are too long
-45
View File
@@ -1,45 +0,0 @@
// declare namespace window {
// var ReactNativeWebView: any;
// var receiveMessage: any;
// }
//
// function safeRun(fn: () => Promise<void>) {
// fn().catch((e) => {
// console.error(e);
// });
// }
//
// window.receiveMessage = (msg: string) => {
// console.log("Received message", msg);
// };
// // @ts-ignore
// window.onerror = (msg, source, lineno, colno, error) => {
// console.error("Error", msg, source, lineno, error);
// };
//
// console.log = (...args) => {
// window.ReactNativeWebView.postMessage(
// JSON.stringify({ type: "console.log", args: args })
// );
// };
//
// console.error = (...args) => {
// window.ReactNativeWebView.postMessage(
// JSON.stringify({ type: "console.error", args: args })
// );
// };
try {
// let editor = new Editor(
// new Space(`http://192.168.2.22:3000/fs`, null),
// document.getElementById("root")!
// );
// console.log("Initing editor");
// safeRun(async () => {
// await editor.loadPageList();
// await editor.loadPlugs();
// editor.focus();
// console.log("Inited", editor.viewState);
// });
} catch (e: any) {
console.error("Got an error", e.message);
}
-19
View File
@@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Page</title>
<style>
@import "../../webapp/src/styles/main.scss";
</style>
<script type="module" src="server.ts"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
</head>
<body>
<div id="root"></div>
<script type="module">
import "./server";
</script>
</body>
</html>
-31
View File
@@ -1,31 +0,0 @@
{
"name": "mobile",
"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",
"eject": "expo eject"
},
"dependencies": {
"expo": "~44.0.0",
"expo-status-bar": "~1.2.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-fs": "^2.19.0",
"react-native-web": "0.17.1",
"react-native-webview": "11.15.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@parcel/transformer-sass": "2.3.2",
"@types/react": "~17.0.21",
"@types/react-native": "~0.64.12",
"parcel": "^2.3.2",
"typescript": "~4.3.5"
},
"private": true
}
-6
View File
@@ -1,6 +0,0 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true
}
}
-6892
View File
File diff suppressed because it is too large Load Diff