Fixed a number of issues
This commit is contained in:
@@ -41,7 +41,7 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
<body class="bg-gradient-to-br from-base-100 via-base-200 to-base-100">
|
||||
<body class="bg-linear-to-br from-base-100 via-base-200 to-base-100">
|
||||
<div class="drawer lg:drawer-open">
|
||||
<input id="my-drawer-2" type="checkbox" class="drawer-toggle" />
|
||||
<div class="drawer-content flex flex-col">
|
||||
@@ -54,38 +54,38 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
</div>
|
||||
<div class="flex-1 px-2 flex items-center gap-2">
|
||||
<img src="/src/assets/logo.webp" alt="Chronus" class="h-8 w-8" />
|
||||
<span class="text-xl font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent">Chronus</span>
|
||||
<span class="text-xl font-bold bg-linear-to-r from-primary to-secondary bg-clip-text text-transparent">Chronus</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Page content here -->
|
||||
<main class="p-6 md:p-8">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-side z-50">
|
||||
<label for="my-drawer-2" aria-label="close sidebar" class="drawer-overlay"></label>
|
||||
<label for="my-drawer-2" aria-label="close sidebar" class="drawer-overlay"></label>
|
||||
<ul class="menu bg-base-200 min-h-full w-80 p-4">
|
||||
<!-- Sidebar content here -->
|
||||
<li class="mb-6">
|
||||
<a href="/dashboard" class="flex items-center gap-3 text-2xl font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent pointer-events-none">
|
||||
<a href="/dashboard" class="flex items-center gap-3 text-2xl font-bold bg-linear-to-r from-primary to-secondary bg-clip-text text-transparent pointer-events-none">
|
||||
<img src="/src/assets/logo.webp" alt="Chronus" class="h-10 w-10" />
|
||||
Chronus
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
{/* Team Switcher */}
|
||||
{userMemberships.length > 0 && (
|
||||
<li class="mb-4">
|
||||
<div class="form-control">
|
||||
<select
|
||||
<select
|
||||
class="select select-bordered w-full font-semibold"
|
||||
id="team-switcher"
|
||||
onchange="document.cookie = 'currentTeamId=' + this.value + '; path=/'; window.location.reload();"
|
||||
>
|
||||
{userMemberships.map(({ membership, organization }) => (
|
||||
<option
|
||||
value={organization.id}
|
||||
<option
|
||||
value={organization.id}
|
||||
selected={organization.id === currentTeamId}
|
||||
>
|
||||
{organization.name}
|
||||
@@ -95,7 +95,7 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
</div>
|
||||
</li>
|
||||
)}
|
||||
|
||||
|
||||
{userMemberships.length === 0 && (
|
||||
<li class="mb-4">
|
||||
<a href="/dashboard/organizations/new" class="btn btn-primary btn-sm">
|
||||
@@ -104,9 +104,9 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
</a>
|
||||
</li>
|
||||
)}
|
||||
|
||||
|
||||
<div class="divider my-2"></div>
|
||||
|
||||
|
||||
<li><a href="/dashboard">
|
||||
<Icon name="heroicons:home" class="w-5 h-5" />
|
||||
Dashboard
|
||||
@@ -127,7 +127,7 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
<Icon name="heroicons:user-group" class="w-5 h-5" />
|
||||
Team
|
||||
</a></li>
|
||||
|
||||
|
||||
{user.isSiteAdmin && (
|
||||
<>
|
||||
<div class="divider"></div>
|
||||
@@ -137,13 +137,13 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
</a></li>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="/dashboard/settings" class="flex items-center gap-3 bg-base-100 hover:bg-base-300 rounded-lg p-3">
|
||||
<div class="avatar placeholder">
|
||||
<div class="bg-gradient-to-br from-primary via-secondary to-accent text-primary-content rounded-full w-10 ring ring-primary ring-offset-base-100 ring-offset-2">
|
||||
<div class="bg-linear-to-br from-primary via-secondary to-accent text-primary-content rounded-full w-10 ring ring-primary ring-offset-base-100 ring-offset-2">
|
||||
<span class="text-sm font-bold">{user.name.charAt(0).toUpperCase()}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,7 +154,7 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
<Icon name="heroicons:chevron-right" class="w-4 h-4 opacity-50" />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<form action="/api/auth/logout" method="POST">
|
||||
<button type="submit" class="w-full text-error hover:bg-error/10">
|
||||
@@ -164,7 +164,7 @@ const currentTeam = userMemberships.find(m => m.organization.id === currentTeamI
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user