feat: allow users to override color scheme (closes #138)
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
import Library from './components/Library';
|
||||
import Cache from './components/Cache';
|
||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
||||
import { t } from '@localisation';
|
||||
import { createStackNavigator } from '@react-navigation/stack';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import ListButton from 'components/ListButton';
|
||||
import { THEME_COLOR } from 'CONSTANTS';
|
||||
import Sentry from './components/Sentry';
|
||||
import ListButton from 'components/ListButton';
|
||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
||||
|
||||
import { SettingsNavigationProp } from './types';
|
||||
|
||||
import Cache from './stacks/Cache';
|
||||
import Sentry from './stacks/Sentry';
|
||||
import Library from './stacks/Library';
|
||||
import ColorScheme from './stacks/ColorScheme';
|
||||
import PlaybackReporting from './stacks/PlaybackReporting';
|
||||
import { SafeScrollView } from 'components/SafeNavigatorView';
|
||||
import PlaybackReporting from './components/PlaybackReporting';
|
||||
|
||||
export function SettingsList() {
|
||||
const navigation = useNavigation<SettingsNavigationProp>();
|
||||
@@ -19,6 +22,7 @@ export function SettingsList() {
|
||||
const handleCacheClick = useCallback(() => { navigation.navigate('Cache'); }, [navigation]);
|
||||
const handleSentryClick = useCallback(() => { navigation.navigate('Sentry'); }, [navigation]);
|
||||
const handlePlaybackReportingClick = useCallback(() => { navigation.navigate('Playback Reporting'); }, [navigation]);
|
||||
const handleColorSchemeClick = useCallback(() => { navigation.navigate('Color Scheme'); }, [navigation]);
|
||||
|
||||
return (
|
||||
<SafeScrollView>
|
||||
@@ -26,6 +30,7 @@ export function SettingsList() {
|
||||
<ListButton onPress={handleCacheClick}>{t('setting-cache')}</ListButton>
|
||||
<ListButton onPress={handleSentryClick}>{t('error-reporting')}</ListButton>
|
||||
<ListButton onPress={handlePlaybackReportingClick}>{t('playback-reporting')}</ListButton>
|
||||
<ListButton onPress={handleColorSchemeClick}>{t('color-scheme')}</ListButton>
|
||||
</SafeScrollView>
|
||||
);
|
||||
}
|
||||
@@ -47,6 +52,7 @@ export default function Settings() {
|
||||
<Stack.Screen name="Cache" component={Cache} options={{ headerTitle: t('setting-cache') }} />
|
||||
<Stack.Screen name="Sentry" component={Sentry} options={{ headerTitle: t('error-reporting') }} />
|
||||
<Stack.Screen name="Playback Reporting" component={PlaybackReporting} options={{ headerTitle: t('playback-reporting')}} />
|
||||
<Stack.Screen name="Color Scheme" component={ColorScheme} options={{ headerTitle: t('color-scheme')}} />
|
||||
</Stack.Navigator>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user