mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 16:03:02 +00:00
5b4a7e82ff
The trip planner and the journal get a "From Dawarich" list: the stays recorded for those dates, each one a row that can be dismissed or turned into a place or an entry after a review step that shows time, name, note and day. A place that came from a recording carries the Dawarich mark next to its name so its origin stays visible afterwards. The recorded route lies over the trip and journal maps as an overlay, coloured per day and cut along the reader's own timezone rather than UTC. It is fetched for the window on screen and never stored. The Atlas gets its own panel beside the map for the countries and cities the recordings prove, and the wish list is ticked off there, on the day of the visit, undoably. The phone has its own take on all of it, in the mobile shell's colours and with native sheets.
43 lines
1.8 KiB
TypeScript
43 lines
1.8 KiB
TypeScript
import { useEffect } from 'react'
|
|
import { useAddonStore } from '../../../store/addonStore'
|
|
import MPhotoProvidersSection from './MPhotoProvidersSection'
|
|
import MAirTrailConnectionSection from './MAirTrailConnectionSection'
|
|
import MDawarichConnectionSection from './MDawarichConnectionSection'
|
|
import MLlmConnectionSection from './MLlmConnectionSection'
|
|
import MSettingsMcp from './MSettingsMcp'
|
|
import { useAuthStore } from '../../../store/authStore'
|
|
|
|
/**
|
|
* "Integrations" section. The photo-provider / AirTrail / LLM connection forms
|
|
* are the existing (responsive) desktop sections rendered as-is — they carry
|
|
* their own cards and addon gating — while the MCP configuration named in the
|
|
* function audit is rebuilt natively in the mobile design language.
|
|
*/
|
|
export default function MSettingsIntegrations() {
|
|
const { isEnabled: addonEnabled, loadAddons } = useAddonStore()
|
|
const mcpEnabled = addonEnabled('mcp')
|
|
const airtrailEnabled = addonEnabled('airtrail')
|
|
const llmEnabled = addonEnabled('llm_parsing')
|
|
const dawarichEnabled = addonEnabled('dawarich')
|
|
const managed = useAuthStore((s) => s.managed)
|
|
|
|
useEffect(() => {
|
|
loadAddons()
|
|
}, [loadAddons])
|
|
|
|
return (
|
|
<>
|
|
<MPhotoProvidersSection />
|
|
{airtrailEnabled && <MAirTrailConnectionSection />}
|
|
{/* Reaches a server the reader runs themselves, which a managed install has
|
|
no route to — the same gate the desktop shell puts on AirTrail. */}
|
|
{dawarichEnabled && !managed && <MDawarichConnectionSection />}
|
|
{/* Which model reads a booking, and what that costs, comes with the instance on
|
|
a managed install. The per-user fallback exists for people who supply their
|
|
own key, and there nobody does. */}
|
|
{llmEnabled && !managed && <MLlmConnectionSection />}
|
|
{mcpEnabled && <MSettingsMcp />}
|
|
</>
|
|
)
|
|
}
|