Skip to content

Commit 7562068

Browse files
committed
feat: show spinner while user is onboarded in bg
1 parent 8bd95d6 commit 7562068

File tree

1 file changed

+29
-0
lines changed
  • lib/algora_web/live/onboarding

1 file changed

+29
-0
lines changed

lib/algora_web/live/onboarding/dev.ex

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,35 @@ defmodule AlgoraWeb.Onboarding.DevLive do
9090
|> assign(:signup_form, signup_form)}
9191
end
9292

93+
@impl true
94+
def render(%{current_user: current_user} = assigns) when not is_nil(current_user) do
95+
~H"""
96+
<div
97+
class="w-screen h-screen fixed inset-0 bg-background z-[100]"
98+
phx-hook="LocalStateStore"
99+
id="onboarding-dev-page"
100+
>
101+
<div class="flex items-center justify-center h-full">
102+
<svg
103+
class="mr-3 -ml-1 size-12 animate-spin text-success"
104+
xmlns="http://www.w3.org/2000/svg"
105+
fill="none"
106+
viewBox="0 0 24 24"
107+
>
108+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4">
109+
</circle>
110+
<path
111+
class="opacity-75"
112+
fill="currentColor"
113+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
114+
>
115+
</path>
116+
</svg>
117+
</div>
118+
</div>
119+
"""
120+
end
121+
93122
@impl true
94123
def render(assigns) do
95124
~H"""

0 commit comments

Comments
 (0)