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

add full width to dashboard player and adjust other live views #374

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
</div>
</aside>
</header>
<main class="px-4 py-20 sm:px-6 lg:px-8 bg-gray-300 dark:bg-gray-800">
<main class="py-3 sm:px-6 lg:px-8 bg-gray-300 dark:bg-gray-800">
<div class="flex justify-center mx-auto sm:ml-64 bg-gray-300 dark:bg-gray-800">
<.flash_group flash={@flash} />
<%= @inner_content %>
Expand Down
6 changes: 3 additions & 3 deletions apps/ex_nvr_web/lib/ex_nvr_web/live/dashboard_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule ExNVRWeb.DashboardLive do

def render(assigns) do
~H"""
<div class="bg-gray-300 sm:w-2/3 dark:bg-gray-800">
<div class="bg-gray-300 w-full h-svh dark:bg-gray-800 mb-12 overflow-hidden">
<div :if={@devices == []} class="grid tracking-wide text-lg text-center dark:text-gray-200">
You have no devices, you can create one
<span><.link href={~p"/devices"} class="ml-2 dark:text-blue-600">here</.link></span>
Expand Down Expand Up @@ -78,11 +78,11 @@ defmodule ExNVRWeb.DashboardLive do
</div>
</div>

<div class="relative mt-4">
<div class="relative h-svh">
<div :if={@live_view_enabled?} class="relative">
<video
id="live-video"
class="w-full h-auto dark:bg-gray-500 rounded-tr rounded-tl"
class="z-10 w-auto min-w-full min-h-full max-w-none dark:bg-gray-500 rounded-tr rounded-tl"
autoplay
controls
muted
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/lib/ex_nvr_web/live/device_list_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule ExNVRWeb.DeviceListLive do

def render(assigns) do
~H"""
<div class="grow">
<div class="grow mt-20">
<div :if={@current_user.role == :admin} class="ml-4 sm:ml-0">
<.link href={~p"/devices/new"}>
<.button>Add device</.button>
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/lib/ex_nvr_web/live/device_live.html.heex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="grow max-w-2xl">
<div class="grow max-w-2xl mt-20">
<div class="px-6 lg:px-8 bg-gray-300 dark:bg-gray-800">
<h3
:if={@device.id == nil}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="container mx-auto p-4">
<div class="container mt-20 mx-auto p-4">
<div class="flex flex-wrap items-stretch justify-between content-between mb-4 gap-2">
<!-- Discover devices -->
<.card class="w-full md:w-1/3 bg-gray-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule ExNVRWeb.RecordingListLive do
@impl true
def render(assigns) do
~H"""
<div class="grow">
<div class="grow mt-20">
<.filter_form meta={@meta} devices={@devices} id="recording-filter-form" />

<Flop.Phoenix.table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule ExNVRWeb.RemoteStorageListLive do

def render(assigns) do
~H"""
<div class="grow">
<div class="grow mt-20">
<div class="ml-4 sm:ml-0">
<.link href={~p"/remote-storages/new"}>
<.button>Add remote storage</.button>
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/lib/ex_nvr_web/live/remote_storage_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule ExNVRWeb.RemoteStorageLive do

def render(assigns) do
~H"""
<div class="grow max-w-2xl">
<div class="grow max-w-2xl mt-20">
<div class="px-6 lg:px-8 bg-gray-300 dark:bg-gray-800">
<h3
:if={@remote_storage.id == nil}
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/lib/ex_nvr_web/live/user_list_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule ExNVRWeb.UserListLive do

def render(assigns) do
~H"""
<div class="grow">
<div class="grow mt-20">
<div :if={@current_user.role == :admin} class="ml-4 sm:ml-0">
<.link href={~p"/users/new"}>
<.button>Add User</.button>
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/lib/ex_nvr_web/live/user_live.html.heex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="grow max-w-2xl">
<div class="grow max-w-2xl mt-20">
<div class="px-6 lg:px-8 bg-gray-300 dark:bg-gray-800">
<h3
:if={@user.id == nil}
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/lib/ex_nvr_web/live/user_settings_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule ExNVRWeb.UserSettingsLive do

def render(assigns) do
~H"""
<div class="grow max-w-3xl">
<div class="grow max-w-3xl mt-20">
<.header class="text-center">
Account Settings
<:subtitle>Manage your account email address and password settings</:subtitle>
Expand Down