Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove padding and box around the console #1976

Merged
merged 1 commit into from
Mar 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 8 additions & 33 deletions lib/nerves_hub_web/components/device_page/console.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,16 @@ defmodule NervesHubWeb.Components.DevicePage.Console do
def render(assigns) do
~H"""
<div class="size-full">
<div :if={authorized?(:"device:console", @org_user) && @console_active?} class="flex flex-col size-full items-start justify-between">
<div id="console-and-chat" class="size-full flex gap-4 p-6" phx-update="ignore">
<div class="flex flex-col w-full bg-zinc-900 border border-zinc-700 rounded">
<div class="flex justify-between items-center h-14 px-4 border-b border-zinc-700">
<div id="console-title" class="text-base text-neutral-50 font-medium">Console</div>
</div>
<div id="dropzone" class="grow flex p-6 gap-6">
<div id="console" phx-hook="Console" data-user-token={@user_token} data-device-id={@device.id} class="w-full h-full"></div>
</div>
<div class="flex flex-col size-full items-start justify-between">
<div id="console-and-chat" class="size-full flex bg-black p-12" phx-update="ignore" style="background-color: rgb(14, 16, 25);">
<div :if={authorized?(:"device:console", @org_user) && @console_active?} id="dropzone" class="grow">
<div id="console" phx-hook="Console" data-user-token={@user_token} data-device-id={@device.id} class="w-full h-full"></div>
</div>
</div>
</div>

<div :if={authorized?(:"device:console", @org_user) && !@console_active?} class="flex flex-col size-full items-start justify-between">
<div id="console-and-chat" class="size-full flex gap-4 p-6" phx-update="ignore">
<div class="flex flex-col w-full bg-zinc-900 border border-zinc-700 rounded">
<div class="flex justify-between items-center h-14 px-4 border-b border-zinc-700">
<div class="text-base text-neutral-50 font-medium">Console</div>
</div>
<div class="grow flex justify-center items-center p-6 gap-6 text-medium">
The device console isn't currently available.
</div>
<div :if={authorized?(:"device:console", @org_user) && !@console_active?} class="grow flex justify-center items-center p-6 gap-6 text-medium font-mono">
The device console isn't currently available.
</div>
</div>
</div>

<div :if={!authorized?(:"device:console", @org_user)} class="flex flex-col size-full items-start justify-between">
<div id="console-and-chat" class="size-full flex gap-4 p-6" phx-update="ignore">
<div class="flex flex-col w-full bg-zinc-900 border border-zinc-700 rounded">
<div class="flex justify-between items-center h-14 px-4 border-b border-zinc-700">
<div class="text-base text-neutral-50 font-medium">Console</div>
</div>
<div class="grow flex justify-center items-center p-6 gap-6 text-medium text-red-500">
You don't have the required permissions to access a Device console.
</div>
<div :if={!authorized?(:"device:console", @org_user)} class="grow flex justify-center items-center p-6 gap-6 text-medium text-red-500 font-mono">
You don't have the required permissions to access a Device console.
</div>
</div>
</div>
Expand Down
Loading