Switch dev port to 3000, drop dashboard quick actions and header active highlight
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@ -1,14 +1,7 @@
|
||||
<script>
|
||||
import { locale, t, toggleLocale } from '$lib/i18n/store.js';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
$: lang = $locale;
|
||||
$: path = $page.url.pathname;
|
||||
|
||||
function isActive(prefix) {
|
||||
if (prefix === '/') return path === '/';
|
||||
return path === prefix || path.startsWith(prefix + '/');
|
||||
}
|
||||
</script>
|
||||
|
||||
<header class="header">
|
||||
@ -20,11 +13,11 @@
|
||||
</a>
|
||||
|
||||
<nav class="nav">
|
||||
<a href="/" class:active={isActive('/')}>{$t('nav.dashboard')}</a>
|
||||
<a href="/parts" class:active={isActive('/parts')}>{$t('nav.parts')}</a>
|
||||
<a href="/movements/new" class:active={isActive('/movements')}>{$t('nav.movements')}</a>
|
||||
<a href="/suppliers" class:active={isActive('/suppliers')}>{$t('nav.suppliers')}</a>
|
||||
<a href="/admin" class:active={isActive('/admin')}>{$t('nav.admin')}</a>
|
||||
<a href="/">{$t('nav.dashboard')}</a>
|
||||
<a href="/parts">{$t('nav.parts')}</a>
|
||||
<a href="/movements/new">{$t('nav.movements')}</a>
|
||||
<a href="/suppliers">{$t('nav.suppliers')}</a>
|
||||
<a href="/admin">{$t('nav.admin')}</a>
|
||||
</nav>
|
||||
|
||||
<button class="lang" type="button" on:click={toggleLocale} aria-label="Switch language">
|
||||
@ -84,12 +77,6 @@
|
||||
border-color: rgba(255,255,255,0.4);
|
||||
}
|
||||
.nav a:active { transform: translateY(1px); }
|
||||
.nav a.active {
|
||||
background: #fff;
|
||||
color: #b00d27;
|
||||
border-color: #fff;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.18);
|
||||
}
|
||||
.lang {
|
||||
background: rgba(255,255,255,0.12);
|
||||
color: inherit;
|
||||
|
||||
@ -44,8 +44,7 @@
|
||||
"low_stock": "At or below reorder level",
|
||||
"inventory_value": "Inventory value (at cost)",
|
||||
"low_stock_list": "Low stock",
|
||||
"recent_movements": "Recent movements",
|
||||
"quick_actions": "Quick actions"
|
||||
"recent_movements": "Recent movements"
|
||||
},
|
||||
"parts": {
|
||||
"title": "Parts",
|
||||
|
||||
@ -44,8 +44,7 @@
|
||||
"low_stock": "Дар сатҳи фармоиш ё камтар",
|
||||
"inventory_value": "Арзиши захира (бо нархи харид)",
|
||||
"low_stock_list": "Захираи кам",
|
||||
"recent_movements": "Ҳаракатҳои охирин",
|
||||
"quick_actions": "Амалҳои тез"
|
||||
"recent_movements": "Ҳаракатҳои охирин"
|
||||
},
|
||||
"parts": {
|
||||
"title": "Қисмҳо",
|
||||
|
||||
@ -26,13 +26,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card quick">
|
||||
<strong>{$t('dashboard.quick_actions')}</strong>
|
||||
<a href="/parts/new">{$t('nav.new_part')}</a>
|
||||
<a href="/movements/new">{$t('nav.new_movement')}</a>
|
||||
<a href="/parts">{$t('nav.parts')}</a>
|
||||
</div>
|
||||
|
||||
<h2>{$t('dashboard.low_stock_list')}</h2>
|
||||
{#if lowStock.length === 0}
|
||||
<p class="muted">{$t('common.none')}</p>
|
||||
@ -103,7 +96,4 @@
|
||||
}
|
||||
.stat .value.warn { color: #b8443f; }
|
||||
.stat .cur { font-size: 0.85rem; color: #6b7388; margin-left: 0.25rem; }
|
||||
|
||||
.quick { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }
|
||||
.quick strong { margin-right: auto; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user