mirror of
https://github.com/SirBlobby/Hoya26.git
synced 2026-02-04 03:34:34 -05:00
new sounds
This commit is contained in:
@@ -43,6 +43,12 @@
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function playSuccessSound() {
|
||||||
|
const audio = new Audio("/report completed.mp3");
|
||||||
|
audio.volume = 0.5;
|
||||||
|
audio.play().catch((e) => console.error("Error playing sound:", e));
|
||||||
|
}
|
||||||
|
|
||||||
function handleFileUpload(event: Event) {
|
function handleFileUpload(event: Event) {
|
||||||
const input = event.target as HTMLInputElement;
|
const input = event.target as HTMLInputElement;
|
||||||
const file = input.files?.[0];
|
const file = input.files?.[0];
|
||||||
@@ -67,6 +73,7 @@
|
|||||||
analyzing = false;
|
analyzing = false;
|
||||||
showResult = true;
|
showResult = true;
|
||||||
resultTranslateY = 0;
|
resultTranslateY = 0;
|
||||||
|
playSuccessSound();
|
||||||
typeText();
|
typeText();
|
||||||
}, 1200);
|
}, 1200);
|
||||||
};
|
};
|
||||||
@@ -99,6 +106,7 @@
|
|||||||
analyzing = false;
|
analyzing = false;
|
||||||
showResult = true;
|
showResult = true;
|
||||||
resultTranslateY = 0;
|
resultTranslateY = 0;
|
||||||
|
playSuccessSound();
|
||||||
typeText();
|
typeText();
|
||||||
}, 1200);
|
}, 1200);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,14 @@
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function playClickSound() {
|
||||||
|
const audio = new Audio("/clickpagesound.mp3");
|
||||||
|
audio.volume = 0.4;
|
||||||
|
audio.play().catch((e) => console.error("Error playing sound:", e));
|
||||||
|
}
|
||||||
|
|
||||||
function navigateToTab(route: string) {
|
function navigateToTab(route: string) {
|
||||||
|
playClickSound();
|
||||||
goto(route);
|
goto(route);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,12 @@
|
|||||||
recentItems = [item, ...recentItems];
|
recentItems = [item, ...recentItems];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function playClickSound() {
|
||||||
|
const audio = new Audio("/clickpagesound.mp3");
|
||||||
|
audio.volume = 0.4;
|
||||||
|
audio.play().catch((e) => console.error("Error playing sound:", e));
|
||||||
|
}
|
||||||
|
|
||||||
const navLinks = [
|
const navLinks = [
|
||||||
{ name: "Home", route: "/", icon: "ri:home-4-line" },
|
{ name: "Home", route: "/", icon: "ri:home-4-line" },
|
||||||
{ name: "Goal", route: "/goal", icon: "ri:flag-2-line" },
|
{ name: "Goal", route: "/goal", icon: "ri:flag-2-line" },
|
||||||
@@ -114,12 +120,17 @@
|
|||||||
href={link.route}
|
href={link.route}
|
||||||
class="nav-link"
|
class="nav-link"
|
||||||
class:active={$page.route.id === link.route}
|
class:active={$page.route.id === link.route}
|
||||||
|
onclick={playClickSound}
|
||||||
>
|
>
|
||||||
<Icon icon={link.icon} width="20" />
|
<Icon icon={link.icon} width="20" />
|
||||||
<span>{link.name}</span>
|
<span>{link.name}</span>
|
||||||
</a>
|
</a>
|
||||||
{/each}
|
{/each}
|
||||||
<a href="/catalogue" class="catalogue-button">
|
<a
|
||||||
|
href="/catalogue"
|
||||||
|
class="catalogue-button"
|
||||||
|
onclick={playClickSound}
|
||||||
|
>
|
||||||
<Icon icon="ri:search-line" width="20" />
|
<Icon icon="ri:search-line" width="20" />
|
||||||
<span>Browse Catalogue</span>
|
<span>Browse Catalogue</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
BIN
frontend/static/clickpagesound.mp3
Normal file
BIN
frontend/static/clickpagesound.mp3
Normal file
Binary file not shown.
BIN
frontend/static/report completed.mp3
Normal file
BIN
frontend/static/report completed.mp3
Normal file
Binary file not shown.
Reference in New Issue
Block a user