ux: delete now and increase self destruct time

This commit is contained in:
10G Meow 2023-11-11 11:39:14 +02:00
parent 7b1e951305
commit 0a056c1e9f
2 changed files with 14 additions and 7 deletions

View file

@ -55,8 +55,8 @@
class="d-inline-block me-2"
src="@/assets/icons/timer.svg"
/>{{ $t("purge_room.n_seconds", { seconds: timeout }) }}
<h2 class="dialog-title">{{ $t("purge_room.self_destruct") }}</h2>
<div class="dialog-text">
<h2 class="dialog-title mb-0">{{ $t("purge_room.self_destruct") }}</h2>
<div class="dialog-text text-center mb-5">
{{ $t("purge_room.notified") }}
</div>
<div class="dialog-text">
@ -65,7 +65,7 @@
</template>
<v-container fluid>
<v-row cols="12">
<v-col cols="12">
<v-col cols="6">
<v-btn
id="btn-purge-room-undo"
depressed
@ -77,6 +77,11 @@
>{{ $t("menu.undo") }}</v-btn
>
</v-col>
<v-col cols="6">
<v-btn depressed block class="outlined-button" @click="onDoPurgeRoom">
{{ $t("menu.delete_now") }}
</v-btn>
</v-col>
</v-row>
</v-container>
</div>
@ -156,17 +161,18 @@ export default {
{ status: "delete" }
);
this.timeout = 5;
this.timeout = 7;
this.timeoutTimer = setInterval(() => {
this.timeout = this.timeout - 1;
if (this.timeout == 0) {
clearInterval(this.timeoutTimer);
this.timeoutTimer = null;
this.onDoPurgeRoom();
}
}, 1000);
},
onDoPurgeRoom() {
this.timeout = 0
clearInterval(this.timeoutTimer);
this.timeoutTimer = null;
this.isPurging = true;
this.$matrix
.purgeRoom(this.room.roomId, this.onPurgeStatus)