From b0fd445291acc98a5da4e7fed6395d6ec608976e Mon Sep 17 00:00:00 2001 From: Paulo Valim Date: Tue, 30 May 2023 12:01:24 +0200 Subject: [PATCH] Second step of the onboarding (#1935) --- assets/tailwind.config.js | 1 + lib/livebook_web/live/hub/new_live.ex | 91 ++++++++++++++++++--------- 2 files changed, 63 insertions(+), 29 deletions(-) diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js index 2a09fa110..ed68d6437 100644 --- a/assets/tailwind.config.js +++ b/assets/tailwind.config.js @@ -100,6 +100,7 @@ module.exports = { 800: "#854D0E", 900: "#713F12", }, + "brand-pink": "#e44c75", }, }, }, diff --git a/lib/livebook_web/live/hub/new_live.ex b/lib/livebook_web/live/hub/new_live.ex index d478ab9ff..f28b489d2 100644 --- a/lib/livebook_web/live/hub/new_live.ex +++ b/lib/livebook_web/live/hub/new_live.ex @@ -86,7 +86,7 @@ defmodule LivebookWeb.Hub.NewLive do def render(assigns) do ~H""" -
+

@@ -137,23 +137,32 @@ defmodule LivebookWeb.Hub.NewLive do label="Livebook Teams Key" /> -

- <%= @request_code_info %> - - <.link navigate={@verification_uri} target="_blank" class="font-bold text-blue-500"> - <%= @verification_uri %> - - - <%= @org.user_code %> -
- + +
+
+ + <%= @request_code_info %> + + <.link> +
+ + Visit Livebook Teams + + + and paste the code below + +
+ + <.copyclip content={@org.user_code} /> +
+
@@ -161,6 +170,34 @@ defmodule LivebookWeb.Hub.NewLive do """ end + defp copyclip(assigns) do + ~H""" +
+ + +
<%= @content %>
+ + +
+ """ + end + defp tab_button(assigns) do ~H"""
  • @@ -178,19 +215,17 @@ defmodule LivebookWeb.Hub.NewLive do "group button flex w-full sm:w-72 items-center justify-center gap-1 md:gap-2 rounded-lg border py-3 md:py-2.5 px-5 transition-opacity duration-100", selected_tab_button(@id, @selected) ]}> - - <.remix_icon - icon={@icon} - class={[ - "group-hover:text-blue-500 text-lg", - if @selected == @id do - "text-blue-500" - else - "text-gray-500" - end - ]} - /> - + <.remix_icon + icon={@icon} + class={[ + "group-hover:text-blue-600 text-lg", + if @selected == @id do + "text-blue-600" + else + "text-gray-500" + end + ]} + /> <%= @title %> @@ -313,8 +348,7 @@ defmodule LivebookWeb.Hub.NewLive do |> assign( org: org, button_label: "Join", - request_code_info: - "Access the following URL and input the User Code below to confirm the Organization creation." + request_code_info: "Authenticate with your organization" ) |> assign_form(changeset) end @@ -327,8 +361,7 @@ defmodule LivebookWeb.Hub.NewLive do |> assign( org: org, button_label: "Create", - request_code_info: - "Access the following URL and input the User Code below to confirm to join an Organization." + request_code_info: "Verify your new organization" ) |> assign_form(changeset) end