diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/components/graph/graph.tsx | 2 | ||||
-rw-r--r-- | app/components/wallpaper/bg.png | bin | 11602 -> 0 bytes | |||
-rw-r--r-- | app/components/wallpaper/[email protected] | bin | 35635 -> 0 bytes | |||
-rw-r--r-- | app/components/wallpaper/wallpaper.tsx | 6 | ||||
-rw-r--r-- | app/screens/graph/graph-screen.tsx | 47 |
5 files changed, 38 insertions, 17 deletions
diff --git a/app/components/graph/graph.tsx b/app/components/graph/graph.tsx index 9538274..5e68c3f 100644 --- a/app/components/graph/graph.tsx +++ b/app/components/graph/graph.tsx @@ -8,7 +8,7 @@ import { flatten } from "ramda" //import data from "../../data/miserables.json" //import genRandomTree from "../../data/randomdata"; -import rando from "../../data/rando.json" +//import gData from "../../data/rando.json" import { ForceGraph2D, ForceGraph3D, ForceGraphVR, ForceGraphAR } from "react-force-graph" import * as d3 from "d3-force-3d" diff --git a/app/components/wallpaper/bg.png b/app/components/wallpaper/bg.png Binary files differdeleted file mode 100644 index 45b63f3..0000000 --- a/app/components/wallpaper/bg.png +++ /dev/null diff --git a/app/components/wallpaper/[email protected] b/app/components/wallpaper/[email protected] Binary files differdeleted file mode 100644 index 828e94f..0000000 --- a/app/components/wallpaper/[email protected] +++ /dev/null diff --git a/app/components/wallpaper/wallpaper.tsx b/app/components/wallpaper/wallpaper.tsx index ebba75a..7aaad37 100644 --- a/app/components/wallpaper/wallpaper.tsx +++ b/app/components/wallpaper/wallpaper.tsx @@ -3,7 +3,7 @@ import { AutoImage as Image } from "../auto-image/auto-image" import { presets } from "./wallpaper.presets" import { WallpaperProps } from "./wallpaper.props" -const defaultImage = require("./bg.png") +//const defaultImage = require("./bg.png") /** * For your text displaying needs. @@ -19,7 +19,7 @@ export function Wallpaper(props: WallpaperProps) { const styles = [presetToUse, styleOverride] // figure out which image to use - const source = backgroundImage || defaultImage + //const source = backgroundImage || defaultImage - return <Image source={source} style={styles} /> + return null//<Image source={source} style={styles} /> } diff --git a/app/screens/graph/graph-screen.tsx b/app/screens/graph/graph-screen.tsx index cee0bf7..a97fe68 100644 --- a/app/screens/graph/graph-screen.tsx +++ b/app/screens/graph/graph-screen.tsx @@ -17,6 +17,7 @@ import axios from "axios" import rando from "../../data/rando.json" + const ROOT: ViewStyle = { backgroundColor: color.palette.black, flex: 1, @@ -136,25 +137,45 @@ export const GraphScreen = observer(function GraphScreen() { return data; } - const getNodesById = (data) => { - let temp = [] - data.nodes.forEach((node, i) => { - temp.push(node.id) - node.index = i - }) - setNodeIds(temp) - return temp - } +const [theme, setTheme] = useState({ +base1: "#1c1f24", +base2: "#21272d", +base3: "#23272e", +base4: "#484854", +base5: "#62686E", +base6: "#757B80", +base7: "#9ca0a4", +base8: "#DFDFDF", +bg: "#242730", +"bg-alt": "#2a2e38", +blue: "#51afef", +cyan: "#5cEfFF", +"dark-blue": "#1f5582", +"dark-cyan": "#6A8FBF", +fg: "#bbc2cf", +"fg-alt": "#5D656B", +green: "#7bc275", +grey: "#484854", +magenta: "#C57BDB", +orange: "#e69055", +red: "#ff665c", +teal: "#4db5bd", +violet: "#a991f1", +yellow: "#FCCE7B", + }); useEffect(() => { getData().then((data) => setPhysics(data)) + axios.get("http://localhost:35901/theme") + .then((theme)=>{setTheme(theme.data); + console.log(theme.data)}) + .catch((e) => { + console.log("No theme found") + }) axios .get("http://localhost:35901/graph") .then((dataa) => { - let nods = getNodesById(dataa.data) - setNodeIds(nods) - console.log(nodeIds) let cleanData = sanitizeGraph(dataa.data) console.log(cleanData) setGraphData(cleanData) @@ -164,7 +185,7 @@ export const GraphScreen = observer(function GraphScreen() { console.log("Couldn't get data.") //setGraphData(rando); }) - }, []) + }, []); const [threeDim, setThreeDim] = useState(false); const [local, setLocal] = useState(false); |