Remove room creation option(s) if hide_add_room_on_home is set

This commit is contained in:
N-Pex 2023-10-31 09:51:57 +01:00
parent b5678a04e4
commit 86d5f0c250
6 changed files with 22 additions and 6 deletions

View file

@ -86,7 +86,7 @@
class="filled-button mt-4"
>{{ $t("login.login") }}</v-btn
>
<div class="mt-2 overline" v-if="showCreateRoomOption">{{ $t("login.or") }}</div>
<div class="mt-2 overline" v-if="showCreateRoom">{{ $t("login.or") }}</div>
<v-btn
id="btn-create-room"
color="primary"
@ -94,7 +94,7 @@
block
@click.stop="handleCreateRoom"
class="filled-button mt-2"
v-if="showCreateRoomOption"
v-if="showCreateRoom"
>{{ $t("login.create_room") }}</v-btn
>
</v-form>
@ -151,6 +151,9 @@ export default {
showCloseButton() {
return this.$navigation && this.$navigation.canPop();
},
showCreateRoom() {
return this.showCreateRoomOption && !this.$config.hide_add_room_on_home;
}
},
created() {
if (this.loggedIn) {

View file

@ -50,7 +50,7 @@
<a :href="'//' + productLink">{{ productLink }}</a>
</template>
</i18n>
<div class="text-end">
<div class="text-end" v-if="!$config.hide_add_room_on_home">
<v-btn id="btn-new-room" class="new_room" text @click="createRoom">
{{ $t("profile_info_popup.new_room") }}
</v-btn>

View file

@ -6,7 +6,7 @@
:showCloseButton="false"
>
<div class="room-info-sheet" ref="roomInfoSheetContent">
<room-list v-on:close="close" v-on:newroom="createRoom" :showCreate="true" />
<room-list v-on:close="close" v-on:newroom="createRoom" :showCreate="!$config.hide_add_room_on_home" />
</div>
</BottomSheet>
</template>