diff --git a/.dist/localuser.js b/.dist/localuser.js index 681631b..a6768b4 100644 --- a/.dist/localuser.js +++ b/.dist/localuser.js @@ -1,5 +1,6 @@ import { Guild } from "./guild.js"; import { Direct } from "./direct.js"; +import { Voice } from "./audio.js"; import { User } from "./user.js"; import { Fullscreen } from "./fullscreen.js"; import { setTheme } from "./login.js"; @@ -700,6 +701,14 @@ class Localuser { setTheme(); }, themes, { defaultIndex: themes.indexOf(localStorage.getItem("theme")) }); } + { + const sounds = Voice.sounds; + tas.addSelect("Notification sound:", _ => { + Voice.setNotificationSound(sounds[_]); + }, sounds, { defaultIndex: sounds.indexOf(Voice.getNotificationSound()) }).watchForChange(_ => { + Voice.noises(sounds[_]); + }); + } } settings.show(); } diff --git a/webpage/localuser.ts b/webpage/localuser.ts index f41e416..8da662b 100644 --- a/webpage/localuser.ts +++ b/webpage/localuser.ts @@ -725,6 +725,14 @@ class Localuser{ setTheme(); },themes,{defaultIndex:themes.indexOf(localStorage.getItem("theme"))}); } + { + const sounds=Voice.sounds; + tas.addSelect("Notification sound:",_=>{ + Voice.setNotificationSound(sounds[_]); + },sounds,{defaultIndex:sounds.indexOf(Voice.getNotificationSound())}).watchForChange(_=>{ + Voice.noises(sounds[_]); + }) + } } settings.show(); }