mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +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:
@@ -447,7 +447,7 @@ describe('PackingListPanel', () => {
|
||||
const { container } = render(<PackingListPanel tripId={1} items={[]} />);
|
||||
|
||||
// Click the Import button (Upload icon in the header)
|
||||
const importBtn = container.querySelector('svg.lucide-upload')?.closest('button');
|
||||
const importBtn = container.querySelector('svg.lucide-download')?.closest('button');
|
||||
expect(importBtn).toBeTruthy();
|
||||
await user.click(importBtn!);
|
||||
|
||||
@@ -538,7 +538,7 @@ describe('PackingListPanel', () => {
|
||||
const { container } = render(<PackingListPanel tripId={1} items={[]} />);
|
||||
|
||||
// Open import modal
|
||||
const importBtn = container.querySelector('svg.lucide-upload')?.closest('button');
|
||||
const importBtn = container.querySelector('svg.lucide-download')?.closest('button');
|
||||
await user.click(importBtn!);
|
||||
await screen.findByText('Import Packing List');
|
||||
|
||||
@@ -655,7 +655,7 @@ describe('PackingListPanel', () => {
|
||||
const { container } = render(<PackingListPanel tripId={1} items={[]} />);
|
||||
|
||||
// Open import modal
|
||||
const importBtn = container.querySelector('svg.lucide-upload')?.closest('button');
|
||||
const importBtn = container.querySelector('svg.lucide-download')?.closest('button');
|
||||
await user.click(importBtn!);
|
||||
await screen.findByText('Import Packing List');
|
||||
|
||||
@@ -929,7 +929,7 @@ describe('PackingListPanel', () => {
|
||||
const { container } = render(<PackingListPanel tripId={1} items={[]} />);
|
||||
|
||||
// Open import modal
|
||||
const importBtn = container.querySelector('svg.lucide-upload')?.closest('button');
|
||||
const importBtn = container.querySelector('svg.lucide-download')?.closest('button');
|
||||
await user.click(importBtn!);
|
||||
await screen.findByText('Import Packing List');
|
||||
|
||||
@@ -1215,7 +1215,7 @@ describe('PackingListPanel', () => {
|
||||
const { container } = render(<PackingListPanel tripId={1} items={[]} />);
|
||||
|
||||
// Open import modal
|
||||
const importBtn = container.querySelector('svg.lucide-upload')?.closest('button');
|
||||
const importBtn = container.querySelector('svg.lucide-download')?.closest('button');
|
||||
await user.click(importBtn!);
|
||||
await screen.findByText('Import Packing List');
|
||||
|
||||
@@ -1500,7 +1500,7 @@ describe('PackingListPanel', () => {
|
||||
const { container } = render(<PackingListPanel tripId={1} items={[]} />);
|
||||
|
||||
// Open import modal
|
||||
const importBtn = container.querySelector('svg.lucide-upload')?.closest('button');
|
||||
const importBtn = container.querySelector('svg.lucide-download')?.closest('button');
|
||||
await user.click(importBtn!);
|
||||
await screen.findByText('Import Packing List');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
X, Check, CheckCheck, Luggage, Package, FolderPlus, Upload,
|
||||
X, Check, CheckCheck, Luggage, Package, FolderPlus, Download,
|
||||
} from 'lucide-react'
|
||||
import type { PackingState } from './usePackingListPanel'
|
||||
|
||||
@@ -46,7 +46,7 @@ export function PackingHeader(S: PackingState) {
|
||||
border: '1px solid var(--border-primary)', fontSize: 'calc(12px * var(--fs-scale-body, 1))', fontWeight: 500, cursor: 'pointer',
|
||||
fontFamily: 'inherit', background: 'var(--bg-card)', color: 'var(--text-muted)',
|
||||
}}>
|
||||
<Upload size={12} /> <span className="hidden sm:inline">{t('packing.import')}</span>
|
||||
<Download size={12} /> <span className="hidden sm:inline">{t('packing.import')}</span>
|
||||
</button>
|
||||
)}
|
||||
{inlineHeader && canEdit && abgehakt > 0 && (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createPortal } from 'react-dom'
|
||||
import { Upload } from 'lucide-react'
|
||||
import { FileDown } from 'lucide-react'
|
||||
import type { PackingState } from './usePackingListPanel'
|
||||
|
||||
export function BulkImportModal(S: PackingState) {
|
||||
@@ -48,7 +48,7 @@ export function BulkImportModal(S: PackingState) {
|
||||
border: '1px dashed var(--border-primary)', borderRadius: 8, background: 'none',
|
||||
fontSize: 'calc(11px * var(--fs-scale-caption, 1))', color: 'var(--text-faint)', cursor: 'pointer', fontFamily: 'inherit',
|
||||
}}>
|
||||
<Upload size={11} /> {t('packing.importCsv')}
|
||||
<FileDown size={11} /> {t('packing.importCsv')}
|
||||
</button>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 8 }}>
|
||||
|
||||
Reference in New Issue
Block a user