This repository has been archived by the owner on May 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,30 @@ | ||
import { settings as settingsDef } from "@index"; | ||
import { Tables } from "@metro/common"; | ||
import { resolveAssets } from "@utils/assets"; | ||
|
||
const { ScrollView } = ReactNative; | ||
const { Stack, TableRow, TableSwitchRow, TableRowGroup } = Tables; | ||
const { Stack, TableRow, TableRowGroup } = Tables; | ||
|
||
const icons = resolveAssets({ | ||
StaffBadge: "ic_badge_staff", | ||
Gift: "ic_gift_24px", | ||
Idle: "StatusIdle" | ||
}); | ||
import commitHash from "~commit-hash"; | ||
|
||
const ClientInfo = nativeModuleProxy.RTNClientInfoManager; | ||
|
||
export default function General() { | ||
const settings = settingsDef.useStorage(); | ||
|
||
return ( | ||
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ paddingBottom: 38 }}> | ||
<Stack style={{ paddingVertical: 24, paddingHorizontal: 12 }} spacing={24}> | ||
<TableRowGroup title="Settings"> | ||
<TableSwitchRow | ||
label="Enable Discord's experiments menu" | ||
subLabel="Enables the experiments menu in Discord's settings, which only staff has access to." | ||
icon={<TableRow.Icon source={icons.StaffBadge} />} | ||
value={settings.experiments} | ||
onValueChange={(v: boolean) => settings.experiments = v} | ||
/> | ||
<TableSwitchRow | ||
label="Hide gift button on chat input" | ||
subLabel="Hides the gift button on the chat input." | ||
icon={<TableRow.Icon source={icons.Gift} />} | ||
value={settings.hideGiftButton} | ||
onValueChange={(v: boolean) => settings.hideGiftButton = v} | ||
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16, alignItems: "center" }}> | ||
<Stack> | ||
<TableRowGroup> | ||
<TableRow | ||
label={"Pyoncord"} | ||
trailing={<TableRow.TrailingText text={commitHash} />} | ||
/> | ||
<TableSwitchRow | ||
label="Hide idle status" | ||
subLabel="Hides the idling status when app is backgrounded." | ||
icon={<TableRow.Icon source={icons.Idle} />} | ||
value={settings.hideIdling} | ||
onValueChange={(v: boolean) => settings.hideIdling = v} | ||
<TableRow | ||
label={"Discord"} | ||
trailing={<TableRow.TrailingText text={`${ClientInfo.Version} (${ClientInfo.Build})`} />} | ||
/> | ||
</TableRowGroup> | ||
</Stack> | ||
</ScrollView> | ||
</ScrollView > | ||
); | ||
} |