diff --git a/assets/css/app.scss b/assets/css/app.scss index 602ce989..0d33aa81 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -16,6 +16,24 @@ $fa-font-path: "@fortawesome/fontawesome-free/webfonts"; scrollbar-color: rgba(161, 161, 170, var(--tw-bg-opacity)) white; } +.fa-fade { + animation: pulse 1s ease-in-out 0s infinite alternate; +} + +@keyframes pulse { + 0% { scale: 0.95; opacity: 0.5; } + 100% { scale: 1.0; opacity: 1; } +} + +.phx-connected > #disconnect, #loading { + opacity: 0 !important; + pointer-events: none; +} + +.phx-loading:not(.phx-error) > #loading, .phx-error > #disconnect { + opacity: 0.95 !important; +} + /* Alerts and form errors used by phx.new */ .alert { padding: 15px; diff --git a/lib/cannery_web/templates/layout/live.html.heex b/lib/cannery_web/templates/layout/live.html.heex index 55f20ebb..68c6dfef 100644 --- a/lib/cannery_web/templates/layout/live.html.heex +++ b/lib/cannery_web/templates/layout/live.html.heex @@ -26,3 +26,29 @@ <%= @inner_content %> + +
+

+ <%= gettext("Loading...") %> +

+ + +
+ +
+

+ <%= gettext("Reconnecting...") %> +

+ + +