{/* Color Mode */}
{t('settings.colorMode')} >}>
save({ dark_mode: v })} options={modeOptions} />
{/* Temperature */}
{t('settings.temperature')} >}>
save({ temperature_unit: v })} options={tempOptions} />
{/* Distance */}
{t('settings.distance')} >}>
save({ distance_unit: v as DistanceUnit })} options={distanceOptions} />
{/* Time Format */}
{t('settings.timeFormat')} >}>
save({ time_format: v })} options={timeOptions} />
{/* Week start (#2029) */}
{t('settings.weekStart')} >}>
save({ week_start: v as WeekStart })} options={weekStartOptions(locale)} />
{/* Date format (#2971) */}
{t('settings.dateFormat')} >}>
o.value === defaults.date_format)?.label ?? t('settings.dateFormat')}
trailing={chevron}
onClick={() => setDateFormatOpen(true)}
/>
{/* Default Currency */}
{t('settings.currency')} >}
hint={t('settings.currencyHint')}
>
setCurrencyOpen(true)} />
{/* Blur Booking Codes */}
{t('settings.blurBookingCodes')} >}
trailing={
save({ blur_booking_codes: v })}
/>
}
/>
{/* Map */}
{t('settings.mapTemplate')}
{/* Map Tile URL */}
{t('settings.mapTemplate')} >}
hint={t('settings.mapDefaultHint')}
>
setPresetOpen(true)} />
) => setMapTileUrl(e.target.value)}
onBlur={() => save({ map_tile_url: mapTileUrl })}
placeholder="https://tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
{/* The key comes with the instance on a managed install, injected when the
settings are read. A field here would only let somebody save a worse one. */}
{!managed && (
{t('admin.defaultSettings.cartoKey')} >}
hint={t('admin.defaultSettings.cartoKeyHint')}
>
) => setCartoKey(e.target.value)}
onBlur={() => save({ carto_api_key: cartoKey })}
spellCheck={false}
autoComplete="off"
/>
)}
{!managed && }
{/* Live tile preview */}
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
{React.createElement(MapView as any, {
places: mapPreviewPlaces,
dayPlaces: [],
route: null,
routeSegments: null,
selectedPlaceId: null,
onMarkerClick: null,
onMapClick: null,
onMapContextMenu: null,
center: [48.8566, 2.3522],
zoom: 10,
// As on the other three previews: the field holds what is being
// edited, so the key goes back on before the template resolves.
tileUrl: withTileApiKey(mapTileUrl, cartoKey),
fitKey: null,
dayOrderMap: [],
leftWidth: 0,
rightWidth: 0,
hasInspector: false,
})}
{/* Map provider */}
{t('admin.defaultSettings.mapProvider')} >}
hint={t('admin.defaultSettings.mapProviderHint')}
>
saveMapProvider(v as MapProvider)} options={providerOptions} />