mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 02:34:21 +00:00
feat(collections): "want to revisit" status for saved places (#2567)
A fourth status after visited, for a place already seen that the user wants to go back to. It joins the one-tap cycle, the filters, the pickers, the assistant cards and the MCP status tool, and counts as visited wherever visits are counted (isVisitedCollectionStatus), so "visited everywhere" keeps it. The status pickers go two by two where four would not fit.
This commit is contained in:
@@ -119,7 +119,8 @@ export default function MCollAddSheet({ open, collectionId, collectionName, list
|
||||
<MCollCategoryPicker categories={categories} value={categoryId} onChange={setCategoryId} t={t} />
|
||||
|
||||
<Eyebrow className="mb-[6px] mt-[14px]">{t('mobileCollections.status').toUpperCase()}</Eyebrow>
|
||||
<div className="flex gap-[6px]">
|
||||
{/* Two by two on a phone, so every status label keeps its room */}
|
||||
<div className="grid grid-cols-2 gap-[6px] wide:grid-cols-4">
|
||||
{STATUS_ORDER.map(s => {
|
||||
const meta = STATUS_SPEC[s]
|
||||
const Icon = meta.icon
|
||||
|
||||
@@ -127,8 +127,8 @@ export default function MCollPlaceSheet({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Status cycle */}
|
||||
<div className="mt-3 flex gap-[6px]">
|
||||
{/* Status cycle: two by two on a phone, so every label keeps its room */}
|
||||
<div className="mt-3 grid grid-cols-2 gap-[6px] wide:grid-cols-4">
|
||||
{STATUS_ORDER.map(s => {
|
||||
const meta = STATUS_SPEC[s]
|
||||
const Icon = meta.icon
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
BedDouble, Bike, Bookmark, Camera, CheckCircle2, Circle, CircleSlash, Coffee,
|
||||
Landmark, MapPin, ShoppingBag, TrainFront, Trees, Umbrella, Utensils,
|
||||
Landmark, MapPin, RotateCcw, ShoppingBag, TrainFront, Trees, Umbrella, Utensils,
|
||||
} from 'lucide-react'
|
||||
import type { LucideIcon } from 'lucide-react'
|
||||
import type { CollectionStatus } from '@trek/shared'
|
||||
@@ -61,11 +61,12 @@ export interface MStatusMeta {
|
||||
labelKey: string
|
||||
}
|
||||
|
||||
/** Status canon: Idea → Want to go → Visited. */
|
||||
/** Status canon: Idea → Want to go → Visited → Want to revisit. */
|
||||
export const STATUS_SPEC: Record<CollectionStatus, MStatusMeta> = {
|
||||
idea: { color: '#9A9AA1', icon: Circle, labelKey: 'collections.status.idea' }, // theme-lint-disable
|
||||
want: { color: '#4A7DDB', icon: Bookmark, labelKey: 'collections.status.want' }, // theme-lint-disable
|
||||
visited: { color: '#2FA37A', icon: CheckCircle2, labelKey: 'collections.status.visited' }, // theme-lint-disable
|
||||
revisit: { color: 'var(--m-st-pending)', icon: RotateCcw, labelKey: 'collections.status.revisit' },
|
||||
}
|
||||
|
||||
/** Hex + alpha-suffix tints the design uses for tiles/pills (e.g. #4A7DDB1f). */
|
||||
|
||||
Reference in New Issue
Block a user