mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-11 06:32:23 +08:00
Adjust mobile layout on the settings page (#1421)
Co-authored-by: José Valim <jose.valim@gmail.com> Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
This commit is contained in:
parent
620516eec2
commit
854fc203e0
2 changed files with 24 additions and 20 deletions
|
|
@ -291,22 +291,24 @@ defmodule LivebookWeb.LiveHelpers do
|
||||||
)
|
)
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
<div class="flex space-x-3 items-center justify-between">
|
<div class="flex items-center gap-1 justify-between">
|
||||||
<%= if @label do %>
|
<%= if @label do %>
|
||||||
<span class="text-gray-700"><%= @label %></span>
|
<span class="text-gray-700"><%= @label %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<label class={"switch-button #{if(@disabled, do: "switch-button--disabled")}"}>
|
<div>
|
||||||
<input type="hidden" value="false" name={@name} />
|
<label class={"switch-button #{if(@disabled, do: "switch-button--disabled")}"}>
|
||||||
<input
|
<input type="hidden" value="false" name={@name} />
|
||||||
type="checkbox"
|
<input
|
||||||
value="true"
|
type="checkbox"
|
||||||
class={"switch-button__checkbox #{@class}"}
|
value="true"
|
||||||
name={@name}
|
class={"switch-button__checkbox #{@class}"}
|
||||||
checked={@checked}
|
name={@name}
|
||||||
{@attrs}
|
checked={@checked}
|
||||||
/>
|
{@attrs}
|
||||||
<div class="switch-button__bg"></div>
|
/>
|
||||||
</label>
|
<div class="switch-button__bg"></div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ defmodule LivebookWeb.SettingsLive do
|
||||||
<h2 class="text-xl text-gray-800 font-medium">
|
<h2 class="text-xl text-gray-800 font-medium">
|
||||||
About
|
About
|
||||||
</h2>
|
</h2>
|
||||||
<div class="flex items-center justify-between border border-gray-200 rounded-lg p-4">
|
<div class="flex flex-col md:flex-row gap-4 md:gap-12 items-center justify-center md:justify-between border border-gray-200 rounded-lg p-4">
|
||||||
<div class="flex items-center space-x-12">
|
<div class="flex justify-center md:items-center space-x-12">
|
||||||
<%= if app_name = Livebook.Config.app_service_name() do %>
|
<%= if app_name = Livebook.Config.app_service_name() do %>
|
||||||
<.labeled_text label="Application">
|
<.labeled_text label="Application">
|
||||||
<%= if app_url = Livebook.Config.app_service_url() do %>
|
<%= if app_url = Livebook.Config.app_service_url() do %>
|
||||||
|
|
@ -71,11 +71,13 @@ defmodule LivebookWeb.SettingsLive do
|
||||||
</.labeled_text>
|
</.labeled_text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= live_redirect to: Routes.live_dashboard_path(@socket, :home),
|
<div class="self-center">
|
||||||
class: "button-base button-outlined-gray" do %>
|
<%= live_redirect to: Routes.live_dashboard_path(@socket, :home),
|
||||||
<.remix_icon icon="dashboard-2-line" class="align-middle mr-1" />
|
class: "button-base button-outlined-gray" do %>
|
||||||
<span>Open dashboard</span>
|
<.remix_icon icon="dashboard-2-line" class="align-middle mr-1" />
|
||||||
<% end %>
|
<span>Open dashboard</span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Updates -->
|
<!-- Updates -->
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue