diff --git a/templates/show.html b/templates/show.html index d5487b8..054f1f1 100644 --- a/templates/show.html +++ b/templates/show.html @@ -32,7 +32,7 @@ {% if flower.dateCreated not in ('STORED', 'FAILED') %}
-
+ @@ -46,7 +46,17 @@ const secret = document.querySelector('#secret'); const reveal = document.querySelector('#reveal'); const copy = document.querySelector('#copy'); + const editForm = document.querySelector('#edit-form'); let visible = false; + + const returnToList = window.setTimeout(() => { + window.location.assign('{{ url_for("flower_vase.application") }}'); + }, 8000); + + if (editForm) { + editForm.addEventListener('submit', () => window.clearTimeout(returnToList)); + } + reveal.addEventListener('click', () => { visible = !visible; secret.textContent = visible ? secret.dataset.secret : '••••••••••••';