diff --git a/public/assets/gameImages/buttons/info.png b/public/assets/gameImages/buttons/info.png new file mode 100644 index 00000000..a762a6c7 Binary files /dev/null and b/public/assets/gameImages/buttons/info.png differ diff --git a/public/assets/images/troubleshooting/01-01.png b/public/assets/images/troubleshooting/01-01.png new file mode 100644 index 00000000..d714bd93 Binary files /dev/null and b/public/assets/images/troubleshooting/01-01.png differ diff --git a/public/assets/images/troubleshooting/01-02.png b/public/assets/images/troubleshooting/01-02.png new file mode 100644 index 00000000..80a3a972 Binary files /dev/null and b/public/assets/images/troubleshooting/01-02.png differ diff --git a/public/assets/images/troubleshooting/01-03.png b/public/assets/images/troubleshooting/01-03.png new file mode 100644 index 00000000..8feaf04f Binary files /dev/null and b/public/assets/images/troubleshooting/01-03.png differ diff --git a/public/assets/images/troubleshooting/01-04.png b/public/assets/images/troubleshooting/01-04.png new file mode 100644 index 00000000..821b65ea Binary files /dev/null and b/public/assets/images/troubleshooting/01-04.png differ diff --git a/public/assets/images/troubleshooting/01-05.png b/public/assets/images/troubleshooting/01-05.png new file mode 100644 index 00000000..dfd5fd71 Binary files /dev/null and b/public/assets/images/troubleshooting/01-05.png differ diff --git a/public/assets/images/troubleshooting/alert.png b/public/assets/images/troubleshooting/alert.png new file mode 100644 index 00000000..4a71c6d3 Binary files /dev/null and b/public/assets/images/troubleshooting/alert.png differ diff --git a/public/assets/troubleshootingDB/troubleshooting.json b/public/assets/troubleshootingDB/troubleshooting.json new file mode 100644 index 00000000..03b90481 --- /dev/null +++ b/public/assets/troubleshootingDB/troubleshooting.json @@ -0,0 +1,74 @@ +{ + "issues": [ + { + "name": "Microphone is not working", + "body": [ + { + "type": "title", + "content": "Safari, Firefox, and Edge" + }, + { + "type": "text", + "content": "Oops! Our games don’t fully work on Safari, Firefox, or Edge just yet. For now, please switch to Google Chrome for the best experience." + }, + { + "type": "text", + "content": "We’re working on it—thanks for hanging in there!" + }, + { + "type": "title", + "content": "Chrome" + }, + { + "type": "text", + "content": "Chrome likes to pick your microphone for you (how thoughtful… right?). It doesn’t ask—just grabs the default one and runs with it. Want to change it? Here’s how:" + }, + { + "type": "text", + "content": "1. Go to Settings > Privacy and Security > Site Settings > Microphone" + }, + { + "type": "image", + "path": "/assets/images/troubleshooting/01-01.png", + "caption": "Go to site settings" + }, + { + "type": "image", + "path": "/assets/images/troubleshooting/01-02.png", + "caption": "Choose Privacy and security" + }, + { + "type": "image", + "path": "/assets/images/troubleshooting/01-03.png", + "caption": "Click Site settings" + }, + { + "type": "image", + "path": "/assets/images/troubleshooting/01-04.png", + "caption": "Select Microphone" + }, + { + "type": "text", + "content": "2. Pick the mic you actually want to use" + }, + { + "type": "image", + "path": "/assets/images/troubleshooting/01-05.png", + "caption": "Pick the mic you want to use" + }, + { + "type": "title", + "content": "Still need help?" + }, + { + "type": "text", + "content": "No worries — we’ve got your back! Our dev team is super responsive and loves squashing bugs like it’s their day job (because it is)." + }, + { + "type": "text", + "content": "Reach out to us at connect.audemy@gmail.com We’ll get things sorted in no time!" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/pages/Footer/GamePagesFooter.vue b/src/pages/Footer/GamePagesFooter.vue new file mode 100644 index 00000000..34d57e23 --- /dev/null +++ b/src/pages/Footer/GamePagesFooter.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/pages/GameZone/GameZone.vue b/src/pages/GameZone/GameZone.vue index 769b431a..c9d57635 100644 --- a/src/pages/GameZone/GameZone.vue +++ b/src/pages/GameZone/GameZone.vue @@ -3,6 +3,7 @@ import Header from "../../components/Header/Header.vue"; import GameZoneList from "../GameZone/GameZoneList/GameZoneList.vue"; import GameProgress from "../GameZone/GameProgress/GameProgress.vue"; import { ref, onMounted } from "vue"; + const currentPage = ref(1); const changeCurrentPage = (page) => { currentPage.value = page; @@ -21,49 +22,221 @@ onMounted(() => { sessionStorage.removeItem("gameCategory"); }); +// Reactive flags to track dropdown visibility for each game menu (for 'aria-expanded') +const isLangMenuOpen = ref(false); +const isMathMenuOpen = ref(false); + +// Updates Language menu visibility flag +const changeIsLangMenuOpen = (bool) => { + isLangMenuOpen.value = bool; +}; + +// Updates Math menu visibility flag +const changeIsMathMenuOpen = (bool) => { + isMathMenuOpen.value = bool; +}; + +function activateGameMenu(event) { + const menuBtn = event.currentTarget; + + // Conditionally activate and style menu button + const isMenuActive = menuBtn.style.getPropertyValue('color') === 'rgb(8, 123, 180)' ? true : false; + if (isMenuActive) { + // Deactivate and reset styling for menu + deactivateGameMenu(menuBtn); + + // Update reactive flag based on currentPage + if (currentPage.value === 1) { + changeIsLangMenuOpen(false); + } else { + changeIsMathMenuOpen(false); + } + + } else { + menuBtn.style.backgroundColor = '#e6f3fa'; + menuBtn.style.fontWeight = '600'; + menuBtn.style.color = '#087BB4'; + menuBtn.style.borderColor = '#087BB4'; + + // Style arrow (svg) + const svgArrow = menuBtn.querySelector('svg'); + svgArrow.style.fill = '#087BB4'; + + // Update reactive flag based on currentPage + if (currentPage.value === 1) { + changeIsLangMenuOpen(true); + } else { + changeIsMathMenuOpen(true); + } + } + // Toggle visibility of dropdown + toggleDropdown(); +} + +// Deactivates the game menu button by resetting its styles +function deactivateGameMenu(menuBtn) { + // Reset button + menuBtn.style.backgroundColor = '#FFFFFF'; + menuBtn.style.fontWeight = 'normal'; + menuBtn.style.color = '#6E777C'; + menuBtn.style.borderColor = '#6E777C'; + + // Reset arrow (svg) + const svgArrow = menuBtn.querySelector('svg'); + svgArrow.style.fill = '#6E777C'; + +} + +// Toggles visibility of the active dropdown menu (Language or Math) +function toggleDropdown() { + if (currentPage.value === 1) { + // Toggle Language dropdown visibility + const langDropdown = document.getElementById("lang-dropdown-div"); + langDropdown.classList.toggle('hidden'); + + // Update reactive flag for Language menu + const isLangVisible = !langDropdown.classList.contains('hidden'); + changeIsLangMenuOpen(isLangVisible); + + } else { + // Toggle Math dropdown visibility + const mathDropdown = document.getElementById("math-dropdown-div"); + mathDropdown.classList.toggle('hidden'); + + // Update reactive flag for Math menu + const isMathVisible = !mathDropdown.classList.contains('hidden'); + changeIsMathMenuOpen(isMathVisible); + } +} + +function handlePageSwitch(newPage) { + // Deactivate and reset styling for the opposite menu button + let oppositeMenuBtn = document.getElementById('lang-menu-btn'); + let oppositeDropdown = document.getElementById('lang-dropdown-div'); + + if (newPage === 1) { + // Opposite page = Math Games + oppositeMenuBtn = document.getElementById('math-menu-btn'); + oppositeDropdown = document.getElementById('math-dropdown-div'); + } + + deactivateGameMenu(oppositeMenuBtn); + + // Hide the opposite dropdown if it's currently visible + if (!oppositeDropdown.classList.contains('hidden')) { + oppositeDropdown.classList.add('hidden'); + } + + // Update the current page + changeCurrentPage(newPage); + + // Update reactive flags to reflect menu states for new page + if (newPage === 1) { + changeIsLangMenuOpen(true); + changeIsMathMenuOpen(false); + } else { + changeIsMathMenuOpen(true); + changeIsLangMenuOpen(false); + } +} + +function handleMenuBlur(event) { + // Determine the currently active dropdown + let currentDropdown = document.getElementById('math-dropdown-div'); + if (currentPage.value === 1) { + currentDropdown = document.getElementById('lang-dropdown-div'); + } + + // Keep menu open if focus moved into the dropdown options (e.g., tabbing through it) + if (currentDropdown.contains(event.relatedTarget)) { + return; + } + + const menuBtn = event.currentTarget; + hideMenuDropdown(menuBtn, currentDropdown); +} + +function handleDropdownFocusOut(event) { + const currentDropdown = event.currentTarget; + + // Keep dropdown open if focus is still within it (e.g., tabbing through it) + if (currentDropdown.contains(event.relatedTarget)) { + return; + } + + // Otherwise, close dropdown and deactivate the corresponding menu button + let menuBtn = document.getElementById('lang-menu-btn'); + if (currentPage.value === 2) { + menuBtn = document.getElementById('math-menu-btn'); + } + + hideMenuDropdown(menuBtn, currentDropdown); +} + +function hideMenuDropdown(menuBtn, currentDropdown) { + // Deactivates and reset styling for menu + deactivateGameMenu(menuBtn); + + // Hides opened dropdown + currentDropdown.classList.add('hidden'); + + // Update reactive flag + if (currentPage.value === 1) { + changeIsLangMenuOpen(false); + } else { + changeIsMathMenuOpen(false); + } +} + + + + + + + \ No newline at end of file diff --git a/src/pages/GameZone/GameZoneCard/GameZoneCard.vue b/src/pages/GameZone/GameZoneCard/GameZoneCard.vue index 692f609f..e8e8c900 100644 --- a/src/pages/GameZone/GameZoneCard/GameZoneCard.vue +++ b/src/pages/GameZone/GameZoneCard/GameZoneCard.vue @@ -18,6 +18,7 @@ const props = defineProps({ @click="$emit('selectGame', url)" class="w-full h-[320px] mobile:h-[160px] rounded-[16px] border-[5px] border-[#323232] shadow-2xl p-5 relative flex justify-center items-center" :style="{ backgroundColor: bgColor, color: textColor ?? '#323232' }" + style="z-index:0" > + + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/CarCounting.vue b/src/pages/GameZone/GameZoneList/CarCounting.vue index 86246114..e7e589c4 100644 --- a/src/pages/GameZone/GameZoneList/CarCounting.vue +++ b/src/pages/GameZone/GameZoneList/CarCounting.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/ColorGame.vue b/src/pages/GameZone/GameZoneList/ColorGame.vue index 9360de26..0e59953b 100644 --- a/src/pages/GameZone/GameZoneList/ColorGame.vue +++ b/src/pages/GameZone/GameZoneList/ColorGame.vue @@ -5,6 +5,12 @@
+ + +
{ numOfAudiosPlayed.value = 1; playNextQuestion(); }; + +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; diff --git a/src/pages/GameZone/GameZoneList/DefinitionDetective.vue b/src/pages/GameZone/GameZoneList/DefinitionDetective.vue index abc2be5d..0da81161 100644 --- a/src/pages/GameZone/GameZoneList/DefinitionDetective.vue +++ b/src/pages/GameZone/GameZoneList/DefinitionDetective.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8.Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/DivisionDuel.vue b/src/pages/GameZone/GameZoneList/DivisionDuel.vue index 0bd36c26..3cdefe82 100644 --- a/src/pages/GameZone/GameZoneList/DivisionDuel.vue +++ b/src/pages/GameZone/GameZoneList/DivisionDuel.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8.Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/FruitFrenzy.vue b/src/pages/GameZone/GameZoneList/FruitFrenzy.vue index d74bed21..c785a026 100644 --- a/src/pages/GameZone/GameZoneList/FruitFrenzy.vue +++ b/src/pages/GameZone/GameZoneList/FruitFrenzy.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/MonkeyMadness.vue b/src/pages/GameZone/GameZoneList/MonkeyMadness.vue index 5d6008fc..726d4b59 100644 --- a/src/pages/GameZone/GameZoneList/MonkeyMadness.vue +++ b/src/pages/GameZone/GameZoneList/MonkeyMadness.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/MultiplicationMadness.vue b/src/pages/GameZone/GameZoneList/MultiplicationMadness.vue index af61a2c3..c60d0e25 100644 --- a/src/pages/GameZone/GameZoneList/MultiplicationMadness.vue +++ b/src/pages/GameZone/GameZoneList/MultiplicationMadness.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/OddOneOut.vue b/src/pages/GameZone/GameZoneList/OddOneOut.vue index 47a3f214..33a909d3 100644 --- a/src/pages/GameZone/GameZoneList/OddOneOut.vue +++ b/src/pages/GameZone/GameZoneList/OddOneOut.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/PartOfSpeech.vue b/src/pages/GameZone/GameZoneList/PartOfSpeech.vue index 99bf044c..2adf0249 100644 --- a/src/pages/GameZone/GameZoneList/PartOfSpeech.vue +++ b/src/pages/GameZone/GameZoneList/PartOfSpeech.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/PolarPairing.vue b/src/pages/GameZone/GameZoneList/PolarPairing.vue index 8456b22f..d93d2365 100644 --- a/src/pages/GameZone/GameZoneList/PolarPairing.vue +++ b/src/pages/GameZone/GameZoneList/PolarPairing.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/ShapeShark.vue b/src/pages/GameZone/GameZoneList/ShapeShark.vue index 051126bc..d46e3f40 100644 --- a/src/pages/GameZone/GameZoneList/ShapeShark.vue +++ b/src/pages/GameZone/GameZoneList/ShapeShark.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/SpellingBee.vue b/src/pages/GameZone/GameZoneList/SpellingBee.vue index f322341d..475794a5 100644 --- a/src/pages/GameZone/GameZoneList/SpellingBee.vue +++ b/src/pages/GameZone/GameZoneList/SpellingBee.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/SubtractionGame.vue b/src/pages/GameZone/GameZoneList/SubtractionGame.vue index 389a55e1..5d4f7fda 100644 --- a/src/pages/GameZone/GameZoneList/SubtractionGame.vue +++ b/src/pages/GameZone/GameZoneList/SubtractionGame.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/SyllableSorting.vue b/src/pages/GameZone/GameZoneList/SyllableSorting.vue index 876d6d65..f26efbde 100644 --- a/src/pages/GameZone/GameZoneList/SyllableSorting.vue +++ b/src/pages/GameZone/GameZoneList/SyllableSorting.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/GameZone/GameZoneList/Vocab.vue b/src/pages/GameZone/GameZoneList/Vocab.vue index 9e683da5..b1b80b96 100644 --- a/src/pages/GameZone/GameZoneList/Vocab.vue +++ b/src/pages/GameZone/GameZoneList/Vocab.vue @@ -5,6 +5,12 @@
+ + +
{ playNextQuestion(); }; +/** + * Handles the something not working button click + */ + const handleSthNotWorkingButtonClick = () => { + console.log("Navigating to Troubleshooting Page..."); + // Stop all audio playback before navigating away + stopAudios(currentAudios); + // Force navigate to the game zone page + window.location.href = "/troubleshooting"; +}; + // 8. Exposed Values // (none exposed in this component) diff --git a/src/pages/Troubleshooting/Troubleshooting.vue b/src/pages/Troubleshooting/Troubleshooting.vue new file mode 100644 index 00000000..7d4af126 --- /dev/null +++ b/src/pages/Troubleshooting/Troubleshooting.vue @@ -0,0 +1,77 @@ + + + diff --git a/src/router/index.js b/src/router/index.js index fc29816d..d6d63bcd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import ResetConfirm from "../pages/ResetPassword/ResetConfirm.vue"; import ResetLandingPage from "../pages/ResetPassword/ResetLandingPage.vue"; import AboutUs from "../pages/AboutUs/AboutUs.vue"; import Impact from "../pages/Impact/Impact.vue"; +import Troubleshooting from "../pages/Troubleshooting/Troubleshooting.vue" // import SpellingBee from "../pages/GameZone/GameZoneList/SpellingBee/SpellingBee.vue"; const routes = [ @@ -30,6 +31,7 @@ const routes = [ { path: "/reset-confirm", name: "Reset Confirm", component: ResetConfirm }, { path: "/reset-landing-page", name: "Reset Landing Page", component: ResetLandingPage }, { path: "/:pathMatch(.*)*", name: "not-found", component: NotFound }, + { path: "/troubleshooting", name: "Troubleshooting Page", component: Troubleshooting }, { path: "/game/addition", name: "AdditionGame",