import { storage } from "@vendetta/plugin"; import { useProxy } from "@vendetta/storage"; import { React, ReactNative as RN, stylesheet } from "@vendetta/metro/common"; import { semanticColors } from "@vendetta/ui"; import { getAssetIDByName } from "@vendetta/ui/assets"; import { Forms } from "@vendetta/ui/components"; import { alerts } from "@vendetta/ui"; import { showToast } from "@vendetta/ui/toasts"; import BetterTableRowGroup from "../components/BetterTableRowGroup"; const { FormSwitchRow, FormRow } = Forms; export default function HiddenSettingsPage() { useProxy(storage); const [, forceUpdate] = React.useReducer((x) => x + 1, 0); const styles = stylesheet.createThemedStyleSheet({ container: { flex: 1, backgroundColor: semanticColors.BACKGROUND_PRIMARY, }, warningText: { fontSize: 14, color: semanticColors.TEXT_MUTED, textAlign: "center", lineHeight: 20, fontWeight: "600", }, infoText: { fontSize: 14, color: semanticColors.TEXT_MUTED, textAlign: "center", lineHeight: 20, marginTop: 8, }, }); return ( These are hidden commands that may contain mature content or experimental features. Use at your own discretion. Commands in this section are disabled by default. } value={storage.enabledCommands.lovefemboys} onValueChange={(v) => { storage.enabledCommands.lovefemboys = v; storage.pendingRestart = true; forceUpdate(); }} /> } value={storage.hiddenSettings.konochanBypassNsfw} onValueChange={(v) => { 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(); } }} /> } value={storage.hiddenSettings.visible} onValueChange={(v) => { storage.hiddenSettings.visible = v; }} /> } onPress={() => { 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", }); }} /> ); }