diff --git a/client/src/App.css b/client/src/App.css index 4795f52..e2df22a 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -1825,6 +1825,16 @@ html.scheme-dark .themed-select-option.is-selected { min-width: 0; } +.logbook-card-chevron { + position: relative; + z-index: 1; + flex-shrink: 0; + align-self: center; + margin-left: auto; + color: #475569; + pointer-events: none; +} + .logbook-card .logbook-title-editable, .logbook-card .logbook-title-inline-edit, .logbook-card .card-title-row { @@ -3349,7 +3359,14 @@ html.theme-cupertino .events-scroll-container { color: var(--app-accent-light, #93c5fd); } +.logs-journal { + width: 100%; + min-width: 0; +} + .live-log-card { + width: 100%; + min-width: 0; min-height: 420px; } diff --git a/client/src/components/LiveLogView.tsx b/client/src/components/LiveLogView.tsx index 3660e13..09949e8 100644 --- a/client/src/components/LiveLogView.tsx +++ b/client/src/components/LiveLogView.tsx @@ -823,7 +823,7 @@ export default function LiveLogView({ return ( <> -
+
diff --git a/client/src/components/LogEntriesList.tsx b/client/src/components/LogEntriesList.tsx index 2832d8f..e68ce18 100644 --- a/client/src/components/LogEntriesList.tsx +++ b/client/src/components/LogEntriesList.tsx @@ -9,6 +9,7 @@ import { downloadCsv, shareCsv } from '../services/csvExport.js' import { downloadLogbookPagePdf } from '../services/pdfExport.js' import { PlausibleEvents, trackPlausibleEvent } from '../services/analytics.js' import { getErrorMessage } from '../utils/errors.js' +import { findTodayEntryId } from '../services/quickEventLog.js' import LogEntryEditor from './LogEntryEditor.tsx' import LiveLogView from './LiveLogView.tsx' import EntrySkipperSignBadge from './EntrySkipperSignBadge.tsx' @@ -239,6 +240,12 @@ export default function LogEntriesList({ const masterKey = await getLogbookKey(logbookId) || getActiveMasterKey() if (!masterKey) throw new Error('Encryption key not found. Please log in.') + const existingTodayId = await findTodayEntryId(logbookId) + if (existingTodayId) { + setSelectedEntryId(existingTodayId) + return + } + const localEntries = await db.entries.where({ logbookId }).toArray() const decryptedEntries: Array = [] @@ -390,7 +397,10 @@ export default function LogEntriesList({ setReturnToLiveAfterEditor(true) setSelectedEntryId(entryId) }} - onSwitchToList={() => setViewMode('list')} + onSwitchToList={() => { + setViewMode('list') + void loadEntries() + }} /> ) } @@ -410,7 +420,7 @@ export default function LogEntriesList({ : entries[0]?.id ?? null return ( -
+
@@ -475,8 +485,14 @@ export default function LogEntriesList({ type="button" className="logbook-card-select" onClick={() => setSelectedEntryId(item.id)} - > -
+ aria-label={ + item.departure && item.destination + ? `${item.departure} → ${item.destination}, ${t('logs.travel_day_number', { number: item.dayOfTravel })}` + : `${t('logs.new_entry')}, ${t('logs.travel_day_number', { number: item.dayOfTravel })}` + } + /> + +
@@ -497,8 +513,7 @@ export default function LogEntriesList({
- - +