generated from nhcarrigan/template
a8f98406e1
### Explanation _No response_ ### Issue _No response_ ### Attestations - [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/). ### Dependencies - [ ] I have pinned the dependencies to a specific patch version. ### Style - [ ] I have run the linter and resolved any errors. - [ ] My pull request uses an appropriate title, matching the conventional commit standards. - [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request. ### Tests - [ ] My contribution adds new code, and I have added tests to cover it. - [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes. - [ ] All new and existing tests pass locally with my changes. - [ ] Code coverage remains at or above the configured threshold. ### Documentation _No response_ ### Versioning _No response_ Reviewed-on: #44 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
94 lines
2.7 KiB
HTML
94 lines
2.7 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>Notification Sound Test</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
max-width: 600px;
|
|
margin: 50px auto;
|
|
padding: 20px;
|
|
background: #1a1a1a;
|
|
color: #fff;
|
|
}
|
|
.test-button {
|
|
padding: 10px 20px;
|
|
margin: 10px;
|
|
background: #0066ff;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
}
|
|
.test-button:hover {
|
|
background: #0052cc;
|
|
}
|
|
.info {
|
|
margin-top: 20px;
|
|
padding: 15px;
|
|
background: #333;
|
|
border-radius: 5px;
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
}
|
|
.sound-item {
|
|
margin: 10px 0;
|
|
padding: 10px;
|
|
background: #2a2a2a;
|
|
border-radius: 3px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>🎵 Hikari Notification Test Page</h1>
|
|
|
|
<div class="info">
|
|
<h2>Required Sound Files:</h2>
|
|
<p>Please generate these TTS sounds and place them in <code>/static/sounds/</code>:</p>
|
|
|
|
<div class="sound-item">
|
|
<strong>im-done.mp3</strong> - "I'm done!" (cheerful, accomplished)
|
|
</div>
|
|
<div class="sound-item">
|
|
<strong>oh-no.mp3</strong> - "Oh no..." (concerned, but not panicked)
|
|
</div>
|
|
<div class="sound-item">
|
|
<strong>access-please.mp3</strong> - "Access please!" (polite, questioning)
|
|
</div>
|
|
<div class="sound-item"><strong>connected.mp3</strong> - "Connected!" (happy, energetic)</div>
|
|
<div class="sound-item">
|
|
<strong>working-on-it.mp3</strong> - "Working on it!" (determined, focused)
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Test Sounds:</h2>
|
|
<p>Click to test each notification sound (once files are in place):</p>
|
|
|
|
<button class="test-button" onclick="playSound('im-done.mp3')">Success - "I'm done!"</button>
|
|
<button class="test-button" onclick="playSound('oh-no.mp3')">Error - "Oh no..."</button>
|
|
<button class="test-button" onclick="playSound('access-please.mp3')">
|
|
Permission - "Access please!"
|
|
</button>
|
|
<button class="test-button" onclick="playSound('connected.mp3')">
|
|
Connection - "Connected!"
|
|
</button>
|
|
<button class="test-button" onclick="playSound('working-on-it.mp3')">
|
|
Task Start - "Working on it!"
|
|
</button>
|
|
|
|
<script>
|
|
function playSound(filename) {
|
|
const audio = new Audio("/sounds/" + filename);
|
|
audio.volume = 0.7;
|
|
audio.play().catch((err) => {
|
|
alert(
|
|
"Sound file not found: " + filename + "\n\nPlease add the sound file to /static/sounds/"
|
|
);
|
|
console.error("Audio playback failed:", err);
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|