make loading/reconnection less intrusive

This commit is contained in:
shibao 2023-01-22 23:39:34 -05:00
parent 5f214ab7f9
commit 0a56b32b17
9 changed files with 16 additions and 57 deletions

View File

@ -1,6 +1,7 @@
# v0.8.1
- Update dependencies
- Show topbar on form submit/page refresh
- Make loading/reconnection less intrusive
# v0.8.0
- Add search to catalog, ammo, container, tag and range index pages

View File

@ -25,12 +25,12 @@ $fa-font-path: "@fortawesome/fontawesome-free/webfonts";
100% { scale: 1.0; opacity: 1; }
}
.phx-connected > #disconnect, #loading {
.phx-connected > #disconnect {
opacity: 0 !important;
pointer-events: none;
}
.phx-loading:not(.phx-error) > #loading, .phx-error > #disconnect {
.phx-error > #disconnect {
opacity: 0.95 !important;
}

View File

@ -27,28 +27,16 @@
</div>
</main>
<div
id="loading"
class="fixed opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
flex flex-col justify-center items-center space-y-4
transition-opacity ease-in-out duration-500"
>
<h1 class="title text-2xl title-primary-500">
<%= gettext("Loading...") %>
</h1>
<i class="fas fa-3x fa-spin fa-gear"></i>
</div>
<div
id="disconnect"
class="fixed opacity-0 top-0 left-0 w-screen h-screen bg-white z-50
flex flex-col justify-center items-center space-y-4
transition-opacity ease-in-out duration-500"
class="z-50 fixed opacity-0 bottom-12 right-12 px-8 py-4 w-max h-max
border border-primary-200 shadow-lg rounded-lg bg-white
flex justify-center items-center space-x-4
transition-opacity ease-in-out duration-500 delay-[2000ms]"
>
<h1 class="title text-2xl title-primary-500">
<i class="fas fa-fade text-md fa-satellite-dish"></i>
<h1 class="title text-md title-primary-500">
<%= gettext("Reconnecting...") %>
</h1>
<i class="fas fa-3x fa-fade fa-satellite-dish"></i>
</div>

View File

@ -632,16 +632,11 @@ msgstr "Demarkiert"
msgid "Firing type"
msgstr "Patronenhülsenform"
#: lib/cannery_web/templates/layout/live.html.heex:50
#: lib/cannery_web/templates/layout/live.html.heex:40
#, elixir-autogen, elixir-format
msgid "Reconnecting..."
msgstr "Neu verbinden..."
#: lib/cannery_web/templates/layout/live.html.heex:37
#, elixir-autogen, elixir-format
msgid "Loading..."
msgstr "Lädt..."
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/show.ex:113
#, elixir-autogen, elixir-format

View File

@ -615,16 +615,11 @@ msgstr ""
msgid "Firing type"
msgstr ""
#: lib/cannery_web/templates/layout/live.html.heex:50
#: lib/cannery_web/templates/layout/live.html.heex:40
#, elixir-autogen, elixir-format
msgid "Reconnecting..."
msgstr ""
#: lib/cannery_web/templates/layout/live.html.heex:37
#, elixir-autogen, elixir-format
msgid "Loading..."
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/show.ex:113
#, elixir-autogen, elixir-format

View File

@ -615,16 +615,11 @@ msgstr ""
msgid "Firing type"
msgstr ""
#: lib/cannery_web/templates/layout/live.html.heex:50
#: lib/cannery_web/templates/layout/live.html.heex:40
#, elixir-autogen, elixir-format
msgid "Reconnecting..."
msgstr ""
#: lib/cannery_web/templates/layout/live.html.heex:37
#, elixir-autogen, elixir-format
msgid "Loading..."
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/show.ex:113
#, elixir-autogen, elixir-format

View File

@ -633,16 +633,11 @@ msgstr "Retirar"
msgid "Firing type"
msgstr "Tipo de fuego"
#: lib/cannery_web/templates/layout/live.html.heex:50
#: lib/cannery_web/templates/layout/live.html.heex:40
#, elixir-autogen, elixir-format
msgid "Reconnecting..."
msgstr "Reconectando..."
#: lib/cannery_web/templates/layout/live.html.heex:37
#, elixir-autogen, elixir-format
msgid "Loading..."
msgstr "Cargando..."
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/show.ex:113
#, elixir-autogen, elixir-format

View File

@ -634,16 +634,11 @@ msgstr "Désélectionner"
msgid "Firing type"
msgstr "Type dallumage"
#: lib/cannery_web/templates/layout/live.html.heex:50
#: lib/cannery_web/templates/layout/live.html.heex:40
#, elixir-autogen, elixir-format
msgid "Reconnecting..."
msgstr "Reconnexion en cours…"
#: lib/cannery_web/templates/layout/live.html.heex:37
#, elixir-autogen, elixir-format
msgid "Loading..."
msgstr "Chargement en cours…"
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/show.ex:113
#, elixir-autogen, elixir-format

View File

@ -626,16 +626,11 @@ msgstr ""
msgid "Firing type"
msgstr ""
#: lib/cannery_web/templates/layout/live.html.heex:50
#: lib/cannery_web/templates/layout/live.html.heex:40
#, elixir-autogen, elixir-format
msgid "Reconnecting..."
msgstr ""
#: lib/cannery_web/templates/layout/live.html.heex:37
#, elixir-autogen, elixir-format
msgid "Loading..."
msgstr ""
#: lib/cannery_web/live/container_live/index.ex:32
#: lib/cannery_web/live/container_live/show.ex:113
#, elixir-autogen, elixir-format