Merge branch '558-add-delete-now-button-to-self-destruct-countdown' into 'dev'
ux: delete now and increase self destruct time See merge request keanuapp/keanuapp-weblite!266
This commit is contained in:
commit
dd22ae45b7
2 changed files with 14 additions and 7 deletions
|
|
@ -36,6 +36,7 @@
|
||||||
"logout": "Logout",
|
"logout": "Logout",
|
||||||
"new_room": "New Room",
|
"new_room": "New Room",
|
||||||
"undo": "Undo",
|
"undo": "Undo",
|
||||||
|
"delete_now": "Delete now",
|
||||||
"join": "Join",
|
"join": "Join",
|
||||||
"ignore": "Ignore",
|
"ignore": "Ignore",
|
||||||
"loading": "Loading {appName}",
|
"loading": "Loading {appName}",
|
||||||
|
|
@ -270,7 +271,7 @@
|
||||||
"info": "All members and messages will be removed. This action cannot be undone.",
|
"info": "All members and messages will be removed. This action cannot be undone.",
|
||||||
"button": "Delete",
|
"button": "Delete",
|
||||||
"n_seconds": "{seconds} seconds",
|
"n_seconds": "{seconds} seconds",
|
||||||
"self_destruct": "Room will self destruct in seconds.",
|
"self_destruct": "Your room will self destruct in seconds.",
|
||||||
"deleting": "Deleting room:",
|
"deleting": "Deleting room:",
|
||||||
"notified": "We've notified members.",
|
"notified": "We've notified members.",
|
||||||
"room_deletion_notice": "Time to say goodbye! This room has been deleted by {user}. It will self destruct in seconds."
|
"room_deletion_notice": "Time to say goodbye! This room has been deleted by {user}. It will self destruct in seconds."
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,8 @@
|
||||||
class="d-inline-block me-2"
|
class="d-inline-block me-2"
|
||||||
src="@/assets/icons/timer.svg"
|
src="@/assets/icons/timer.svg"
|
||||||
/>{{ $t("purge_room.n_seconds", { seconds: timeout }) }}
|
/>{{ $t("purge_room.n_seconds", { seconds: timeout }) }}
|
||||||
<h2 class="dialog-title">{{ $t("purge_room.self_destruct") }}</h2>
|
<h2 class="dialog-title mb-0">{{ $t("purge_room.self_destruct") }}</h2>
|
||||||
<div class="dialog-text">
|
<div class="dialog-text text-center mb-5">
|
||||||
{{ $t("purge_room.notified") }}
|
{{ $t("purge_room.notified") }}
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog-text">
|
<div class="dialog-text">
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
</template>
|
</template>
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
<v-row cols="12">
|
<v-row cols="12">
|
||||||
<v-col cols="12">
|
<v-col cols="6">
|
||||||
<v-btn
|
<v-btn
|
||||||
id="btn-purge-room-undo"
|
id="btn-purge-room-undo"
|
||||||
depressed
|
depressed
|
||||||
|
|
@ -77,6 +77,11 @@
|
||||||
>{{ $t("menu.undo") }}</v-btn
|
>{{ $t("menu.undo") }}</v-btn
|
||||||
>
|
>
|
||||||
</v-col>
|
</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-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -156,17 +161,18 @@ export default {
|
||||||
{ status: "delete" }
|
{ status: "delete" }
|
||||||
);
|
);
|
||||||
|
|
||||||
this.timeout = 5;
|
this.timeout = 7;
|
||||||
this.timeoutTimer = setInterval(() => {
|
this.timeoutTimer = setInterval(() => {
|
||||||
this.timeout = this.timeout - 1;
|
this.timeout = this.timeout - 1;
|
||||||
if (this.timeout == 0) {
|
if (this.timeout == 0) {
|
||||||
clearInterval(this.timeoutTimer);
|
|
||||||
this.timeoutTimer = null;
|
|
||||||
this.onDoPurgeRoom();
|
this.onDoPurgeRoom();
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
onDoPurgeRoom() {
|
onDoPurgeRoom() {
|
||||||
|
this.timeout = 0
|
||||||
|
clearInterval(this.timeoutTimer);
|
||||||
|
this.timeoutTimer = null;
|
||||||
this.isPurging = true;
|
this.isPurging = true;
|
||||||
this.$matrix
|
this.$matrix
|
||||||
.purgeRoom(this.room.roomId, this.onPurgeStatus)
|
.purgeRoom(this.room.roomId, this.onPurgeStatus)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue