Skip to content
Merged
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
5 changes: 5 additions & 0 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export const routes: Routes = [
loadComponent: () => import('./components/profile/profile').then(m => m.ProfileComponent),
canActivate: [authGuard]
},
{
path: 'integrations',
loadComponent: () => import('./components/integrations-page/integrations-page').then(m => m.IntegrationsPageComponent),
canActivate: [authGuard]
},
{
path: 'workspace/create',
component: CreateWorkspace,
Expand Down
104 changes: 68 additions & 36 deletions src/app/components/app-nav/app-nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,101 @@
display: block;
}

.app-nav {
/* ── Sidebar shell ───────────────────────────────────────── */

.sidebar {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 220px;
z-index: 100;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 28px;
background: rgba(5, 5, 5, 0.88);
flex-direction: column;
padding: 20px 12px;
background: rgba(5, 5, 5, 0.94);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
border-right: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Brand ───────────────────────────────────────────────── */

.nav-brand {
.sidebar-brand {
display: inline-flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: #f7f7f7;
font-size: 17px;
font-size: 16px;
font-weight: 800;
letter-spacing: -0.02em;
padding: 6px 8px;
margin-bottom: 28px;
flex-shrink: 0;
}

.nav-brand-icon {
width: 32px;
height: 32px;
border-radius: 8px;
.sidebar-brand-icon {
width: 30px;
height: 30px;
border-radius: 7px;
background: #f7f7f7;
color: #050505;
display: grid;
place-items: center;
flex-shrink: 0;
}

/* ── Links ───────────────────────────────────────────────── */
/* ── Nav links ───────────────────────────────────────────── */

.nav-links {
.sidebar-links {
display: flex;
align-items: center;
gap: 6px;
flex-direction: column;
gap: 2px;
flex: 1;
}

.nav-link {
.sidebar-link {
position: relative;
display: inline-flex;
display: flex;
align-items: center;
gap: 7px;
gap: 10px;
text-decoration: none;
color: rgba(247, 247, 247, 0.65);
color: rgba(247, 247, 247, 0.55);
font-size: 14px;
font-weight: 600;
padding: 6px 12px;
border-radius: 8px;
padding: 9px 10px;
border-radius: 9px;
transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
.sidebar-link svg {
flex-shrink: 0;
opacity: 0.7;
}

.sidebar-link:hover {
color: #f7f7f7;
background: rgba(255, 255, 255, 0.07);
}

.nav-link.active {
.sidebar-link:hover svg {
opacity: 1;
}

.sidebar-link.active {
color: #f7f7f7;
background: rgba(255, 255, 255, 0.1);
}

.sidebar-link.active svg {
opacity: 1;
}

/* ── Unread badge ────────────────────────────────────────── */

.nav-badge {
.sidebar-badge {
margin-left: auto;
display: inline-flex;
align-items: center;
justify-content: center;
Expand All @@ -94,21 +113,34 @@

/* ── Logout ──────────────────────────────────────────────── */

.nav-logout {
border: 1px solid rgba(255, 255, 255, 0.18);
.sidebar-logout {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
border: none;
background: transparent;
color: rgba(247, 247, 247, 0.65);
border-radius: 8px;
padding: 6px 12px;
color: rgba(247, 247, 247, 0.45);
font-size: 14px;
font-weight: 600;
padding: 9px 10px;
border-radius: 9px;
cursor: pointer;
transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
margin-left: 6px;
transition: color 0.15s ease, background 0.15s ease;
flex-shrink: 0;
text-align: left;
}

.sidebar-logout svg {
flex-shrink: 0;
opacity: 0.6;
}

.nav-logout:hover {
.sidebar-logout:hover {
color: #f7f7f7;
background: rgba(255, 255, 255, 0.07);
border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-logout:hover svg {
opacity: 1;
}
49 changes: 38 additions & 11 deletions src/app/components/app-nav/app-nav.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,51 @@
<nav class="app-nav">
<a routerLink="/dashboard" class="nav-brand" aria-label="Sentinent home">
<div class="nav-brand-icon" aria-hidden="true">
<svg width="18" height="18" viewBox="0 0 32 32" fill="currentColor">
<nav class="sidebar">
<a routerLink="/dashboard" class="sidebar-brand" aria-label="Sentinent home">
<div class="sidebar-brand-icon" aria-hidden="true">
<svg width="16" height="16" viewBox="0 0 32 32" fill="currentColor">
<rect x="4" y="6" width="20" height="8" rx="1.5"></rect>
<rect x="8" y="18" width="20" height="8" rx="1.5"></rect>
</svg>
</div>
<span>Sentinent</span>
</a>

<div class="nav-links">
<a routerLink="/dashboard" routerLinkActive="active" class="nav-link">Dashboard</a>

<a routerLink="/profile" routerLinkActive="active" class="nav-link nav-profile-link">
Profile
<span class="nav-badge" *ngIf="unreadCount > 0" aria-label="{{ unreadCount }} unread signals">
<div class="sidebar-links">
<a routerLink="/dashboard" routerLinkActive="active" class="sidebar-link">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="3" width="7" height="7"></rect>
<rect x="14" y="3" width="7" height="7"></rect>
<rect x="3" y="14" width="7" height="7"></rect>
<rect x="14" y="14" width="7" height="7"></rect>
</svg>
<span>Dashboard</span>
<span class="sidebar-badge" *ngIf="unreadCount > 0" aria-label="{{ unreadCount }} unread signals">
{{ badgeLabel }}
</span>
</a>

<button type="button" class="nav-logout" (click)="logout()">Logout</button>
<a routerLink="/integrations" routerLinkActive="active" class="sidebar-link">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
</svg>
<span>Integrations</span>
</a>

<a routerLink="/profile" routerLinkActive="active" class="sidebar-link">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle>
</svg>
<span>Profile</span>
</a>
</div>

<button type="button" class="sidebar-logout" (click)="logout()">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
<polyline points="16 17 21 12 16 7"></polyline>
<line x1="21" y1="12" x2="9" y2="12"></line>
</svg>
<span>Logout</span>
</button>
</nav>
7 changes: 6 additions & 1 deletion src/app/components/dashboard/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
position: relative;
z-index: 1;
min-height: 100vh;
padding-top: 56px;
margin-left: 220px;
}

.hero {
Expand Down Expand Up @@ -565,6 +565,11 @@
}

@media (max-width: 768px) {
.dashboard-shell {
margin-left: 0;
padding-top: 56px;
}

.hero,
.content {
padding-left: 18px;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/dashboard/dashboard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('Dashboard', () => {
});

it('should call logout on button click', () => {
const button = fixture.nativeElement.querySelector('.nav-logout') as HTMLButtonElement;
const button = fixture.nativeElement.querySelector('.sidebar-logout') as HTMLButtonElement;
button.click();
expect(mockAuthService.logout).toHaveBeenCalled();
});
Expand Down
Loading
Loading