This commit is contained in:
@@ -13,27 +13,27 @@ defmodule ElixirAiWeb.ChatProviderDisplay do
|
||||
phx-click={JS.toggle(to: "#provider-dropdown")}
|
||||
class="flex items-center gap-2 text-xs min-w-0 cursor-pointer hover:opacity-80 transition-opacity"
|
||||
>
|
||||
<div class="flex items-center gap-1.5 px-2 py-1 rounded bg-cyan-950/50 border border-cyan-900/40 min-w-0 select-none">
|
||||
<div class="flex items-center gap-1.5 px-2 py-1 rounded bg-seafoam-950/50 border border-seafoam-900/40 min-w-0 select-none">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
class="w-3 h-3 shrink-0 text-cyan-600"
|
||||
class="w-3 h-3 shrink-0 text-seafoam-600"
|
||||
>
|
||||
<path d="M10 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM6 8a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM1.49 15.326a.78.78 0 0 1-.358-.442 3 3 0 0 1 4.308-3.516 6.484 6.484 0 0 0-1.905 3.959c-.023.222-.014.442.025.654a4.97 4.97 0 0 1-2.07-.655ZM16.44 15.98a4.97 4.97 0 0 0 2.07-.654.78.78 0 0 0 .357-.442 3 3 0 0 0-4.308-3.516 6.484 6.484 0 0 1 1.907 3.96 2.32 2.32 0 0 1-.026.654ZM18 8a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM5.304 16.19a.844.844 0 0 1-.277-.71 5 5 0 0 1 9.947 0 .843.843 0 0 1-.277.71A6.975 6.975 0 0 1 10 18a6.974 6.974 0 0 1-4.696-1.81Z" />
|
||||
</svg>
|
||||
<%= if @provider do %>
|
||||
<span class="text-cyan-400 font-medium truncate">{@provider.name}</span>
|
||||
<span class="text-cyan-800">·</span>
|
||||
<span class="text-cyan-600 truncate">{@provider.model_name}</span>
|
||||
<span class="text-seafoam-400 font-medium truncate">{@provider.name}</span>
|
||||
<span class="text-seafoam-800">·</span>
|
||||
<span class="text-seafoam-600 truncate">{@provider.model_name}</span>
|
||||
<% else %>
|
||||
<span class="text-cyan-800 italic">No provider</span>
|
||||
<span class="text-seafoam-800 italic">No provider</span>
|
||||
<% end %>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
fill="currentColor"
|
||||
class="w-2.5 h-2.5 text-cyan-700 ml-0.5 shrink-0"
|
||||
class="w-2.5 h-2.5 text-seafoam-700 ml-0.5 shrink-0"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
@@ -45,7 +45,7 @@ defmodule ElixirAiWeb.ChatProviderDisplay do
|
||||
</button>
|
||||
<div
|
||||
id="provider-dropdown"
|
||||
class="hidden absolute right-0 top-full mt-1 z-50 min-w-max bg-gray-950 border border-cyan-900/40 rounded shadow-xl overflow-hidden"
|
||||
class="hidden absolute right-0 top-full mt-1 z-50 min-w-max bg-gray-950 border border-seafoam-900/40 rounded shadow-xl overflow-hidden"
|
||||
phx-click-away={JS.hide(to: "#provider-dropdown")}
|
||||
>
|
||||
<%= if @providers == [] do %>
|
||||
@@ -59,9 +59,9 @@ defmodule ElixirAiWeb.ChatProviderDisplay do
|
||||
|> JS.push("change_provider", value: %{id: p.id})
|
||||
}
|
||||
class={[
|
||||
"flex flex-col px-3 py-2 text-left w-full text-xs hover:bg-cyan-950/60 transition-colors",
|
||||
"flex flex-col px-3 py-2 text-left w-full text-xs hover:bg-seafoam-950/60 transition-colors",
|
||||
if(@provider && @provider.name == p.name,
|
||||
do: "text-cyan-400",
|
||||
do: "text-seafoam-400",
|
||||
else: "text-gray-300"
|
||||
)
|
||||
]}
|
||||
@@ -69,7 +69,7 @@ defmodule ElixirAiWeb.ChatProviderDisplay do
|
||||
<span class="font-medium">{p.name}</span>
|
||||
<span class={
|
||||
if @provider && @provider.name == p.name,
|
||||
do: "text-cyan-700",
|
||||
do: "text-seafoam-700",
|
||||
else: "text-gray-500"
|
||||
}>
|
||||
{p.model_name}
|
||||
|
||||
Reference in New Issue
Block a user