Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bf519e43c9 | |||
| d371fd2bb7 |
@@ -81,24 +81,34 @@ function RootLayoutInner() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ThemedBackground({ children }: { children: React.ReactNode }) {
|
||||||
|
const { isDark } = useThemeContext();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ImageBackground
|
||||||
|
source={isDark ? require('../assets/bg_dark.png') : require('../assets/bg.png')}
|
||||||
|
style={bgStyles.background}
|
||||||
|
resizeMode="cover"
|
||||||
|
imageStyle={bgStyles.backgroundImage}
|
||||||
|
>
|
||||||
|
<View style={[bgStyles.overlay, isDark && bgStyles.overlayDark]} />
|
||||||
|
{children}
|
||||||
|
</ImageBackground>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export default function RootLayout() {
|
export default function RootLayout() {
|
||||||
return (
|
return (
|
||||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||||
<ImageBackground
|
|
||||||
source={require('../assets/bg.png')}
|
|
||||||
style={bgStyles.background}
|
|
||||||
resizeMode="cover"
|
|
||||||
imageStyle={bgStyles.backgroundImage}
|
|
||||||
>
|
|
||||||
<View style={bgStyles.overlay} />
|
|
||||||
<SafeAreaProvider>
|
<SafeAreaProvider>
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<RootLayoutInner />
|
<ThemedBackground>
|
||||||
|
<RootLayoutInner />
|
||||||
|
</ThemedBackground>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
</SafeAreaProvider>
|
</SafeAreaProvider>
|
||||||
</ImageBackground>
|
|
||||||
</GestureHandlerRootView>
|
</GestureHandlerRootView>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -108,10 +118,13 @@ const bgStyles = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
backgroundImage: {
|
backgroundImage: {
|
||||||
opacity: 0.8,
|
opacity: 0.55,
|
||||||
},
|
},
|
||||||
overlay: {
|
overlay: {
|
||||||
...StyleSheet.absoluteFillObject,
|
...StyleSheet.absoluteFillObject,
|
||||||
backgroundColor: 'rgba(255, 252, 245, 0.2)',
|
backgroundColor: 'rgba(255, 252, 245, 0.48)',
|
||||||
|
},
|
||||||
|
overlayDark: {
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.25)',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
@@ -26,7 +26,7 @@ export const colors = {
|
|||||||
warning: '#FF9500',
|
warning: '#FF9500',
|
||||||
|
|
||||||
// Surface
|
// Surface
|
||||||
background: '#fbfbfb',
|
background: 'transparent',
|
||||||
card: '#ffffff',
|
card: '#ffffff',
|
||||||
surfaceLow: '#f2f4f5',
|
surfaceLow: '#f2f4f5',
|
||||||
surface: '#eceeef',
|
surface: '#eceeef',
|
||||||
@@ -72,7 +72,7 @@ export const darkColors = {
|
|||||||
warning: '#FF9500',
|
warning: '#FF9500',
|
||||||
|
|
||||||
// Surface
|
// Surface
|
||||||
background: '#121212',
|
background: 'transparent',
|
||||||
card: '#1e1e1e',
|
card: '#1e1e1e',
|
||||||
surfaceLow: '#2a2a2a',
|
surfaceLow: '#2a2a2a',
|
||||||
surface: '#333333',
|
surface: '#333333',
|
||||||
|
|||||||
Reference in New Issue
Block a user