Changed toast.confirm.html

This commit is contained in:
Niko 2022-03-30 20:43:24 +02:00
parent 4c6acb0a64
commit 084b3d308b
2 changed files with 7 additions and 2 deletions

View File

@ -497,6 +497,11 @@ app.toast = {
container.id = 'toast-container'; container.id = 'toast-container';
container.className = 'height-mobile'; container.className = 'height-mobile';
document.body.appendChild(container); document.body.appendChild(container);
} else {
const html = container.outerHTML;
container.remove();
document.body.innerHTML += html;
container = document.getElementById('toast-container');
} }
var toasts = document.getElementById('toasts'); var toasts = document.getElementById('toasts');
if (toasts === null) { if (toasts === null) {

View File

@ -1,6 +1,6 @@
<div class="confirm flex"> <div class="confirm flex">
<a class="width-max text-center button noback rounder nope" <a class="width-max text-center button noback nope"
onclick="app.toast.dismiss('{.id}', event)">{.no_text}</a> onclick="app.toast.dismiss('{.id}', event)">{.no_text}</a>
<a class="width-max text-center button noback rounder yes" <a class="width-max text-center button noback yes"
onclick="app.toast.accept('{.id}', event)">{.yes_text}</a> onclick="app.toast.accept('{.id}', event)">{.yes_text}</a>
</div> </div>