diff --git a/src/exhibitions.ts b/src/exhibitions.ts index 439b7e3..02f89c2 100644 --- a/src/exhibitions.ts +++ b/src/exhibitions.ts @@ -96,7 +96,7 @@ export const exhibitions: Exhibition[] = [ }, { // disabled: true, - offline_only: true, + offline_only: false, title: "Hack-shooter", image: { src: "img/Hackshooter_theme.png", @@ -105,6 +105,7 @@ export const exhibitions: Exhibition[] = [ description: ` シューティングゲームの裏側をプログラミングすることによって、より簡単に、よりスマートにゲームを攻略しよう! `, + url: "https://github.com/ut-code/HackShooter/releases/tag/v1.2", dialog: "タスクバーにあるペンギンのアイコンをクリックしてください。", isNew: true, target: "小学生以上におすすめ", diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 7ffd230..f298b84 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -68,7 +68,10 @@ export default function Home(): JSX.Element { onClick={async () => { console.log(`clicked ${ex.title}`); const url = ex.url; - if (url) { + const dialog = ex.dialog; + if (is_offline && dialog) { + alert(dialog); + } else if (url) { window.open(url, "_blank").focus(); // CORS の関係でエラーが出るが、特に問題ないので放置。 try { @@ -81,11 +84,6 @@ export default function Home(): JSX.Element { }), }); } catch (err) {} - } else { - const dialog = ex.dialog; - if (dialog) { - alert(dialog); - } } }} rel="noreferrer"