Experimental "read only" room support

This commit is contained in:
N-Pex 2023-03-16 15:23:26 +01:00
parent 490c436e09
commit 0b84bf3caa
8 changed files with 169 additions and 17 deletions

View file

@ -6,7 +6,7 @@
:timelineSet="timelineSet"
:readMarker="readMarker"
:recordingMembers="typingMembers"
v-on:start-recording="showRecorder = true"
v-on:start-recording="setShowRecorder()"
v-on:loadnext="handleScrolledToBottom(false)"
v-on:loadprevious="handleScrolledToTop()"
v-on:mark-read="sendRR"
@ -177,6 +177,7 @@
<VoiceRecorder :micButtonRef="$refs.mic_button" :ptt="showRecorderPTT" :show="showRecorder"
v-on:close="showRecorder = false" v-on:file="onVoiceRecording" />
</div>
<div v-if="!useVoiceMode && room && $matrix.currentRoomIsReadOnlyForUser" class="input-area-read-only">{{ $t("message.not_allowed_to_send") }}</div>
</v-container>
<input ref="attachment" type="file" name="attachment" @change="handlePickedAttachment($event)"
@ -1450,7 +1451,15 @@ export default {
setTimeout(() => {
this.chatContainer.parentElement.removeChild(div);
}, 3000);
},
setShowRecorder() {
if (this.canRecordAudio) {
this.showRecorder = true;
} else {
this.showNoRecordingAvailableDialog = true;
}
}
},
};
</script>