1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-06-15 00:05:15 +02:00

Correctly handle browser back/forward navigation with pagination

This commit is contained in:
Ralph Slooten
2024-06-07 14:05:50 +12:00
parent 8a6d71ed9c
commit 7105450cc7
7 changed files with 56 additions and 40 deletions

View File

@ -31,9 +31,14 @@ export default {
methods: {
reloadInbox: function () {
pagination.start = 0
const paginationParams = this.getPaginationParams()
const reload = paginationParams?.start ? false : true
this.$router.push('/')
this.loadMessages()
if (reload) {
// already on first page, reload messages
this.loadMessages()
}
},
@ -115,7 +120,8 @@ export default {
</div>
</div>
<div class="modal fade" id="DeleteAllModal" tabindex="-1" aria-labelledby="DeleteAllModalLabel" aria-hidden="true">
<div class="modal fade" id="DeleteAllModal" tabindex="-1" aria-labelledby="DeleteAllModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">