mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
feat(places): colour tags, tabs for the texts and opening hours on the phone
Tags on the place form are pills in their own colour, with a palette under the dot that recolours a tag for the whole trip (PUT /trips/:id/tags/:id was there already, the client now reaches it through repo and store) and a custom colour field of its own instead of the system picker. A new tag is made in a colour picked the same way. Description, notes and the note for one day's visit sit in one card under a switch, each with a line on where the text shows up; the day tab is named after its day and is only there with one visit in context. Nothing about the three fields changes underneath. Opening hours get a switch for open around the clock next to closed. Google writes a place open all week as one period on Sunday that never closes; it read as Sunday open and every other day closed, and now opens every day. The phone form follows the desktop: category as one field with a list, tags in one field, the texts switch, and phone, e-mail and opening hours, which it did not have. The hours and the text tabs are shared hooks (usePlaceHours, usePlaceTextTabs). Files and costs on the phone sheets are drawn as fields like the rest, and the paste hint, a keyboard shortcut a phone has no use for, is gone with its key.
This commit is contained in:
@@ -169,7 +169,7 @@ function UploadTile({
|
||||
disabled={reading}
|
||||
aria-pressed={selected}
|
||||
aria-label={t('places.uploadImage')}
|
||||
className={`${TILE} ${ring(selected, dialog)} ${preview ? '' : 'border border-dashed border-edge bg-surface-card'}`}
|
||||
className={`${TILE} ${ring(selected, dialog)} ${preview ? '' : dialog ? 'border border-edge-faint bg-surface-secondary hover:bg-surface-tertiary' : 'border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)]'}`}
|
||||
onMouseEnter={() => onHover(!!preview)}
|
||||
onMouseLeave={() => onHover(false)}
|
||||
>
|
||||
@@ -179,13 +179,15 @@ function UploadTile({
|
||||
{selected && <Picked />}
|
||||
</>
|
||||
) : (
|
||||
<span className="flex h-full w-full flex-col items-center justify-center gap-1 px-1 text-center text-caption leading-tight text-content-muted group-hover:text-content">
|
||||
{reading ? (
|
||||
<Loader2 className="h-4 w-4 animate-spin" />
|
||||
) : (
|
||||
<ImagePlus className="h-4 w-4" strokeWidth={2} />
|
||||
)}
|
||||
{t('places.uploadImage')}
|
||||
// Icon only: the tooltip and the button's name say what it does.
|
||||
<span className="flex h-full w-full items-center justify-center">
|
||||
<span className="grid h-11 w-11 place-items-center rounded-full bg-surface-card text-content-muted shadow-sm transition-transform duration-150 group-hover:scale-105 group-hover:text-content">
|
||||
{reading ? (
|
||||
<Loader2 className="h-5 w-5 animate-spin" />
|
||||
) : (
|
||||
<ImagePlus className="h-5 w-5" strokeWidth={1.9} />
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user