Merge branch '453-public-rooms-as-an-experimental-feature' into 'dev'
Allow unencrypted public room creation See merge request keanuapp/keanuapp-weblite!180
This commit is contained in:
commit
e593b34326
5 changed files with 56 additions and 5 deletions
|
|
@ -45,5 +45,6 @@
|
|||
],
|
||||
"experimental_voice_mode": true,
|
||||
"experimental_read_only_room": true,
|
||||
"experimental_public_room": true,
|
||||
"show_status_messages": "never"
|
||||
}
|
||||
|
|
@ -1242,6 +1242,26 @@ body {
|
|||
}
|
||||
text-transform: none !important;
|
||||
}
|
||||
|
||||
.room-option {
|
||||
.v-input {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.option-warning {
|
||||
background: linear-gradient(0deg, #FFF3F3, #FFF3F3), #FFFBED;
|
||||
border-radius: 8px;
|
||||
padding: 18px;
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 17px;
|
||||
.v-icon {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.room-link .v-input__slot::before {
|
||||
|
|
|
|||
7
src/assets/icons/ic_warning.vue
Normal file
7
src/assets/icons/ic_warning.vue
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<template>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M1.35799 14.8085L8.18319 2.98652C8.55719 2.33892 9.25399 1.93652 10.002 1.93652C10.75 1.93652 11.4468 2.33892 11.8208 2.98652L18.7066 14.9137C19.0804 15.5613 19.0804 16.3659 18.7066 17.0137C18.3326 17.6613 17.6358 18.0637 16.8878 18.0637H3.11199C1.95399 18.0637 1.01199 17.1217 1.01199 15.9637C1.01219 15.5505 1.13159 15.1517 1.35799 14.8085ZM3.11219 16.6635H16.8878C17.137 16.6635 17.3694 16.5293 17.494 16.3135C17.6186 16.0975 17.6186 15.8293 17.494 15.6135L10.608 3.68672C10.4834 3.47072 10.251 3.33672 10.0018 3.33672C9.75259 3.33672 9.52019 3.47092 9.39559 3.68672L2.55879 15.5283C2.55039 15.5429 2.54139 15.5573 2.53179 15.5713C2.45319 15.6869 2.41179 15.8227 2.41179 15.9637C2.41219 16.3495 2.72619 16.6635 3.11219 16.6635ZM9.99999 12.7861C9.56799 12.7861 9.21759 12.4359 9.21759 12.0037V7.93752C9.21759 7.50532 9.56799 7.15512 9.99999 7.15512C10.432 7.15512 10.7824 7.50532 10.7824 7.93752V12.0037C10.7824 12.4359 10.432 12.7861 9.99999 12.7861ZM9.99999 13.2451C10.264 13.2451 10.5202 13.3511 10.708 13.5371C10.894 13.7231 11 13.9811 11 14.2451C11 14.5071 10.894 14.7651 10.708 14.9511C10.5202 15.1371 10.2622 15.2451 9.99999 15.2451C9.73799 15.2451 9.47999 15.1371 9.29399 14.9511C9.10619 14.7651 8.99999 14.5071 8.99999 14.2451C8.99999 13.9811 9.10599 13.7231 9.29399 13.5371C9.47999 13.3509 9.73799 13.2451 9.99999 13.2451Z"
|
||||
fill="#1D1D1D" />
|
||||
</svg>
|
||||
</template>
|
||||
|
|
@ -266,7 +266,9 @@
|
|||
"voice_mode_info": "Switches the chat interface to a 'listen and record' mode",
|
||||
"download_chat": "Download chat",
|
||||
"read_only_room": "Read only room",
|
||||
"read_only_room_info": "Only admins and moderators are allowed to send to the room"
|
||||
"read_only_room_info": "Only admins and moderators are allowed to send to the room",
|
||||
"make_public": "Make Public",
|
||||
"make_public_warning": "warning: Full message history will be visible to new participants"
|
||||
},
|
||||
"room_info_sheet": {
|
||||
"this_room": "This room",
|
||||
|
|
|
|||
|
|
@ -43,13 +43,23 @@
|
|||
v-on:keyup.enter="$refs.create.$el.focus()" :disabled="step > steps.INITIAL" solo></v-text-field>
|
||||
|
||||
<!-- Our only option right now is voice mode, so if not enabled, hide the 'options' drop down as well -->
|
||||
<template v-if="$config.experimental_voice_mode || $config.experimental_read_only_room">
|
||||
<template v-if="$config.experimental_voice_mode || $config.experimental_read_only_room || $config.experimental_public_room">
|
||||
<div @click.stop="showOptions = !showOptions" v-show="roomName.length > 0" class="options clickable">
|
||||
<div>{{ $t("new_room.options") }}</div>
|
||||
<v-icon v-if="!showOptions">expand_more</v-icon>
|
||||
<v-icon v-else>expand_less</v-icon>
|
||||
</div>
|
||||
<v-card v-if="$config.experimental_voice_mode" v-show="showOptions" class="account ma-3" flat>
|
||||
<v-card v-if="$config.experimental_public_room" v-show="showOptions" class="room-option account ma-0" flat>
|
||||
<v-card-text class="with-right-label">
|
||||
<div>
|
||||
<div class="option-title">{{ $t('room_info.make_public') }}</div>
|
||||
<!-- <div class="option-text">{{ $t('room_info.read_only_room_info') }}</div> -->
|
||||
</div>
|
||||
<v-switch v-model="unencryptedRoom"></v-switch>
|
||||
</v-card-text>
|
||||
<div class="option-warning" v-if="unencryptedRoom"><v-icon size="18">$vuetify.icons.ic_warning</v-icon>{{ $t("room_info.make_public_warning")}}</div>
|
||||
</v-card>
|
||||
<v-card v-if="$config.experimental_voice_mode" v-show="showOptions" class="room-option account ma-0" flat>
|
||||
<v-card-text class="with-right-label">
|
||||
<div>
|
||||
<div class="option-title">{{ $t('room_info.voice_mode') }}</div>
|
||||
|
|
@ -58,7 +68,7 @@
|
|||
<v-switch v-model="useVoiceMode"></v-switch>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card v-if="$config.experimental_read_only_room" v-show="showOptions" class="account ma-3" flat>
|
||||
<v-card v-if="$config.experimental_read_only_room" v-show="showOptions" class="room-option account ma-0" flat>
|
||||
<v-card-text class="with-right-label">
|
||||
<div>
|
||||
<div class="option-title">{{ $t('room_info.read_only_room') }}</div>
|
||||
|
|
@ -186,6 +196,7 @@ export default {
|
|||
roomNameHasError: false,
|
||||
roomCreationErrorMsg: "",
|
||||
showOptions: false,
|
||||
unencryptedRoom: false,
|
||||
useVoiceMode: false,
|
||||
readOnlyRoom: false,
|
||||
};
|
||||
|
|
@ -316,7 +327,17 @@ export default {
|
|||
visibility: "private", // Not listed!
|
||||
name: this.roomName,
|
||||
preset: "public_chat",
|
||||
initial_state: [
|
||||
initial_state:
|
||||
this.unencryptedRoom ? [
|
||||
{
|
||||
type: "m.room.history_visibility",
|
||||
state_key: "",
|
||||
content: {
|
||||
history_visibility: "shared"
|
||||
}
|
||||
}
|
||||
] :
|
||||
[
|
||||
{
|
||||
type: "m.room.encryption",
|
||||
state_key: "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue