mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
0dd07befa7
The Plan tab was the last trip tab still in the old design. It now reads like Bookings, Costs, Lists, Files and Collab, without losing a function: - Day plan: each day is a card with a head band (day tile with weather, stay and rental pills, a "+" menu for place, stay, transport, transit and note), rows with "..." menus, white badges and a white route bar. - Places column: add, search and filters in three rows, a show dropdown, category and rating filters, and a selection bar at the foot. - Place inspector, day details and the stay editor on the shared dialog frame; the place form in the editor look with the name in the head band. - Clicking a booking or transport anywhere on the plan opens the booking detail popup first; Edit leads to the editor. The popup is one host shared with the Bookings and Transports tabs. - Files and Collab dialogs, notes, polls, links and chat moved to the same frame; shared DialogShell and dialogParts hold the building blocks. - The map hover card shows the place photo and follows the theme. Every new and reworded string is translated into all locales, and a few older English leftovers (help center, cost split, import hints) with them. Phone screens keep their own look.
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { UserRound } from 'lucide-react'
|
|
import { useTranslation } from '../../i18n'
|
|
import { Tooltip } from './Tooltip'
|
|
|
|
/**
|
|
* Small "Guest" pill (#1362) shown next to a member's name in assignment pickers
|
|
* so it's clear the person is an accountless guest. Purely presentational.
|
|
*/
|
|
export default function GuestBadge({ size = 'sm', customTooltip = false }: { size?: 'sm' | 'xs'; customTooltip?: boolean }) {
|
|
const { t } = useTranslation()
|
|
const fs = size === 'xs' ? 9 : 10
|
|
const badge = (
|
|
<span
|
|
title={customTooltip ? undefined : t('members.guestsHint')}
|
|
style={{
|
|
display: 'inline-flex', alignItems: 'center', gap: 3, flexShrink: 0,
|
|
fontSize: `calc(${fs}px * var(--fs-scale-caption, 1))`, fontWeight: 600,
|
|
color: 'var(--text-muted)', background: 'var(--bg-tertiary)',
|
|
padding: '1px 6px', borderRadius: 99,
|
|
}}
|
|
>
|
|
<UserRound size={fs - 1} /> {t('members.guest')}
|
|
</span>
|
|
)
|
|
return customTooltip ? <Tooltip label={t('members.guestsHint')}>{badge}</Tooltip> : badge
|
|
}
|