-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy patherror.ex
More file actions
55 lines (49 loc) · 1.54 KB
/
Copy patherror.ex
File metadata and controls
55 lines (49 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
defmodule LiveDebuggerWeb.Components.Error do
@moduledoc false
use LiveDebuggerWeb, :component
slot(:heading, required: true)
slot(:description)
def error_component(assigns) do
~H"""
<div class="h-full flex flex-col items-center justify-center mx-8 text-center">
<.icon name="icon-exclamation-circle" class="w-12 h-12 text-error-icon" />
<div class="font-semibold text-xl mb-2">
<%= render_slot(@heading) %>
</div>
<p class="mb-4"><%= render_slot(@description) %></p>
<.link navigate={LiveDebuggerWeb.Helpers.RoutesHelper.live_views_dashboard()}>
<.button>
See active LiveViews
</.button>
</.link>
</div>
"""
end
def not_found_component(assigns) do
~H"""
<.error_component>
<:heading>Debugger disconnected</:heading>
<:description>We couldn't find any LiveView associated with the given socket id</:description>
</.error_component>
"""
end
def unexpected_error_component(assigns) do
~H"""
<.error_component>
<:heading>Unexpected error</:heading>
<:description>
Debugger encountered unexpected error. Check logs for more information
<.report_issue class="mb-4" text="" />
</:description>
</.error_component>
"""
end
def session_limit_component(assigns) do
~H"""
<.error_component>
<:heading>Session limit reached</:heading>
<:description>In OTP 26 and older versions you can open only one debugger window</:description>
</.error_component>
"""
end
end