Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/exhibitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -105,6 +105,7 @@ export const exhibitions: Exhibition[] = [
description: `
シューティングゲームの裏側をプログラミングすることによって、より簡単に、よりスマートにゲームを攻略しよう!
`,
url: "https://github.com/ut-code/HackShooter/releases/tag/v1.2",
dialog: "タスクバーにあるペンギンのアイコンをクリックしてください。",
isNew: true,
target: "小学生以上におすすめ",
Expand Down
10 changes: 4 additions & 6 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -81,11 +84,6 @@ export default function Home(): JSX.Element {
}),
});
} catch (err) {}
} else {
const dialog = ex.dialog;
if (dialog) {
alert(dialog);
}
}
}}
rel="noreferrer"
Expand Down