"Delete" button for roomAdmin added instead of "Leave" button

This commit is contained in:
10G Meow 2022-04-25 08:44:25 +00:00 committed by N Pex
parent ecfde40147
commit 70d055ec22
2 changed files with 31 additions and 26 deletions

View file

@ -22,9 +22,25 @@
<div class="num-members">{{ $tc("room.members", memberCount) }}</div>
</v-col>
<v-col cols="auto" class="text-end ma-0 pa-0">
<v-btn id="btn-leave-room" text class="leave-button" @click.stop="leaveRoom">{{
$t("room.leave")
}}</v-btn>
<v-btn
id="btn-purge-room"
v-if="userCanPurgeRoom"
color="red"
depressed
class="filled-button"
@click.stop="showPurgeConfirmation = true"
>
{{ $t("room_info.purge") }}
</v-btn>
<v-btn
id="btn-leave-room"
text
class="leave-button"
@click.stop="leaveRoom"
v-else
>
{{ $t("room.leave") }}
</v-btn>
</v-col>
<v-col cols="auto" class="text-end ma-0 pa-0 ms-2">
<v-avatar
@ -51,6 +67,12 @@
:show="showProfileInfo"
@close="showProfileInfo = false"
/>
<!-- PURGE ROOM POPUP -->
<PurgeRoomDialog
:show="showPurgeConfirmation"
:room="room"
@close="showPurgeConfirmation = false"
/>
</v-container>
</template>
@ -58,19 +80,24 @@
import LeaveRoomDialog from "../components/LeaveRoomDialog";
import ProfileInfoPopup from "../components/ProfileInfoPopup";
import profileInfoMixin from "../components/profileInfoMixin";
import PurgeRoomDialog from "../components/PurgeRoomDialog";
import roomInfoMixin from "./roomInfoMixin";
export default {
name: "ChatHeader",
mixins: [profileInfoMixin],
mixins: [profileInfoMixin, roomInfoMixin],
components: {
LeaveRoomDialog,
ProfileInfoPopup,
PurgeRoomDialog
},
data() {
return {
memberCount: null,
showLeaveConfirmation: false,
showProfileInfo: false,
showPurgeConfirmation: false
};
},
mounted() {