Skip to content

Commit 9880633

Browse files
committed
hackshooterは現地でなければgithubのリリースに飛ばすよう変更
1 parent fcc28a8 commit 9880633

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/exhibitions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const exhibitions: Exhibition[] = [
9696
},
9797
{
9898
// disabled: true,
99-
offline_only: true,
99+
offline_only: false,
100100
title: "Hack-shooter",
101101
image: {
102102
src: "img/Hackshooter_theme.png",
@@ -105,6 +105,7 @@ export const exhibitions: Exhibition[] = [
105105
description: `
106106
シューティングゲームの裏側をプログラミングすることによって、より簡単に、よりスマートにゲームを攻略しよう!
107107
`,
108+
url: "https://github.com/ut-code/HackShooter/releases/tag/v1.2",
108109
dialog: "タスクバーにあるペンギンのアイコンをクリックしてください。",
109110
isNew: true,
110111
target: "小学生以上におすすめ",

src/pages/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ export default function Home(): JSX.Element {
6868
onClick={async () => {
6969
console.log(`clicked ${ex.title}`);
7070
const url = ex.url;
71-
if (url) {
71+
if (is_offline && ex.dialog) {
72+
const dialog = ex.dialog;
73+
if (dialog) {
74+
alert(dialog);
75+
}
76+
} else if (url) {
7277
window.open(url, "_blank").focus();
7378
// CORS の関係でエラーが出るが、特に問題ないので放置。
7479
try {
@@ -81,11 +86,6 @@ export default function Home(): JSX.Element {
8186
}),
8287
});
8388
} catch (err) {}
84-
} else {
85-
const dialog = ex.dialog;
86-
if (dialog) {
87-
alert(dialog);
88-
}
8989
}
9090
}}
9191
rel="noreferrer"

0 commit comments

Comments
 (0)