mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-10 15:04:25 +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"""
|
~H"""
|
||||||
<div id={"#{@id}-component"}>
|
<div id={"#{@id}-component"}>
|
||||||
<div class="mb-8">
|
<div class="mb-8">
|
||||||
<div class="flex relative mb-8">
|
<div class="flex justify-between">
|
||||||
<LayoutHelpers.title text={"#{@hub.hub_emoji} #{@hub.hub_name}"} />
|
<LayoutHelpers.title text={"#{@hub.hub_emoji} #{@hub.hub_name}"} />
|
||||||
|
|
||||||
<button
|
<div class="flex justify-end gap-2">
|
||||||
id="delete-hub"
|
<button
|
||||||
phx-click={JS.push("delete_hub", value: %{id: @hub.id})}
|
phx-click={show_modal("show-key-modal")}
|
||||||
class="absolute right-0 button-base button-red"
|
phx-target={@myself}
|
||||||
>
|
class="button-base button-gray"
|
||||||
Delete hub
|
>
|
||||||
</button>
|
<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>
|
||||||
|
|
||||||
<div class="flex flex-col space-y-10">
|
<div class="flex flex-col space-y-10">
|
||||||
|
@ -93,13 +103,7 @@ defmodule LivebookWeb.Hub.Edit.TeamComponent do
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.modal
|
<.modal show={@show_key} id="show-key-modal" width={:medium} patch={~p"/hub/#{@hub.id}"}>
|
||||||
:if={@show_key}
|
|
||||||
id="show-key-modal"
|
|
||||||
width={:medium}
|
|
||||||
show={true}
|
|
||||||
patch={~p"/hub/#{@hub.id}"}
|
|
||||||
>
|
|
||||||
<div class="p-6 flex flex-col space-y-5">
|
<div class="p-6 flex flex-col space-y-5">
|
||||||
<h3 class="text-2xl font-semibold text-gray-800">
|
<h3 class="text-2xl font-semibold text-gray-800">
|
||||||
Teams Key
|
Teams Key
|
||||||
|
|
Loading…
Add table
Reference in a new issue