import { storage } from "@vendetta/plugin"; import { useProxy } from "@vendetta/storage"; import { React } from "@vendetta/metro/common"; import { alerts } from "@vendetta/ui"; import { showToast } from "@vendetta/ui/toasts"; import { getAssetIDByName } from "@vendetta/ui/assets"; import { ScrollView, Stack, TableRowGroup, TableRow, TableSwitchRow, } from "../components/TableComponents"; export default function HiddenSettingsPage() { useProxy(storage); const [, forceUpdate] = React.useReducer((x) => x + 1, 0); return ( { storage.enabledCommands.lovefemboys = v; storage.pendingRestart = true; forceUpdate(); }} /> { if (v) { alerts.showConfirmationAlert({ title: "NSFW Bypass Warning", content: "Enabling this allows NSFW content from KonoChan to be sent in any channel, including non-NSFW channels. This could violate server rules or Discord ToS. Use responsibly!", confirmText: "I Understand", cancelText: "Cancel", onConfirm: () => { storage.hiddenSettings.konochanBypassNsfw = true; forceUpdate(); }, onCancel: () => {}, }); } else { storage.hiddenSettings.konochanBypassNsfw = false; forceUpdate(); } }} /> { storage.hiddenSettings.visible = v; }} /> { alerts.showConfirmationAlert({ title: "Reset Hidden Settings", content: "This will hide the hidden settings section and disable all hidden commands. Are you sure?", confirmText: "Reset", onConfirm: () => { storage.hiddenSettings.enabled = false; storage.hiddenSettings.visible = false; storage.hiddenSettings.konochanBypassNsfw = false; storage.enabledCommands.lovefemboys = false; storage.pendingRestart = true; showToast( "Hidden settings reset", getAssetIDByName("CheckmarkIcon"), ); }, cancelText: "Cancel", }); }} /> ); }