diff options
-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 | ||||
-rw-r--r-- | org-roam-ui.el | 13 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | web-build/register-service-worker.js | 15 | ||||
-rw-r--r-- | yarn.lock | 8 |
9 files changed, 71 insertions, 23 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); diff --git a/org-roam-ui.el b/org-roam-ui.el index 0911df4..2d4eb98 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -38,7 +38,6 @@ (insert response) (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*")))) - (defun nodes-row-to-cons (row) (list (cons 'id (elt row 0)) @@ -50,4 +49,16 @@ (cons 'source (elt row 1)) (cons 'target (elt row 2)))) +(defservlet* theme application/json () + (when 'doom-themes--colors + (let* + ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25))) + ui-theme (list nil)) + (progn + (dolist (color colors) + (push (cons (car color) (car (cdr color))) ui-theme)) + (insert (json-encode ui-theme)) + (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*"))))) + + (provide 'org-roam-ui) diff --git a/package.json b/package.json index 319e260..4440cfa 100644 --- a/package.json +++ b/package.json @@ -212,5 +212,8 @@ "space-before-function-paren": 0 } }, + "resolutions": { + "bezier-js": "4.0.3" + }, "main": "node_modules/expo/AppEntry.js" } diff --git a/web-build/register-service-worker.js b/web-build/register-service-worker.js index ea5cca4..94ece4f 100644 --- a/web-build/register-service-worker.js +++ b/web-build/register-service-worker.js @@ -1 +1,14 @@ -"serviceWorker"in navigator&&window.addEventListener("load",(function(){navigator.serviceWorker.register("/expo-service-worker.js",{scope:"/"}).then((function(e){})).catch((function(e){console.info("Failed to register service-worker",e)}))}));
\ No newline at end of file +/* eslint-env browser */ + +if ('serviceWorker' in navigator) { + window.addEventListener('load', function () { + navigator.serviceWorker + .register('/expo-service-worker.js', { scope: '/' }) + .then(function (info) { + // console.info('Registered service-worker', info); + }) + .catch(function (error) { + console.info('Failed to register service-worker', error); + }); + }); +} @@ -5400,10 +5400,10 @@ better-opn@^2.0.0: dependencies: open "^7.0.3" -"bezier-js@3 - 4": - version "4.1.1" - resolved "https://registry.yarnpkg.com/bezier-js/-/bezier-js-4.1.1.tgz#414df656833104e86765c0fa5e31439fb3e83a34" - integrity sha512-oVOS6SSFFFlfnZdzC+lsfvhs/RRcbxJ47U04M4s5QIBaJmr3YWmTIL3qmrOK9uW+nUUcl9Jccmo/xpTrG+bBoQ== +"bezier-js@3 - 4", [email protected]: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bezier-js/-/bezier-js-4.0.3.tgz#9e076d66f609bca9fc08dd22201596d52d3cc49d" + integrity sha512-w85AFcZ7EkszFgxuHYQ2/BI2G7H5bEotZD9vcg8+Hx4S8zF2odJBoFSFvGbcFDH5ScSxG27/IhW03SigVmkXNQ== big-integer@^1.6.44: version "1.6.48" |