Refactor code structure for improved readability and maintainability

This commit is contained in:
Alex Lion
2026-02-17 16:54:41 +01:00
parent 71f5542dcb
commit 5ea07f077d
14 changed files with 3991 additions and 3354 deletions

View File

@@ -222,7 +222,7 @@ defmodule ClaperWeb.EventLive.EventCardComponent do
/> />
<path d="M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z" /> <path d="M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z" />
</svg> </svg>
<span class="font-medium">{gettext("Attendant Room")}</span> <span class="font-medium">{gettext("Attendees Room")}</span>
</a> </a>
</div> </div>
</div> </div>
@@ -438,7 +438,7 @@ defmodule ClaperWeb.EventLive.EventCardComponent do
/> />
<path d="M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z" /> <path d="M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z" />
</svg> </svg>
<span class="font-medium">{gettext("Attendant Room")}</span> <span class="font-medium">{gettext("Attendees Room")}</span>
</a> </a>
</div> </div>
</div> </div>
@@ -691,7 +691,7 @@ defmodule ClaperWeb.EventLive.EventCardComponent do
/> />
<path d="M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z" /> <path d="M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z" />
</svg> </svg>
<span class="font-medium">{gettext("Attendant Room")}</span> <span class="font-medium">{gettext("Attendees Room")}</span>
</a> </a>
</div> </div>
</div> </div>

View File

@@ -39,19 +39,6 @@ defmodule ClaperWeb.EventLive.ManageAttendeesOptionsComponent do
</svg> </svg>
</:icon> </:icon>
</.toggle_row> </.toggle_row>
<.toggle_row
label={if @state.show_attendee_count, do: gettext("Hide attendee count"), else: gettext("Show attendee count")}
checked={@state.show_attendee_count}
key={:show_attendee_count}
shortcut={if @create == nil, do: "R", else: nil}
show_shortcut={@show_shortcut}
>
<:icon>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
<path d="M7 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM14.5 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM1.615 16.428a1.224 1.224 0 0 1-.569-1.175 6.002 6.002 0 0 1 11.908 0c.058.467-.172.92-.57 1.174A9.953 9.953 0 0 1 7 18a9.953 9.953 0 0 1-5.385-1.572ZM14.5 16h-.106c.07-.297.088-.611.048-.933a7.47 7.47 0 0 0-1.588-3.755 4.502 4.502 0 0 1 5.874 2.636.818.818 0 0 1-.36.98A7.465 7.465 0 0 1 14.5 16Z" />
</svg>
</:icon>
</.toggle_row>
</div> </div>
</div> </div>
""" """

View File

@@ -37,7 +37,7 @@ defmodule ClaperWeb.EventLive.ManageAudienceResponsesComponent do
phx-value-tab="posts" phx-value-tab="posts"
class={"px-3 py-1.5 rounded-full text-sm font-medium transition-colors #{if @list_tab == :posts, do: "bg-secondary-500 text-white", else: "text-gray-600 hover:bg-gray-100"}"} class={"px-3 py-1.5 rounded-full text-sm font-medium transition-colors #{if @list_tab == :posts, do: "bg-secondary-500 text-white", else: "text-gray-600 hover:bg-gray-100"}"}
> >
{gettext("Chat")} ({@post_count}) {gettext("Messages")} ({@post_count})
</button> </button>
</li> </li>
<li> <li>

View File

@@ -56,7 +56,7 @@ defmodule ClaperWeb.EventLive.ManagePresentationOptionsComponent do
</:icon> </:icon>
</.toggle_row> </.toggle_row>
<.toggle_row <.toggle_row
label={if @state.show_only_pinned, do: gettext("Show all messages"), else: gettext("Show pinned messages")} label={if @state.show_only_pinned, do: gettext("Show all messages"), else: gettext("Show only pinned messages")}
checked={@state.show_only_pinned} checked={@state.show_only_pinned}
key={:show_only_pinned} key={:show_only_pinned}
shortcut={if @create == nil, do: "E", else: nil} shortcut={if @create == nil, do: "E", else: nil}
@@ -105,6 +105,19 @@ defmodule ClaperWeb.EventLive.ManagePresentationOptionsComponent do
</svg> </svg>
</:icon> </:icon>
</.toggle_row> </.toggle_row>
<.toggle_row
label={if @state.show_attendee_count, do: gettext("Hide attendee count"), else: gettext("Show attendee count")}
checked={@state.show_attendee_count}
key={:show_attendee_count}
shortcut={if @create == nil, do: "R", else: nil}
show_shortcut={@show_shortcut}
>
<:icon>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
<path d="M7 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM14.5 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM1.615 16.428a1.224 1.224 0 0 1-.569-1.175 6.002 6.002 0 0 1 11.908 0c.058.467-.172.92-.57 1.174A9.953 9.953 0 0 1 7 18a9.953 9.953 0 0 1-5.385-1.572ZM14.5 16h-.106c.07-.297.088-.611.048-.933a7.47 7.47 0 0 0-1.588-3.755 4.502 4.502 0 0 1 5.874 2.636.818.818 0 0 1-.36.98A7.465 7.465 0 0 1 14.5 16Z" />
</svg>
</:icon>
</.toggle_row>
</div> </div>
</div> </div>
""" """

View File

@@ -3,9 +3,7 @@
<div class="flex items-center justify-center gap-2"> <div class="flex items-center justify-center gap-2">
<span class="font-bold text-secondary-500">{gettext("NEWS:")}</span> <span class="font-bold text-secondary-500">{gettext("NEWS:")}</span>
<span class="text-secondary-500"> <span class="text-secondary-500">
{gettext(
"Exciting News: Seamlessly join live events and elevate your audience engagement today!"
)}
</span> </span>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff