refactor: add react frontend

This commit is contained in:
2024-09-19 21:19:11 +02:00
parent fd17e4fe6b
commit 7ee3ead05b
46 changed files with 7119 additions and 0 deletions

View File

@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(5457)}])},5457:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(9920);let i=n(7437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,23,744],function(){return e(e.s=7589)}),_N_E=e.O()}]);

View File

@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{5825:function(e,a,_){Promise.resolve().then(_.t.bind(_,7800,23)),Promise.resolve().then(_.t.bind(_,2544,23)),Promise.resolve().then(_.t.bind(_,3054,23))},3054:function(){},2544:function(e){e.exports={style:{fontFamily:"'__geistMono_c3aa02', '__geistMono_Fallback_c3aa02'"},className:"__className_c3aa02",variable:"__variable_c3aa02"}},7800:function(e){e.exports={style:{fontFamily:"'__geistSans_1e4310', '__geistSans_Fallback_1e4310'"},className:"__className_1e4310",variable:"__variable_1e4310"}}},function(e){e.O(0,[571,971,23,744],function(){return e(e.s=5825)}),_N_E=e.O()}]);

View File

@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{1603:function(e,t,r){Promise.resolve().then(r.t.bind(r,8173,23)),Promise.resolve().then(r.t.bind(r,9671,23)),Promise.resolve().then(r.bind(r,436))},436:function(e,t,r){"use strict";r.d(t,{SimCurrentGear:function(){return c}});var a=r(7437),s=r(2265),n=r(9671),o=r.n(n);function c(){let[e,t]=(0,s.useState)(!1),[r,n]=(0,s.useState)("");async function c(e){try{let r=await fetch("http://127.0.0.1:8000/sim/current_gear",{method:"POST",headers:{"Access-Control-Allow-Origin":"*"},body:e});if(r.ok)t(!0),n(await r.text());else throw Error("Error! status: ".concat(r.status))}catch(e){e instanceof Error?console.log(e.message):console.log("Unexpected error",e)}}return(0,a.jsxs)("div",{children:[(0,a.jsx)("iframe",{id:"renderframe",style:{display:"".concat(e?"block":"none"),width:"100%",height:"100vh",marginBottom:"50px"},srcDoc:"".concat(r)}),(0,a.jsxs)("form",{action:c,children:[(0,a.jsx)("div",{className:o().ctas,children:(0,a.jsx)("textarea",{className:o().textarea,rows:10,id:"simcprofile",name:"simcprofile",style:{display:"".concat(e?"none":"block")}})}),(0,a.jsxs)("div",{className:o().ctas,children:[(0,a.jsx)("button",{className:o().primary,type:"submit",children:"Run Sim"}),(0,a.jsx)("a",{href:"https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app",target:"_blank",rel:"noopener noreferrer",className:o().secondary,children:"Read our docs"})]})]})]})}},9671:function(e){e.exports={page:"page_page__ZU32B",main:"page_main__GlU4n",ctas:"page_ctas__g5wGe",textarea:"page_textarea__8C2wx",primary:"page_primary__V8M9Y",secondary:"page_secondary__lm_PT",footer:"page_footer__sHKi3",logo:"page_logo__7fc9l"}}},function(e){e.O(0,[967,173,971,23,744],function(){return e(e.s=1603)}),_N_E=e.O()}]);