import React, { useState } from "react"; import { TextField, Tooltip, Typography } from "@mui/material"; import { Settings } from "../../Settings/Settings"; import { OptionSwitch } from "../../ui/React/OptionSwitch"; import { GameOptionsPage } from "./GameOptionsPage"; import { formatTime } from "../../utils/helpers/formatTime"; export const InterfacePage = (): React.ReactElement => { const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat); function handleTimestampFormatChange(event: React.ChangeEvent): void { setTimestampFormat(event.target.value); Settings.TimestampsFormat = event.target.value; } return ( (Settings.DisableASCIIArt = newValue)} text="Disable ASCII art" tooltip={ <> If this is set, ASCII art for UI elements will be disabled. This setting does not affect ASCII art in the description of factions. } /> (Settings.DisableTextEffects = newValue)} text="Disable text effects" tooltip={ <> If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas. } /> (Settings.DisableOverviewProgressBars = newValue)} text="Disable Overview Progress Bars" tooltip={<>If this is set, progress bars in the character overview will be hidden.} /> (Settings.ShowMiddleNullTimeUnit = newValue)} text="Show all intermediary time units, even when null." tooltip={<>Example: 1 hour 13 seconds becomes 1 hour 0 minutes 13 seconds.} /> Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/ } > Timestamp format:  ), }} value={timestampFormat} onChange={handleTimestampFormatChange} placeholder="yyyy-MM-dd hh:mm:ss" /> Example timestamp: {timestampFormat !== "" ? formatTime(timestampFormat) : "no timestamp"}
); };