import { useEffect, useState } from "preact/hooks"; import { SyncOptions } from "../../../redux/reducers/sync"; import Button from "../../../components/ui/Button"; import Checkbox from "../../../components/ui/Checkbox"; interface Props { options?: SyncOptions; } export function Native(props: Props) { const [config, setConfig] = useState(window.native.getConfig()); const [autoStart, setAutoStart] = useState(); const fetchValue = () => window.native.getAutoStart().then(setAutoStart); const [hintReload, setHintReload] = useState(false); const [hintRelaunch, setHintRelaunch] = useState(false); const [confirmDev, setConfirmDev] = useState(false); useEffect(() => { fetchValue(); }, []); return (

App Behavior

{ if (v) { await window.native.enableAutoStart(); } else { await window.native.disableAutoStart(); } setAutoStart(v); }} description="Launch Revolt when you log into your computer."> Start with computer { window.native.setFrame(!frame); setHintRelaunch(true); setConfig({ ...config, frame: !frame, }); }} description={<>Let Revolt use its own window frame.}> Custom window frame { const build = nightly ? "nightly" : "stable"; window.native.setBuild(build); setHintReload(true); setConfig({ ...config, build, }); }} description={<>Use the beta branch of Revolt.}> Revolt Nightly

Local Development Mode

{config.build === "dev" ? (

) : ( <> This will change the app to the 'dev' branch, instead loading the app from a local server on your machine.
Without a server running,{" "} the app will not load! }> I understand there's no going back.

)}
); }