Adding show Teams Key button (#1993)

This commit is contained in:
Paulo Valim 2023-06-23 21:41:58 +02:00 committed by GitHub
parent 0a190729ec
commit d744f5727c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,16 +34,26 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
~H"""
<div id={"#{@id}-component"}>
<div class="mb-8">
<div class="flex relative mb-8">
<div class="flex justify-between">
<LayoutHelpers.title text={"#{@hub.hub_emoji} #{@hub.hub_name}"} />
<button
id="delete-hub"
phx-click={JS.push("delete_hub", value: %{id: @hub.id})}
class="absolute right-0 button-base button-red"
>
Delete hub
</button>
<div class="flex justify-end gap-2">
<button
phx-click={show_modal("show-key-modal")}
phx-target={@myself}
class="button-base button-gray"
>
<span class="hidden sm:block">Teams key</span>
<.remix_icon icon="key-2-fill" class="text-xl sm:hidden" />
</button>
<button
phx-click={JS.push("delete_hub", value: %{id: @hub.id})}
class="button-base button-red"
>
<span class="hidden sm:block">Delete hub</span>
<.remix_icon icon="delete-bin-line" class="text-lg sm:hidden" />
</button>
</div>
</div>
<div class="flex flex-col space-y-10">
@ -93,13 +103,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
</div>
</div>
<.modal
:if={@show_key}
id="show-key-modal"
width={:medium}
show={true}
patch={~p"/hub/#{@hub.id}"}
>
<.modal show={@show_key} id="show-key-modal" width={:medium} patch={~p"/hub/#{@hub.id}"}>
<div class="p-6 flex flex-col space-y-5">
<h3 class="text-2xl font-semibold text-gray-800">
Teams Key