Simplify room creation and improve "room welcome header" for new rooms.
Issue #127.
This commit is contained in:
parent
11c09cd767
commit
6ca7a2040d
5 changed files with 112 additions and 25 deletions
|
|
@ -1,12 +1,28 @@
|
|||
<template>
|
||||
<div class="created-room-welcome-header">
|
||||
<div class="h4">{{$t('room_welcome.welcome')}}</div>
|
||||
<div class="mt-2">{{$t('room_welcome.info')}}</div>
|
||||
<div class="mt-2" v-if="roomJoinRule == 'public'">{{$t('room_welcome.join_public', {link: publicRoomLink}) }}</div>
|
||||
<div class="mt-2" v-else-if="roomJoinRule == 'invite'">{{$t('room_welcome.join_invite')}}</div>
|
||||
<div class="mt-2">{{$t('room_welcome.info_permissions')}}</div>
|
||||
<div class="h4">{{ $t("room_welcome.welcome") }}</div>
|
||||
<div class="mt-2">{{ $t("room_welcome.info") }}</div>
|
||||
<div class="mt-2" v-if="roomIsEncrypted">
|
||||
{{ $t("room_welcome.encrypted") }}
|
||||
</div>
|
||||
<div class="mt-2" v-if="roomHistoryDescription">
|
||||
{{ roomHistoryDescription }}
|
||||
</div>
|
||||
<div class="mt-2" v-if="roomJoinRule == 'public'">
|
||||
<i18n path="room_welcome.join_public" tag="span">
|
||||
<template v-slot:link>
|
||||
<a :href="publicRoomLink">{{ publicRoomLink }}</a>
|
||||
</template>
|
||||
</i18n>
|
||||
</div>
|
||||
<div class="mt-2" v-else-if="roomJoinRule == 'invite'">
|
||||
{{ $t("room_welcome.join_invite") }}
|
||||
</div>
|
||||
<div class="mt-2">{{ $t("room_welcome.info_permissions") }}</div>
|
||||
<div class="text-right">
|
||||
<v-btn text @click.stop="$emit('close')">{{$t('room_welcome.got_it')}}</v-btn>
|
||||
<v-btn text @click.stop="$emit('close')">{{
|
||||
$t("room_welcome.got_it")
|
||||
}}</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -17,6 +33,30 @@ import roomInfoMixin from "./roomInfoMixin";
|
|||
export default {
|
||||
name: "CreatedRoomWelcomeHeader",
|
||||
mixins: [roomInfoMixin],
|
||||
computed: {
|
||||
roomHistoryDescription() {
|
||||
const visibility = this.$matrix.getRoomHistoryVisibility(this.room);
|
||||
switch (visibility) {
|
||||
case "world_readable":
|
||||
return this.$t("room_welcome.room_history_is", {
|
||||
type: this.$t("message.room_history_world_readable"),
|
||||
});
|
||||
case "shared":
|
||||
return this.$t("room_welcome.room_history_is", {
|
||||
type: this.$t("message.room_history_shared"),
|
||||
});
|
||||
case "invited":
|
||||
return this.$t("room_welcome.room_history_is", {
|
||||
type: this.$t("message.room_history_invited"),
|
||||
});
|
||||
case "joined":
|
||||
return this.$t("room_welcome.room_history_is", {
|
||||
type: this.$t("message.room_history_joined"),
|
||||
});
|
||||
}
|
||||
return null;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue