upd
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<header class="app-header">
|
||||
<div class="header-ambient" aria-hidden="true" />
|
||||
<div class="header-inner">
|
||||
<div class="header-brand">
|
||||
<span class="brand-mark" />
|
||||
<h1 class="brand-title">TMC <em>Items Manager</em></h1>
|
||||
<svg class="brand-icon" width="22" height="16" viewBox="0 0 22 16" fill="none" aria-hidden="true">
|
||||
<rect x="0.75" y="0.75" width="20.5" height="14.5" rx="2" stroke="currentColor" stroke-width="1.4" />
|
||||
<line x1="11" y1="0.75" x2="11" y2="15.25" stroke="currentColor" stroke-width="1.4" />
|
||||
</svg>
|
||||
<span class="brand-tag">TMC</span>
|
||||
<span class="brand-sep" aria-hidden="true" />
|
||||
<h1 class="brand-title">Items <em>Manager</em></h1>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="header-meta-label">Item collection</span>
|
||||
<span class="header-vsep" aria-hidden="true" />
|
||||
<time class="header-date">{{ formattedDate }}</time>
|
||||
</div>
|
||||
<span class="header-label">Manage & organize</span>
|
||||
</div>
|
||||
</header>
|
||||
<main class="panels">
|
||||
@@ -35,7 +45,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, watch } from 'vue'
|
||||
import { computed, onMounted, watch } from 'vue'
|
||||
|
||||
const formattedDate = computed(() =>
|
||||
new Date().toLocaleDateString('en-US', { month: 'short', year: 'numeric' }),
|
||||
)
|
||||
|
||||
const {
|
||||
leftItems,
|
||||
@@ -50,7 +64,7 @@ const {
|
||||
fetchRight,
|
||||
selectItem,
|
||||
deselectItem,
|
||||
reorderSelected,
|
||||
reorderItem,
|
||||
addItem,
|
||||
} = useItems()
|
||||
|
||||
@@ -70,8 +84,8 @@ async function handleDeselect(id: number) {
|
||||
await deselectItem(id)
|
||||
}
|
||||
|
||||
async function handleReorder(ids: number[]) {
|
||||
await reorderSelected(ids)
|
||||
async function handleReorder(id: number, afterId: number | null): Promise<void> {
|
||||
await reorderItem(id, afterId)
|
||||
}
|
||||
|
||||
async function handleAdd(id: number) {
|
||||
@@ -89,39 +103,63 @@ async function handleAdd(id: number) {
|
||||
|
||||
.app-header {
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header-ambient {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: radial-gradient(ellipse 55% 180% at 0% 50%, rgba(252, 246, 228, 0.26) 0%, transparent 100%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 28px;
|
||||
height: 52px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.header-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
gap: 11px;
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: var(--text-primary);
|
||||
border-radius: 50%;
|
||||
.brand-icon {
|
||||
color: var(--text-primary);
|
||||
flex-shrink: 0;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.brand-tag {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.64rem;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.14em;
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.brand-sep {
|
||||
width: 1px;
|
||||
height: 15px;
|
||||
background: var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.brand-title {
|
||||
margin: 0;
|
||||
font-family: var(--font-serif);
|
||||
font-size: 1.05rem;
|
||||
font-size: 1.08rem;
|
||||
font-weight: 400;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: -0.02em;
|
||||
letter-spacing: -0.025em;
|
||||
line-height: 1;
|
||||
|
||||
em {
|
||||
@@ -130,14 +168,33 @@ async function handleAdd(id: number) {
|
||||
}
|
||||
}
|
||||
|
||||
.header-label {
|
||||
font-size: 0.72rem;
|
||||
.header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.header-meta-label {
|
||||
font-size: 0.7rem;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.header-vsep {
|
||||
width: 1px;
|
||||
height: 12px;
|
||||
background: var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-date {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.68rem;
|
||||
color: var(--text-muted);
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.panels {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
Reference in New Issue
Block a user