Allow "voice mode" to be set as default on room creation

Also, hide it behind a flag in config (experimental_voice_mode)
This commit is contained in:
N-Pex 2023-02-17 22:00:47 +01:00 committed by n8fr8
parent 3853f21f90
commit afa38275f0
7 changed files with 246 additions and 244 deletions

View file

@ -165,7 +165,7 @@
</v-card-text>
</v-card>
<v-card class="account ma-3" flat>
<v-card class="account ma-3" flat v-if="$config.experimental_voice_mode">
<v-card-title class="h2 with-right-label"><div>{{ $t("room_info.experimental_features") }}</div><div></div></v-card-title>
<v-card-text class="with-right-label">
<div>
@ -173,7 +173,7 @@
<div class="option-text">{{ $t('room_info.voice_mode_info') }}</div>
</div>
<v-switch
v-model="useAudioLayout"
v-model="useVoiceMode"
></v-switch>
</v-card-text>
</v-card>
@ -376,15 +376,9 @@ export default {
return "";
},
useAudioLayout: {
useVoiceMode: {
get: function () {
if (this.room) {
const tags = this.room.tags;
if (tags && tags["ui_options"]) {
return tags["ui_options"]["voice_mode"] === 1;
}
}
return false;
return util.useVoiceMode(this.room);
},
set: function (audioLayout) {
if (this.room && this.room.tags) {