mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-07 05:24:40 +08:00
Adding show Teams Key button (#1993)
This commit is contained in:
parent
0a190729ec
commit
d744f5727c
1 changed files with 19 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue