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> <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 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> </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 { IPlayer } from "../../PersonObjects/IPlayer";
import { IRouter } from "../../ui/Router"; import { IRouter } from "../../ui/Router";
import { Factions } from "../Factions"; import { Factions } from "../Factions";
@ -20,7 +20,13 @@ interface IProps {
export function FactionsRoot(props: IProps): React.ReactElement { export function FactionsRoot(props: IProps): React.ReactElement {
const setRerender = useState(false)[1]; 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 { function openFaction(faction: Faction): void {
props.router.toFaction(faction); 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. // store the last known state in case we need to restart without nano.
useEffect(() => { useEffect(() => {
if (props.filename === "") return; if (props.filename === undefined) return;
console.log("setting to " + props.filename);
lastFilename = props.filename; lastFilename = props.filename;
lastCode = props.code; lastCode = props.code;
lastPosition = null; 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> <div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
</body> </body>
<script src="src/ThirdParty/raphael.min.js"></script>
</html> </html>

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