Skip to content

Commit 702a166

Browse files
committed
add: Prélude Notification
1 parent 410e410 commit 702a166

7 files changed

Lines changed: 3 additions & 23 deletions

File tree

-29 KB
Binary file not shown.
14.7 KB
Binary file not shown.
-18.7 KB
Binary file not shown.
-7.62 KB
Binary file not shown.

src-tauri/src/audio.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,10 @@ fn load_raw_samples(path: &Path) -> Result<Vec<f32>, String> {
235235
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
236236
#[serde(tag = "type", content = "path")]
237237
pub enum NotificationSound {
238-
/// Default built-in sound (notif-default.mp3)
238+
/// Default built-in sound - Prélude (notif-prelude.mp3)
239239
Default,
240-
/// Sonar ping sound (notif-sonar.mp3)
241-
Sonar,
242240
/// Techno ping sound (notif-techno.mp3)
243241
Techno,
244-
/// Synth ping sound (notif-synth.mp3)
245-
Synth,
246242
/// No sound (silent)
247243
None,
248244
/// Custom user-selected sound file
@@ -656,10 +652,8 @@ fn get_bundled_sound_path<R: Runtime>(
656652
};
657653

658654
match sound {
659-
NotificationSound::Default => find_sound("notif-default.mp3"),
660-
NotificationSound::Sonar => find_sound("notif-sonar.mp3"),
655+
NotificationSound::Default => find_sound("notif-prelude.mp3"),
661656
NotificationSound::Techno => find_sound("notif-techno.mp3"),
662-
NotificationSound::Synth => find_sound("notif-synth.mp3"),
663657
NotificationSound::Custom(path) => {
664658
// If path is empty or doesn't exist, fall back to default sound
665659
if path.is_empty() {
@@ -855,9 +849,7 @@ fn parse_notification_sound(value: &str) -> NotificationSound {
855849
} else {
856850
match value {
857851
"default" => NotificationSound::Default,
858-
"sonar" => NotificationSound::Sonar,
859852
"techno" => NotificationSound::Techno,
860-
"synth" => NotificationSound::Synth,
861853
"none" => NotificationSound::None,
862854
_ => NotificationSound::Default,
863855
}
@@ -868,9 +860,7 @@ fn parse_notification_sound(value: &str) -> NotificationSound {
868860
fn serialize_notification_sound(sound: &NotificationSound) -> String {
869861
match sound {
870862
NotificationSound::Default => "default".to_string(),
871-
NotificationSound::Sonar => "sonar".to_string(),
872863
NotificationSound::Techno => "techno".to_string(),
873-
NotificationSound::Synth => "synth".to_string(),
874864
NotificationSound::None => "none".to_string(),
875865
NotificationSound::Custom(path) => format!("custom:{}", path),
876866
}

src/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,8 @@ <h2>Notifications</h2>
821821
<label for="notif-sound-select">Notification Sound</label>
822822
<div class="select-container" style="margin-top: 10px;">
823823
<select id="notif-sound-select">
824-
<option value="default">Default</option>
825-
<option value="sonar">Sonar</option>
824+
<option value="default">Prélude</option>
826825
<option value="techno">Techno</option>
827-
<option value="synth">Synth</option>
828826
<option value="none">None</option>
829827
<option value="custom">Custom...</option>
830828
</select>

src/js/settings.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,12 +1318,8 @@ async function initNotificationSettings() {
13181318
updateCustomFilename(sound.path);
13191319
} else if (sound && sound.type === 'None') {
13201320
soundSelect.value = 'none';
1321-
} else if (sound && sound.type === 'Sonar') {
1322-
soundSelect.value = 'sonar';
13231321
} else if (sound && sound.type === 'Techno') {
13241322
soundSelect.value = 'techno';
1325-
} else if (sound && sound.type === 'Synth') {
1326-
soundSelect.value = 'synth';
13271323
} else {
13281324
soundSelect.value = 'default';
13291325
}
@@ -1352,12 +1348,8 @@ async function initNotificationSettings() {
13521348
customGroup.style.display = 'none';
13531349
if (value === 'none') {
13541350
currentNotificationSettings.sound = { type: 'None' };
1355-
} else if (value === 'sonar') {
1356-
currentNotificationSettings.sound = { type: 'Sonar' };
13571351
} else if (value === 'techno') {
13581352
currentNotificationSettings.sound = { type: 'Techno' };
1359-
} else if (value === 'synth') {
1360-
currentNotificationSettings.sound = { type: 'Synth' };
13611353
} else {
13621354
currentNotificationSettings.sound = { type: 'Default' };
13631355
}

0 commit comments

Comments
 (0)