save button in settings close menu (#1451)

This commit is contained in:
GRL78 2021-09-14 16:43:00 +02:00 committed by GitHub
parent 9006283c90
commit 680e538fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import {localUserStore} from "../../Connexion/LocalUserStore";
import {videoConstraintStore} from "../../Stores/MediaStore"; import {videoConstraintStore} from "../../Stores/MediaStore";
import {HtmlUtils} from "../../WebRtc/HtmlUtils"; import {HtmlUtils} from "../../WebRtc/HtmlUtils";
import {isMobile} from "../../Enum/EnvironmentVariable"; import {isMobile} from "../../Enum/EnvironmentVariable";
import {menuVisiblilityStore} from "../../Stores/MenuStore";
let fullscreen : boolean = localUserStore.getFullscreen(); let fullscreen : boolean = localUserStore.getFullscreen();
let notification : boolean = localUserStore.getNotification() === 'granted'; let notification : boolean = localUserStore.getNotification() === 'granted';
@ -22,6 +23,8 @@ function saveSetting(){
previewValueVideo = valueVideo; previewValueVideo = valueVideo;
videoConstraintStore.setFrameRate(valueVideo); videoConstraintStore.setFrameRate(valueVideo);
} }
closeMenu();
} }
function changeFullscreen() { function changeFullscreen() {
@ -50,6 +53,10 @@ function changeNotification() {
}) })
} }
} }
function closeMenu() {
menuVisiblilityStore.set(false);
}
</script> </script>
<div class="settings-main" on:submit|preventDefault={saveSetting}> <div class="settings-main" on:submit|preventDefault={saveSetting}>