add mobile ICE settings reset
This commit is contained in:
1 parent
365415740e
commit
c9f9ff857e
2 files changed
+13
-2
No files matched your search
+12
-2
@@ -2074,10 +2074,20 @@ $('#ice-cancel').onclick = () => $('#modal-backdrop').classList.add('hidden');
|
||||
$('#modal-backdrop').onclick = (ev) => {
|
||||
if (ev.target === $('#modal-backdrop')) $('#modal-backdrop').classList.add('hidden');
|
||||
};
|
||||
$('#ice-reset').onclick = () => {
|
||||
function resetIceSettings(reload = false) {
|
||||
localStorage.removeItem(LS_ICE);
|
||||
$('#override-enabled').checked = false;
|
||||
fetchIce().then((server) => { $('#ice-json').value = JSON.stringify(server, null, 2); });
|
||||
fetchIce().then((server) => {
|
||||
$('#ice-json').value = JSON.stringify(server, null, 2);
|
||||
if (reload) location.reload();
|
||||
}).catch(() => {
|
||||
if (reload) location.reload();
|
||||
});
|
||||
}
|
||||
$('#ice-reset').onclick = () => resetIceSettings();
|
||||
$('#btn-reset-ice-mobile').onclick = () => {
|
||||
toast('Resetting saved ICE settings…', 'ok');
|
||||
resetIceSettings(true);
|
||||
};
|
||||
$('#ice-save').onclick = () => {
|
||||
const enabled = $('#override-enabled').checked;
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
<button class="ctl mirror-mic" title="Toggle mic (M)"><span class="material-symbols-outlined">mic</span></button>
|
||||
<button class="ctl mirror-deafen" title="Toggle deafen (D)"><span class="material-symbols-outlined">headphones</span></button>
|
||||
<button class="ctl mirror-share" title="Share your screen (S)"><span class="material-symbols-outlined">present_to_all</span></button>
|
||||
<button id="btn-reset-ice-mobile" class="ctl" title="Reset saved ICE settings"><span class="material-symbols-outlined">restart_alt</span></button>
|
||||
</div>
|
||||
|
||||
<!-- settings modal -->
|
||||
|
||||
Reference in new issue
Block a user