generated from nhcarrigan/template
feat: add notification sounds
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,93 @@
|
||||
<!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>
|
||||
Binary file not shown.
Reference in New Issue
Block a user