* [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>
21 lines
No EOL
684 B
TypeScript
21 lines
No EOL
684 B
TypeScript
import { themes } from "@/lib/themes";
|
|
import { useProxy } from "@lib/storage";
|
|
import { ReactNative as RN } from "@metro/common";
|
|
import ErrorBoundary from "@ui/components/ErrorBoundary";
|
|
import ThemeCard from "@ui/settings/components/ThemeCard";
|
|
|
|
export default function Themes() {
|
|
useProxy(themes);
|
|
|
|
return (
|
|
<ErrorBoundary>
|
|
<RN.View style={{ flex: 1 }}>
|
|
<RN.FlatList
|
|
data={Object.values(themes)}
|
|
renderItem={({ item, index }) => <ThemeCard theme={item} index={index} />}
|
|
keyExtractor={item => item.id}
|
|
/>
|
|
</RN.View>
|
|
</ErrorBoundary>
|
|
)
|
|
} |