0.54 again

This commit is contained in:
Olivier Gagnon 2021-09-20 17:26:47 -04:00
parent bb4de3f62c
commit 5e48530e14
8 changed files with 4904 additions and 9 deletions

@ -49,4 +49,6 @@
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
<script type="text/javascript" src="dist/vendor.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>
<script src="src/ThirdParty/raphael.min.js"></script>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useState, useEffect } from "react";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { IRouter } from "../../ui/Router";
import { Factions } from "../Factions";
@ -20,7 +20,13 @@ interface IProps {
export function FactionsRoot(props: IProps): React.ReactElement {
const setRerender = useState(false)[1];
function rerender(): void {
setRerender((old) => !old);
}
useEffect(() => {
const id = setInterval(rerender, 1000);
return () => clearInterval(id);
}, []);
function openFaction(faction: Faction): void {
props.router.toFaction(faction);
}

@ -85,7 +85,8 @@ export function Root(props: IProps): React.ReactElement {
// store the last known state in case we need to restart without nano.
useEffect(() => {
if (props.filename === "") return;
if (props.filename === undefined) return;
console.log("setting to " + props.filename);
lastFilename = props.filename;
lastCode = props.code;
lastPosition = null;

4887
src/ThirdParty/raphael.min.js vendored Normal file

File diff suppressed because it is too large Load Diff

@ -49,4 +49,6 @@
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
</body>
<script src="src/ThirdParty/raphael.min.js"></script>
</html>

@ -138,9 +138,6 @@ export function WorkInProgressRoot(): React.ReactElement {
<button onClick={cancel} className="work-button">
{stopText}
</button>
<button onClick={unfocus} className="work-button">
Do something else simultaneously
</button>
</div>
);
}