mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 15:17:30 +00:00
fix(ui): point import controls inward and give Google Maps its own mark
Every import button in the client wore an outgoing arrow, so the control that pulls a booking or a place list in looked like it was about to send something out. The places-import sheet managed to contradict itself inside one screen: Download in the header, Upload on the row below it, Upload again on the file step. Imports now take Download, or FileDown where the button opens a file picker; genuine uploads and the desktop drop zones keep Upload. The mobile places-import entry point wore an ellipsis, which promises a menu. The "open in Google Maps" buttons drew the four-segment Google *search* G, flattened to one colour — a glyph that reads as "run a search". They get a map pin instead, factored into one component so the desktop and mobile copies stop drifting apart. Closes #2005 Closes #2006
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ReactNode, useEffect, useMemo, useState } from 'react'
|
||||
import {
|
||||
Bookmark, Check, CheckCheck, CheckCircle2, ListChecks, Loader2, MapPin, MoreHorizontal, Plus,
|
||||
Bookmark, Check, CheckCheck, CheckCircle2, Download, ListChecks, Loader2, MapPin, Plus,
|
||||
SlidersHorizontal, Tag, Trash2, X,
|
||||
} from 'lucide-react'
|
||||
import MDancingTrek from '../../../components/MDancingTrek'
|
||||
@@ -172,7 +172,7 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
|
||||
aria-label={t('mobileTrip.importPlaces')}
|
||||
className="flex h-10 w-10 flex-none items-center justify-center rounded-full border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] text-m-muted"
|
||||
>
|
||||
<MoreHorizontal size={16} strokeWidth={2} />
|
||||
<Download size={16} strokeWidth={2} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRef, useState } from 'react'
|
||||
import { Check, Upload } from 'lucide-react'
|
||||
import { Check, FileDown } from 'lucide-react'
|
||||
import { placesApi } from '../../../../api/client'
|
||||
import { Eyebrow, FormSheetFooter } from './PlSheetChrome'
|
||||
import type { TripPlanner } from '../MTripShell'
|
||||
@@ -170,7 +170,7 @@ export default function ImpFileStep({ planner, onBack, onDone }: ImpFileStepProp
|
||||
onClick={() => inputRef.current?.click()}
|
||||
className="mt-3 flex min-h-[88px] w-full flex-col items-center justify-center gap-[6px] rounded-[14px] border-[1.5px] border-dashed border-[color:var(--m-trackoff)] p-4"
|
||||
>
|
||||
<Upload size={17} strokeWidth={1.9} className="text-m-faint" />
|
||||
<FileDown size={17} strokeWidth={1.9} className="text-m-faint" />
|
||||
{files.length > 0 ? (
|
||||
<span className="break-all text-center text-[0.78125rem] font-semibold text-m-ink">
|
||||
{files.map(f => f.name).join(', ')}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState, type ReactNode } from 'react'
|
||||
import { ChevronLeft, ChevronRight, Download, MapPin, Upload } from 'lucide-react'
|
||||
import { ChevronLeft, ChevronRight, Download, FileDown, MapPin } from 'lucide-react'
|
||||
import type { LucideIcon } from 'lucide-react'
|
||||
import MSheet from '../../../components/MSheet'
|
||||
import MIconBtn from '../../../components/MIconBtn'
|
||||
@@ -51,7 +51,7 @@ export default function MImportSheet({ planner, open, onClose }: MImportSheetPro
|
||||
{step === 'menu' && (
|
||||
<div className="px-[14px] pb-[14px] pt-1">
|
||||
<ImpMenuRow
|
||||
icon={Upload}
|
||||
icon={FileDown}
|
||||
title={t('places.importFile')}
|
||||
sub="GPX · KML · KMZ"
|
||||
onClick={() => setStep('file')}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRef, useState } from 'react'
|
||||
import { Upload } from 'lucide-react'
|
||||
import { FileDown } from 'lucide-react'
|
||||
import MSheet from '../../../components/MSheet'
|
||||
import { Eyebrow, FIELD_AREA_CLS, FormSheetFooter, FormSheetHeader } from '../sheets/PlSheetChrome'
|
||||
import { packingApi } from '../../../../api/client'
|
||||
@@ -74,7 +74,7 @@ export default function MPackingImportSheet({ planner, open, onClose }: MPacking
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
className="mt-2 flex items-center gap-[6px] rounded-full border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-[13px] py-[7px] text-[0.75rem] font-semibold text-m-muted"
|
||||
>
|
||||
<Upload size={12} strokeWidth={2.2} />
|
||||
<FileDown size={12} strokeWidth={2.2} />
|
||||
{t('packing.importCsv')}
|
||||
</button>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect, useMemo, useState } from 'react'
|
||||
import type { LucideIcon } from 'lucide-react'
|
||||
import {
|
||||
Briefcase, Check, CheckCheck, ChevronDown, ChevronUp, HandHelping,
|
||||
LayoutTemplate, MoreHorizontal, Package, Pencil, Plus, RotateCcw, Save as SaveIcon, Trash2, Upload, UserPlus, UserRound,
|
||||
Download, LayoutTemplate, MoreHorizontal, Package, Pencil, Plus, RotateCcw, Save as SaveIcon, Trash2, UserPlus, UserRound,
|
||||
} from 'lucide-react'
|
||||
import MDancingTrek from '../../../components/MDancingTrek'
|
||||
import { useAuthStore } from '../../../../store/authStore'
|
||||
@@ -323,7 +323,7 @@ export default function MPackingListTab({ planner }: { planner: TripPlanner }) {
|
||||
{isAdmin && items.length > 0 && (
|
||||
<ActionRow icon={SaveIcon} label={t('packing.saveAsTemplate')} onClick={() => setActionView('save')} />
|
||||
)}
|
||||
<ActionRow icon={Upload} label={t('packing.import')} onClick={() => { setActionsOpen(false); setShowImportSheet(true) }} />
|
||||
<ActionRow icon={Download} label={t('packing.import')} onClick={() => { setActionsOpen(false); setShowImportSheet(true) }} />
|
||||
</>
|
||||
)}
|
||||
{actionView === 'apply' && (
|
||||
|
||||
Reference in New Issue
Block a user