Add stage 4: frontend lists view + enforce 100-list cap
API: GET /api/lists is now ordered alphabetically (COLLATE NOCASE) by title with no other option, and TodoListController rejects a create past 100 lists per owner with 409. New TodoListRepository::countForOwner. Frontend: HomeView replaces the placeholder with the user's lists (rendered in API order) and a create form (title + optional description). New Pinia lists store fetches and creates, re-fetching after a create so the new list sorts into place; it is reset on logout. Form disables and explains at 100 lists; create errors surface inline. Neutral .badge with a .badge--warn variant; dropped the unused .facts styles. Tests: alphabetical ordering and the 100-list cap. Suite: 17 passing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+28
-14
@@ -100,32 +100,46 @@ h1 {
|
||||
padding: 0.1rem 0.45rem;
|
||||
border-radius: 999px;
|
||||
font-size: 0.75rem;
|
||||
border: 1px solid var(--warn-border);
|
||||
background: var(--warn-bg);
|
||||
white-space: nowrap;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.facts {
|
||||
margin: 1.25rem 0 0;
|
||||
.badge--warn {
|
||||
border-color: var(--warn-border);
|
||||
background: var(--warn-bg);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.lists {
|
||||
list-style: none;
|
||||
margin: 1.5rem 0 0;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.facts div {
|
||||
.lists__item {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 0.75rem 0.9rem;
|
||||
}
|
||||
|
||||
.lists__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
border-top: 1px solid var(--border);
|
||||
padding-top: 0.6rem;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.facts dt {
|
||||
color: var(--muted);
|
||||
.lists__title {
|
||||
font-weight: 600;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.facts dd {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
word-break: break-all;
|
||||
.lists__item .muted {
|
||||
margin: 0.35rem 0 0;
|
||||
}
|
||||
|
||||
.form {
|
||||
|
||||
Reference in New Issue
Block a user