feat(android): say that work is happening, on every screen
The home screen's buttons already dimmed during an operation, but from the list nothing moved: deleting or duplicating takes a second or two - the container's round trip - and the screen stayed identical, as if the tap had not registered. A veil with a turning arc now covers any screen, and it also prevents the second tap, which would not wait any better. Its safety net is the existing 25 s deadline: even if an operation never hands back, the veil lifts. The plan records where deleted entries actually are: every publish is a Gitea commit, so the snapshot from before the deletion is still in the repository's history, readable in its web interface and recoverable by import. Not a screen, but a real net - and one that catches what a trash would not: an unlucky edit, a bad import.
This commit is contained in:
@@ -283,6 +283,19 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
.toast.on { opacity: 1; }
|
||||
/* DIRE QUE CA TRAVAILLE, sur n'importe quel ecran. Les boutons de l'accueil
|
||||
palissaient deja pendant une operation, mais depuis la liste rien ne
|
||||
bougeait : supprimer ou dupliquer prend une a deux secondes - le trajet du
|
||||
conteneur - et l'ecran restait identique, comme si l'appui n'avait pas
|
||||
pris. Le voile empeche aussi le second appui, qui n'attendrait pas mieux. */
|
||||
.busy { position: fixed; inset: 0; z-index: 90; display: none;
|
||||
align-items: center; justify-content: center;
|
||||
background: rgba(0, 0, 0, .38); }
|
||||
body.busy .busy { display: flex; }
|
||||
.busy > div { background: var(--bg-top); border-radius: var(--radius);
|
||||
padding: 20px 26px; display: flex; align-items: center;
|
||||
gap: 12px; font-size: 15px; }
|
||||
.busy svg { width: 22px; height: 22px; animation: spin .9s linear infinite; }
|
||||
</style>
|
||||
|
||||
<div class="screen" id="unlock">
|
||||
@@ -431,6 +444,7 @@
|
||||
<div class="menu" id="menu" hidden></div>
|
||||
</div>
|
||||
|
||||
<div class="busy" id="busy"><div></div></div>
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<script>
|
||||
@@ -1368,6 +1382,14 @@ var PM = {
|
||||
clearTimeout(t._h);
|
||||
t._h = setTimeout(function () { t.classList.remove('on'); }, 2600);
|
||||
},
|
||||
/// Delphi l'appelle des qu'il part travailler et des qu'il revient. Le
|
||||
/// filet est son minuteur de 25 s : meme si une operation ne rend jamais la
|
||||
/// main, le voile se leve.
|
||||
setBusy: function (on) {
|
||||
if (on) document.getElementById('busy').firstChild.innerHTML =
|
||||
ico('loader', 'Working') + '<span>Please wait...</span>';
|
||||
document.body.classList.toggle('busy', !!on);
|
||||
},
|
||||
back: function () { if (view === 'detail') goList(); },
|
||||
/// La touche retour annule la selection avant de verrouiller le coffre.
|
||||
/// Sans cela, un geste d'annulation fermait le coffre - le contraire de ce
|
||||
|
||||
Reference in New Issue
Block a user