Cars: arrange the garage, and choose what a car's page shows
Three things you can now set up rather than live with.
The garage takes a drag: cards reorder as you drag across them and the
arrangement saves on drop — or on dragend, since a card released in the
gap between cards never produces a drop and would otherwise revert on
the next load. It is a per-user list of car ids on the profile, so it
covers cars shared with you and never reorders anybody else's garage;
the API returns /api/cars in that order, so a client only sends the new
one back. Pointer-only: touch browsers don't fire the native drag
events, and this is not worth a dependency.
A car's page is now configurable from the gear in its header: which tabs
it shows, and which of the 14 Information rows. Both belong to the car,
so everyone it is shared with sees the same page — Fuel off on an EV
stays off for all of them — and setting them needs write access. Stored
as the hidden sets, so anything added in a later release is on by
default. PUT /api/cars/{id}/view is its own endpoint precisely so an
ordinary save of the car form, which sends every other field, can never
reveal something that was deliberately switched off. Information itself
can't be hidden: a page with no tabs left would be a dead end.
The connected-service cards fold away, remembered per device, so a
provider that reports eight sections can be trimmed to the two worth
watching. A failed section keeps a short badge in its collapsed header
and puts the provider's own message — a few hundred characters of JSON,
which used to stretch the page sideways — inside the body with
everything else.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e373497958
commit
049da69c83
18 files changed
+840
-46
No files matched your search
+17
-4
@@ -88,7 +88,18 @@ Config (`server/.env`, copy from `.env.example`):
|
||||
car by hand, or **import from service** — pick a vehicle off a connected
|
||||
manufacturer account and have its details filled in (the button appears only
|
||||
once an account is connected). Shared cars are labelled and gated by your access
|
||||
level.
|
||||
level. **Drag a card** to rearrange the garage: the order is saved per user (so
|
||||
it covers shared cars and never reorders anybody else's garage) and applied by
|
||||
the API on every list. Pointer-only — the native drag events it uses don't fire
|
||||
on touch.
|
||||
- **What a car shows** — the gear button in a car's header picks both the
|
||||
sections that car's page shows (connected service, service history, technical
|
||||
checks, maintenance, fuel, documents, parts, reminders — Fuel off on an EV,
|
||||
say) and which of the 14 Information rows it lists (no Differential oil on a
|
||||
car without one). It belongs to the car, so everyone it is shared with sees
|
||||
the same page; setting it needs write access. Stored as the *hidden* sets, so
|
||||
anything added in a later release is on by default, and the Information tab
|
||||
itself can't be switched off.
|
||||
- **Car detail** — all car spec fields (engine / transmission / differential oil,
|
||||
brake fluid, coolant, VIN, fuel type, …) plus tabbed histories, each with an
|
||||
optional file attachment and add/edit/delete gated by your access level:
|
||||
@@ -96,9 +107,11 @@ Config (`server/.env`, copy from `.env.example`):
|
||||
car linked to a manufacturer account: live readings (odometer, fuel, battery,
|
||||
range, position), the vehicle record, and every section the plugin can fetch
|
||||
with its raw response. Offers the provider's odometer when it is ahead of the
|
||||
stored one. On an unlinked car the tab instead offers to connect it to a
|
||||
vehicle on your account. Read under *your* account, so a car shared from
|
||||
someone else shows data only if that vehicle is on your account too.
|
||||
stored one. Every card below the live readings — the vehicle record and each
|
||||
provider section — folds away, and which ones you folded is remembered per
|
||||
device in localStorage. On an unlinked car the tab instead offers to connect
|
||||
it to a vehicle on your account. Read under *your* account, so a car shared
|
||||
from someone else shows data only if that vehicle is on your account too.
|
||||
- **Service history** — date, km, computed next date/km, and changed-parts flags.
|
||||
- **Technical checks** — roadworthiness inspections; result, cost, station and
|
||||
the certificate's valid-until, which drives the next-due date.
|
||||
|
||||
Reference in new issue
Block a user