-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from esc-chula/neen/mute-button
Mute Button
- Loading branch information
Showing
55 changed files
with
556 additions
and
47 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { useEffect, useState } from "react"; | ||
|
||
import { settings } from "@/stores/settingsStores"; | ||
|
||
import MuteImage from "@/assets/ui/muteIcon.png"; | ||
import UnmuteImage from "@/assets/ui/unmuteIcon.png"; | ||
|
||
const MuteButton = () => { | ||
const [mute, setMute] = useState<string>("false"); | ||
|
||
useEffect(() => { | ||
setMute(settings.get().mute); | ||
}, []); | ||
|
||
const handleClick = () => { | ||
settings.setKey("mute", settings.get().mute === "true" ? "false" : "true"); | ||
setMute(settings.get().mute); | ||
}; | ||
|
||
return ( | ||
<div | ||
onClick={handleClick} | ||
className="absolute right-5 top-5 z-[999] cursor-pointer select-none" | ||
> | ||
{mute === "true" ? ( | ||
<img className="h-10 w-10" src={UnmuteImage.src} alt="unmute" /> | ||
) : ( | ||
<img className="h-10 w-10" src={MuteImage.src} alt="mute" /> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default MuteButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
--- | ||
import ImagePageLayout from "@/layouts/ImagePageLayout.astro"; | ||
import Tap from "@/components/Tap"; | ||
import BackgroundImage from "@/assets/story/scene-0/07.webp"; | ||
--- | ||
|
||
<ImagePageLayout backgroundColor="bg-[#303030]" image={BackgroundImage}> | ||
<a | ||
href="/story/0-03" | ||
class="absolute bottom-1/4 right-8 z-50 rounded-full bg-yellow-100 bg-opacity-70 p-12 text-black hover:cursor-pointer" | ||
>Tap</a | ||
> | ||
<Tap delay={0.5} redirectUrl="/story/0-03" client:load /> | ||
</ImagePageLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
import ImagePageLayout from "@/layouts/ImagePageLayout.astro"; | ||
import Tap from "@/components/Tap"; | ||
import BackgroundImage from "@/assets/story/scene-3/01.webp"; | ||
--- | ||
|
||
<ImagePageLayout backgroundColor="bg-[#303030]" image={BackgroundImage}> | ||
<div class="absolute top-20 flex w-full justify-center"> | ||
<div class="h-fit w-80 select-none rounded-xl border-4 bg-white border-white"> | ||
<div class="mb-2.5 ml-2.5 mt-2.5 break-words text-center font-semibold text-sm"> | ||
<p>"ศูนย์ปฏิบัติการแห่งอนาคต"</p> | ||
</div> | ||
</div> | ||
</div> | ||
<Tap delay={0.5} redirectUrl="/story/3-02" client:load /> | ||
</ImagePageLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
import ImagePageLayout from "@/layouts/ImagePageLayout.astro"; | ||
import Tap from "@/components/Tap"; | ||
import TextBubble from "@/components/TextBubble"; | ||
import BackgroundImage from "@/assets/story/scene-3/02.webp"; | ||
--- | ||
|
||
<ImagePageLayout backgroundColor="bg-[#303030]" image={BackgroundImage}> | ||
<div class="absolute top-20 flex w-full justify-center"> | ||
<TextBubble | ||
name="ชาไทย" | ||
text={"นั่น ลองเข้าไปขอความช่วยเหลือเรื่องสัญญาณจาก “Engine” ผู้ดูแลศูนย์ปฏิบัติการแห่งนี้ กันดีกว่า"} | ||
className="bg-chathai" | ||
/> | ||
</div> | ||
<Tap delay={0.5} redirectUrl="/story/3-03" client:load /> | ||
</ImagePageLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
import ImagePageLayout from "@/layouts/ImagePageLayout.astro"; | ||
import Tap from "@/components/Tap"; | ||
import TextBubble from "@/components/TextBubble"; | ||
import BackgroundImage from "@/assets/story/scene-3/03.webp"; | ||
--- | ||
|
||
<ImagePageLayout backgroundColor="bg-[#303030]" image={BackgroundImage}> | ||
<div class="absolute top-20 flex w-full justify-center"> | ||
<TextBubble | ||
name="%USERNAME%" | ||
text={"ช่วยด้วย เกิดปัญหาใหญ่ขึ้นแล้ว!"} | ||
className="bg-user" | ||
/> | ||
</div> | ||
<Tap delay={0.5} redirectUrl="/story/3-04" client:load /> | ||
</ImagePageLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
import ImagePageLayout from "@/layouts/ImagePageLayout.astro"; | ||
import Tap from "@/components/Tap"; | ||
import BackgroundImage from "@/assets/story/scene-3/04.webp"; | ||
--- | ||
|
||
<ImagePageLayout backgroundColor="bg-[#303030]" image={BackgroundImage}> | ||
<Tap delay={0.5} redirectUrl="/story/3-05" client:load /> | ||
</ImagePageLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
import ImagePageLayout from "@/layouts/ImagePageLayout.astro"; | ||
import Tap from "@/components/Tap"; | ||
import TextBubble from "@/components/TextBubble"; | ||
import BackgroundImage from "@/assets/story/scene-3/05.webp"; | ||
--- | ||
|
||
<ImagePageLayout backgroundColor="bg-[#303030]" image={BackgroundImage}> | ||
<div class="absolute top-20 flex w-full justify-center"> | ||
<TextBubble | ||
name="%USERNAME%" | ||
text={"ตอนนี้ที่โรงงานสัญญาณขาดหายไป เธอสามารถแก้ไขได้ไหม"} | ||
className="bg-user" | ||
client:only | ||
/> | ||
</div> | ||
<Tap delay={0.5} redirectUrl="/story/3-06" client:load /> | ||
</ImagePageLayout> |
Oops, something went wrong.