From 9880633411d9fff23234b93c3771efc3b4581463 Mon Sep 17 00:00:00 2001 From: Kanata844 Date: Sat, 22 Nov 2025 22:07:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?hackshooter=E3=81=AF=E7=8F=BE=E5=9C=B0?= =?UTF-8?q?=E3=81=A7=E3=81=AA=E3=81=91=E3=82=8C=E3=81=B0github=E3=81=AE?= =?UTF-8?q?=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9=E3=81=AB=E9=A3=9B=E3=81=B0?= =?UTF-8?q?=E3=81=99=E3=82=88=E3=81=86=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/exhibitions.ts | 3 ++- src/pages/index.tsx | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) 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..9292bed 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -68,7 +68,12 @@ export default function Home(): JSX.Element { onClick={async () => { console.log(`clicked ${ex.title}`); const url = ex.url; - if (url) { + if (is_offline && ex.dialog) { + const dialog = ex.dialog; + if (dialog) { + alert(dialog); + } + } else if (url) { window.open(url, "_blank").focus(); // CORS の関係でエラーが出るが、特に問題ないので放置。 try { @@ -81,11 +86,6 @@ export default function Home(): JSX.Element { }), }); } catch (err) {} - } else { - const dialog = ex.dialog; - if (dialog) { - alert(dialog); - } } }} rel="noreferrer" From 8384af32144f3efb13f42b6f347345afb4476537 Mon Sep 17 00:00:00 2001 From: "ski.com" <100414605+ski-dot-com@users.noreply.github.com> Date: Sat, 22 Nov 2025 22:22:16 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[refactor]=20=E6=9B=B8=E3=81=8D=E6=96=B9?= =?UTF-8?q?=E3=82=92=E3=81=A1=E3=82=87=E3=81=A3=E3=81=A8=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 9292bed..f298b84 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -68,11 +68,9 @@ export default function Home(): JSX.Element { onClick={async () => { console.log(`clicked ${ex.title}`); const url = ex.url; - if (is_offline && ex.dialog) { - const dialog = ex.dialog; - if (dialog) { - alert(dialog); - } + const dialog = ex.dialog; + if (is_offline && dialog) { + alert(dialog); } else if (url) { window.open(url, "_blank").focus(); // CORS の関係でエラーが出るが、特に問題ないので放置。