mirror of
https://github.com/ClaperCo/Claper.git
synced 2026-09-02 12:15:42 +02:00
186 lines
7.4 KiB
Plaintext
186 lines
7.4 KiB
Plaintext
<div class="drawer lg:drawer-open">
|
|
<input id="drawer-toggle" type="checkbox" class="drawer-toggle" />
|
|
|
|
<div class="drawer-content flex flex-col min-h-screen">
|
|
<!-- Navbar for mobile -->
|
|
<div class="navbar lg:hidden bg-base-100 shadow-md">
|
|
<div class="flex-none">
|
|
<label for="drawer-toggle" class="btn btn-square btn-ghost drawer-button">
|
|
<svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
fill="none"
|
|
viewBox="0 0 24 24"
|
|
class="inline-block w-5 h-5 stroke-current"
|
|
>
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M4 6h16M4 12h16M4 18h16"
|
|
>
|
|
</path>
|
|
</svg>
|
|
</label>
|
|
</div>
|
|
<div class="flex-1">
|
|
<a href={~p"/admin"} class="btn btn-ghost normal-case text-xl">
|
|
<img src="/images/logo.svg" class="h-10 mr-2" /> {gettext("Admin")}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Page content -->
|
|
<main class="flex-1 overflow-y-auto bg-base-200 p-4 lg:p-6">
|
|
<div class="toast toast-bottom toast-center z-50">
|
|
<%= if Phoenix.Flash.get(@flash, :info) do %>
|
|
<ClaperWeb.Component.Alert.info message={Phoenix.Flash.get(@flash, :info)} />
|
|
<% end %>
|
|
|
|
<%= if Phoenix.Flash.get(@flash, :error) do %>
|
|
<ClaperWeb.Component.Alert.error message={Phoenix.Flash.get(@flash, :error)} />
|
|
<% end %>
|
|
</div>
|
|
<div class="p-4 md:p-6">
|
|
{@inner_content}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- Sidebar -->
|
|
<div class="drawer-side">
|
|
<label for="drawer-toggle" class="drawer-overlay"></label>
|
|
<aside class="bg-base-100 min-h-full px-4">
|
|
<div class="flex items-center p-5 gap-x-3">
|
|
<img src="/images/logo.svg" class="h-10" />
|
|
<h1 class="text-xl font-bold !font-display">{gettext("Admin")}</h1>
|
|
</div>
|
|
<ul class="menu">
|
|
<li>
|
|
<.link navigate={~p"/admin"} class={admin_active(@active_tab, :dashboard)}>
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
|
|
/>
|
|
</svg>
|
|
{gettext("Dashboard")}
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link navigate={~p"/admin/events"} class={admin_active(@active_tab, :events)}>
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
/>
|
|
</svg>
|
|
{gettext("Events")}
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link navigate={~p"/admin/users"} class={admin_active(@active_tab, :users)}>
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"
|
|
/>
|
|
</svg>
|
|
{gettext("Users")}
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link navigate={~p"/admin/audit_logs"} class={admin_active(@active_tab, :audit_logs)}>
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
/>
|
|
</svg>
|
|
{gettext("Audit Logs")}
|
|
</.link>
|
|
</li>
|
|
<%!-- <li>
|
|
<.link navigate={~p"/admin/oidc_providers"} class={admin_active(@active_tab, :oidc_providers)}>
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"
|
|
/>
|
|
</svg>
|
|
{gettext("OIDC Providers")}
|
|
</.link>
|
|
</li> --%>
|
|
<li>
|
|
<.link navigate={~p"/admin/settings"} class={admin_active(@active_tab, :settings)}>
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
|
|
/>
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
/>
|
|
</svg>
|
|
{gettext("Settings")}
|
|
</.link>
|
|
</li>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<li>
|
|
<a href="https://docs.claper.co" target="_blank" rel="noopener noreferrer">
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
|
|
/>
|
|
</svg>
|
|
{gettext("Documentation")}
|
|
<svg class="w-3 h-3 ml-auto" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
/>
|
|
</svg>
|
|
</a>
|
|
</li>
|
|
|
|
<div class="mt-auto pt-4">
|
|
<li>
|
|
<a href={~p"/events"} class="btn btn-outline btn-sm">
|
|
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
/>
|
|
</svg>
|
|
{gettext("Back to app")}
|
|
</a>
|
|
</li>
|
|
</div>
|
|
</ul>
|
|
</aside>
|
|
</div>
|
|
</div>
|