Compare commits
5 Commits
fix/header
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 26cf978e3c | |||
|
|
dbffefc26f | ||
| 5ab8ef3ba8 | |||
|
|
235b40b326 | ||
| 13b3b1a257 |
@@ -227,7 +227,7 @@ All responses are JSON. Authenticated endpoints require the `fw_auth` cookie.
|
|||||||
Each package has its own version (`apps/backend/package.json` and `apps/frontend/package.json`). The app footer shows both:
|
Each package has its own version (`apps/backend/package.json` and `apps/frontend/package.json`). The app footer shows both:
|
||||||
|
|
||||||
```
|
```
|
||||||
frontend v0.1.0 · backend v0.1.0
|
frontend v0.3.4 · backend v0.3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Bump them per semver on each change:
|
Bump them per semver on each change:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@family-wishlist/backend",
|
"name": "@family-wishlist/backend",
|
||||||
"version": "0.1.0",
|
"version": "0.3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@family-wishlist/frontend",
|
"name": "@family-wishlist/frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.3.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -58,6 +58,35 @@ export function Header() {
|
|||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
|
<div className="app-header__actions">
|
||||||
|
<LanguageSwitcher />
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
className="app-header__action"
|
||||||
|
onClick={() => navigate('/settings')}
|
||||||
|
title={t('header.profileSettings')}
|
||||||
|
aria-label={t('header.profileSettings')}
|
||||||
|
>
|
||||||
|
<UserCog className="h-4 w-4" />
|
||||||
|
<span className="app-header__action-text">{t('header.profile')}</span>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
className="app-header__action"
|
||||||
|
onClick={() => {
|
||||||
|
void logout().then(() => navigate('/login'));
|
||||||
|
}}
|
||||||
|
title={t('header.logout')}
|
||||||
|
aria-label={t('header.logout')}
|
||||||
|
>
|
||||||
|
<LogOut className="h-4 w-4" />
|
||||||
|
<span className="app-header__action-text">{t('header.logout')}</span>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<nav className="app-header__nav">
|
<nav className="app-header__nav">
|
||||||
{links.map((l) => (
|
{links.map((l) => (
|
||||||
<NavLink
|
<NavLink
|
||||||
@@ -90,35 +119,6 @@ export function Header() {
|
|||||||
</NavLink>
|
</NavLink>
|
||||||
)}
|
)}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div className="app-header__actions">
|
|
||||||
<LanguageSwitcher />
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
className="app-header__action"
|
|
||||||
onClick={() => navigate('/settings')}
|
|
||||||
title={t('header.profileSettings')}
|
|
||||||
aria-label={t('header.profileSettings')}
|
|
||||||
>
|
|
||||||
<UserCog className="h-4 w-4" />
|
|
||||||
<span className="app-header__action-text">{t('header.profile')}</span>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
className="app-header__action"
|
|
||||||
onClick={() => {
|
|
||||||
void logout().then(() => navigate('/login'));
|
|
||||||
}}
|
|
||||||
title={t('header.logout')}
|
|
||||||
aria-label={t('header.logout')}
|
|
||||||
>
|
|
||||||
<LogOut className="h-4 w-4" />
|
|
||||||
<span className="app-header__action-text">{t('header.logout')}</span>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
@apply mx-auto w-full max-w-6xl px-4 pt-6 sm:px-6 lg:px-8;
|
@apply mx-auto w-full max-w-6xl px-4 pt-6 sm:px-6 lg:px-8;
|
||||||
}
|
}
|
||||||
.app-header__inner {
|
.app-header__inner {
|
||||||
@apply grid grid-cols-1 items-center gap-3 rounded-lg border border-border bg-surface/80 px-4 py-3 backdrop-blur lg:grid-cols-[auto_minmax(0,1fr)_auto];
|
@apply flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border bg-surface/80 px-4 py-3 backdrop-blur;
|
||||||
}
|
}
|
||||||
.app-header__brand {
|
.app-header__brand {
|
||||||
@apply flex min-w-0 items-center gap-2;
|
@apply flex min-w-0 items-center gap-2;
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
@apply truncate text-xs text-muted;
|
@apply truncate text-xs text-muted;
|
||||||
}
|
}
|
||||||
.app-header__nav {
|
.app-header__nav {
|
||||||
@apply flex min-w-0 items-center gap-1 overflow-x-auto whitespace-nowrap lg:justify-center;
|
@apply mt-3 flex min-w-0 items-center gap-1 overflow-x-auto whitespace-nowrap rounded-lg border border-border bg-surface/80 px-4 py-2 backdrop-blur;
|
||||||
}
|
}
|
||||||
.app-header__nav-link {
|
.app-header__nav-link {
|
||||||
@apply inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-ink transition-colors hover:bg-ink/5;
|
@apply inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-ink transition-colors hover:bg-ink/5;
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
@apply bg-primary text-primary-foreground shadow-card hover:bg-primary;
|
@apply bg-primary text-primary-foreground shadow-card hover:bg-primary;
|
||||||
}
|
}
|
||||||
.app-header__actions {
|
.app-header__actions {
|
||||||
@apply flex shrink-0 items-center gap-1 justify-self-start whitespace-nowrap lg:justify-self-end;
|
@apply flex shrink-0 items-center gap-1 whitespace-nowrap;
|
||||||
}
|
}
|
||||||
.app-header__action {
|
.app-header__action {
|
||||||
@apply shrink-0;
|
@apply shrink-0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@family-wishlist/shared",
|
"name": "@family-wishlist/shared",
|
||||||
"version": "0.1.0",
|
"version": "0.3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user