Skip to content

Commit

Permalink
feat(web): added version: 20240722-75b4e82
Browse files Browse the repository at this point in the history
  • Loading branch information
atty303 committed Jul 21, 2024
1 parent 78282d1 commit 2704e82
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/packer/src/pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { default as shelljs } from "shelljs";
shelljs.config.verbose = true;

const tag = process.argv[2];
if (!tag || !tag.startsWith("v")) {
if (!tag) {
console.error("Invalid tag");
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/packer/src/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "dotenv/config";
shelljs.config.verbose = true;

const tag = process.argv[2];
if (!tag || !tag.startsWith("v")) {
if (!tag) {
console.error("Invalid tag");
process.exit(1);
}
Expand Down
27 changes: 15 additions & 12 deletions packages/web/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useState } from "react";
import { useMedia } from "react-use";
import Footer from "./Footer.tsx";
import Header from "./Header.tsx";
import PobWindow from "./PobWindow.tsx";
import {useMedia} from "react-use";

export default function App() {
const [frameTime, setFrameTime] = useState(0);
Expand All @@ -13,25 +13,28 @@ export default function App() {
}
};

const [version, setVersion] = useState("2.42.0");
const [version, setVersion] = useState("v2.42.0");
const [title, setTitle] = useState("");

const is2XL = useMedia("(min-width: 1536px)");

if (is2XL) {
return (<div className="hidden 2xl:grid grid-cols-1 grid-rows-[auto_1fr] min-h-screen">
<Header version={version} onVersionChange={setVersion} title={title}/>
return (
<div className="hidden 2xl:grid grid-cols-1 grid-rows-[auto_1fr] min-h-screen">
<Header version={version} onVersionChange={setVersion} title={title} />

<div className="border-y border-neutral-content">
<PobWindow onFrame={handleFrame} version={version} onTitleChange={setTitle}/>
</div>

<Footer frameTime={frameTime}/>
<div className="border-y border-neutral-content">
<PobWindow onFrame={handleFrame} version={version} onTitleChange={setTitle} />
</div>

<Footer frameTime={frameTime} />
</div>
);
} else {
return (<div className="grid min-h-screen 2xl:hidden">
<PobWindow onFrame={handleFrame} version={version} onTitleChange={setTitle}/>
</div>);
return (
<div className="grid min-h-screen 2xl:hidden">
<PobWindow onFrame={handleFrame} version={version} onTitleChange={setTitle} />
</div>
);
}
}
5 changes: 3 additions & 2 deletions packages/web/src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ function SettingDialog(props: {
value={props.version}
onChange={(e) => props.onVersionChange(e.target.value)}
>
<option value="2.42.0">2.42.0</option>
<option value="2.41.1">2.41.1</option>
<option value="20240722-75b4e82">20240722-75b4e82</option>
<option value="v2.42.0">2.42.0</option>
<option value="v2.41.1">2.41.1</option>
</select>
</label>
</DialogPanel>
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/PobWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function PobWindow(props: {
useEffect(() => {
log.debug(tag.pob, "loading version", props.version);

const _driver = new Driver("release", `${__ASSET_PREFIX__}/v${props.version}`, {
const _driver = new Driver("release", `${__ASSET_PREFIX__}/${props.version}`, {
onError: (message) => {
throw new Error(message);
},
Expand Down

0 comments on commit 2704e82

Please sign in to comment.