* [Themes] Initial work * [Themes] Read from __vendetta_themes and early UI (#36) * [Themes] Read from `__vendetta_themes` * [Themes] Save as JSON and native theming * [Themes] Basic UI * [Themes] Merge processed theme data * [Themes] Import ReactNative from `@lib/preinit`, oraganize imports * [Themes] Some minor cleanup * [Themes] UI overhaul * [Themes] Minor adjustments * [Themes] Implement updates, make UI reactive-ish * [Themes] Move to new format * [Themes > UI] Last-minute ThemeCard changes * [Themes] Properly support AMOLED --------- Co-authored-by: Amsyar Rasyiq <82711525+amsyarasyiq@users.noreply.github.com>
54 lines
No EOL
2.1 KiB
TypeScript
54 lines
No EOL
2.1 KiB
TypeScript
import { NavigationNative } from "@metro/common";
|
|
import { ErrorBoundary, Forms } from "@ui/components";
|
|
import { getAssetIDByName } from "@ui/assets";
|
|
import { useProxy } from "@lib/storage";
|
|
import settings from "@lib/settings";
|
|
|
|
const { FormRow, FormSection, FormDivider } = Forms;
|
|
|
|
export default function SettingsSection() {
|
|
const navigation = NavigationNative.useNavigation();
|
|
useProxy(settings);
|
|
|
|
return (
|
|
<ErrorBoundary>
|
|
<FormSection key="Vendetta" title="Vendetta">
|
|
<FormRow
|
|
label="General"
|
|
leading={<FormRow.Icon source={getAssetIDByName("settings")} />}
|
|
trailing={FormRow.Arrow}
|
|
onPress={() => navigation.push("VendettaSettings")}
|
|
/>
|
|
<FormDivider />
|
|
<FormRow
|
|
label="Plugins"
|
|
leading={<FormRow.Icon source={getAssetIDByName("debug")} />}
|
|
trailing={FormRow.Arrow}
|
|
onPress={() => navigation.push("VendettaPlugins")}
|
|
/>
|
|
{window.__vendetta_loader?.features.themes && (
|
|
<>
|
|
<FormDivider />
|
|
<FormRow
|
|
label="Themes"
|
|
leading={<FormRow.Icon source={getAssetIDByName("ic_theme_24px")} />}
|
|
trailing={FormRow.Arrow}
|
|
onPress={() => navigation.push("VendettaThemes")}
|
|
/>
|
|
</>
|
|
)}
|
|
{settings.developerSettings && (
|
|
<>
|
|
<FormDivider />
|
|
<FormRow
|
|
label="Developer"
|
|
leading={<FormRow.Icon source={getAssetIDByName("ic_progress_wrench_24px")} />}
|
|
trailing={FormRow.Arrow}
|
|
onPress={() => navigation.push("VendettaDeveloper")}
|
|
/>
|
|
</>
|
|
)}
|
|
</FormSection>
|
|
</ErrorBoundary>
|
|
)
|
|
} |