mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-07-22 07:48:28 +00:00
Android navigation bar theming, hotupdater switch to fingerprint deployment
This commit is contained in:
@@ -95,7 +95,7 @@ android {
|
||||
applicationId "com.minibits_wallet"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 58065
|
||||
versionCode 58068
|
||||
versionName "0.4.0"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">Minibits</string>
|
||||
<string name="hot_updater_fingerprint_hash" moduleConfig="true">440d1216e37cbc37f8613487dc90c89d54f1c1b6</string>
|
||||
<string name="hot_updater_fingerprint_hash" moduleConfig="true">52a90c95e5a8b3d48b60c5a12a638832479c59ae</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<style name="AppTheme" parent="Theme.EdgeToEdge">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
||||
<!-- Fixed dark window background shown before React Native renders its first frame.
|
||||
Matches the dark app themes (DEFAULT/DARK/GOLDEN). For LIGHT theme, the JS
|
||||
splash view overrides this immediately on first render. -->
|
||||
<item name="android:windowBackground">#2e2e2e</item>
|
||||
<!-- Disable automatic contrast enforcement so the JS-side SystemBars component
|
||||
can explicitly control nav bar icon colors to match the app theme. -->
|
||||
<item name="enforceNavigationBarContrast">false</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
226
fingerprint.json
226
fingerprint.json
File diff suppressed because one or more lines are too long
@@ -33,5 +33,5 @@ export default defineConfig({
|
||||
projectId: process.env.HOT_UPDATER_FIREBASE_PROJECT_ID!,
|
||||
credential,
|
||||
}),
|
||||
updateStrategy: "appVersion", // or "fingerprint"
|
||||
updateStrategy: "fingerprint",
|
||||
});
|
||||
@@ -44,9 +44,9 @@
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>This app uses NFC to pay on supported POS</string>
|
||||
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
|
||||
<array>
|
||||
<array>
|
||||
<string>D2760000850101</string>
|
||||
</array>
|
||||
</array>
|
||||
<key>RCTNewArchEnabled</key>
|
||||
<true/>
|
||||
<key>UIAppFonts</key>
|
||||
@@ -77,7 +77,7 @@
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>HOT_UPDATER_FINGERPRINT_HASH</key>
|
||||
<string>98c1f26187f02f38ddef1fcb75384246a1c5fa03</string>
|
||||
<string>52a90c95e5a8b3d48b60c5a12a638832479c59ae</string>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
<key>CFBundlePrimaryIcon</key>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "minibits_wallet",
|
||||
"version": "0.4.0-beta.1",
|
||||
"version": "0.4.0-beta.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:clean": "cd android && ./gradlew clean",
|
||||
@@ -61,6 +61,7 @@
|
||||
"react-native-animated-pagination-dots": "^0.1.73",
|
||||
"react-native-camera-kit": "16.2.1",
|
||||
"react-native-change-icon": "^3.0.0",
|
||||
"react-native-edge-to-edge": "^1.8.1",
|
||||
"react-native-exit-app": "^2.0.0",
|
||||
"react-native-fast-image": "^8.6.3",
|
||||
"react-native-flash-message": "^0.4.2",
|
||||
|
||||
@@ -16,6 +16,7 @@ import {ErrorBoundary} from './screens/ErrorScreen/ErrorBoundary'
|
||||
import Config from './config'
|
||||
import {log} from './services'
|
||||
import { Image, TextStyle, View } from 'react-native'
|
||||
import { SystemBars } from 'react-native-edge-to-edge'
|
||||
import { ThemeCode, colors, spacing, typography } from './theme'
|
||||
import useColorScheme from './theme/useThemeColor'
|
||||
import { displayName } from '../app.json'
|
||||
@@ -190,6 +191,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<SafeAreaProvider>
|
||||
<SystemBars style={isLight ? 'dark' : 'light'} />
|
||||
<Screen preset='fixed' backgroundColor={splashBg} safeAreaEdges={['top', 'bottom']}>
|
||||
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
|
||||
<Image source={isGolden
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
View,
|
||||
ViewStyle,
|
||||
StatusBar,
|
||||
StatusBarProps,
|
||||
ColorValue,
|
||||
Platform
|
||||
} from "react-native"
|
||||
@@ -142,10 +141,6 @@ export interface HeaderProps {
|
||||
* Override the default edges for the safe area.
|
||||
*/
|
||||
safeAreaEdges?: ExtendedEdge[]
|
||||
/**
|
||||
* Pass any additional props directly to the StatusBar component.
|
||||
*/
|
||||
StatusBarProps?: StatusBarProps
|
||||
/**
|
||||
* Shared value from scroll position for animated title.
|
||||
* When provided, the title will fade in as the user scrolls.
|
||||
@@ -170,11 +165,12 @@ interface HeaderActionProps {
|
||||
}
|
||||
|
||||
|
||||
/* Needed to keep status bar styles on navigation tabs */
|
||||
function FocusAwareStatusBar(props: StatusBarProps) {
|
||||
const isFocused = useIsFocused();
|
||||
|
||||
return isFocused ? <StatusBar translucent={true} {...props} /> : null;
|
||||
/* Keeps status bar style in sync with navigation focus — only applies when this screen is active.
|
||||
Uses React Native's StatusBar (status bar only) so it does not override the nav bar icon style
|
||||
managed by the root SystemBars in AppNavigator. */
|
||||
function FocusAwareStatusBar() {
|
||||
const isFocused = useIsFocused()
|
||||
return isFocused ? <StatusBar translucent barStyle="light-content" /> : null
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -213,7 +209,6 @@ export function Header(props: HeaderProps) {
|
||||
style: $styleOverride,
|
||||
titleStyle: $titleStyleOverride,
|
||||
containerStyle: $containerStyleOverride,
|
||||
StatusBarProps,
|
||||
scrollY,
|
||||
scrollDistance = 60,
|
||||
} = props
|
||||
@@ -237,10 +232,7 @@ export function Header(props: HeaderProps) {
|
||||
|
||||
return (
|
||||
<View style={[$container, $containerInsets, { backgroundColor }, $containerStyleOverride]}>
|
||||
<FocusAwareStatusBar
|
||||
barStyle = 'light-content'
|
||||
{...StatusBarProps}
|
||||
/>
|
||||
<FocusAwareStatusBar />
|
||||
<View style={[$wrapper, $styleOverride]}>
|
||||
<HeaderAction
|
||||
tx={leftTx}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
import {
|
||||
createStaticNavigation,
|
||||
DarkTheme,
|
||||
DefaultTheme,
|
||||
StaticParamList,
|
||||
DefaultTheme,
|
||||
StaticParamList,
|
||||
} from "@react-navigation/native"
|
||||
import { createNativeStackNavigator } from "@react-navigation/native-stack"
|
||||
import { observer } from "mobx-react-lite"
|
||||
@@ -11,7 +11,7 @@ import Config from "../config"
|
||||
import {
|
||||
WelcomeScreen,
|
||||
SeedRecoveryScreen,
|
||||
MintsScreen,
|
||||
MintsScreen,
|
||||
SeedRecoveryOptionsScreen,
|
||||
ImportBackupScreen,
|
||||
RecoverWalletAddressScreen,
|
||||
@@ -21,8 +21,10 @@ import {
|
||||
import { rootStoreInstance } from "../models"
|
||||
import { TabsNavigator } from "./TabsNavigator"
|
||||
import { navigationRef, useBackButtonHandler } from "./navigationUtilities"
|
||||
import { useThemeColor } from "../theme"
|
||||
import { ThemeCode, useThemeColor } from "../theme"
|
||||
import useColorScheme from "../theme/useThemeColor"
|
||||
import { MMKVStorage } from "../services"
|
||||
import { SystemBars } from "react-native-edge-to-edge"
|
||||
|
||||
|
||||
/**
|
||||
@@ -65,7 +67,12 @@ export const AppNavigator = observer(function AppNavigator() {
|
||||
|
||||
useBackButtonHandler((routeName) => exitRoutes.includes(routeName))
|
||||
|
||||
const dark = useColorScheme() === 'dark' ? true : false
|
||||
const colorScheme = useColorScheme()
|
||||
const dark = colorScheme === 'dark'
|
||||
const theme = MMKVStorage.loadTheme()
|
||||
const isLightTheme = theme === ThemeCode.LIGHT ||
|
||||
(theme === ThemeCode.DEFAULT && colorScheme === 'light')
|
||||
|
||||
const background = useThemeColor('background') as string
|
||||
const primary = useThemeColor('tabActiveIcon') as string
|
||||
const card = useThemeColor('background') as string
|
||||
@@ -90,10 +97,13 @@ export const AppNavigator = observer(function AppNavigator() {
|
||||
}
|
||||
|
||||
return (
|
||||
<Navigation
|
||||
// @ts-ignore
|
||||
ref={navigationRef}
|
||||
theme={NavigationTheme}
|
||||
/>
|
||||
<>
|
||||
<SystemBars style={isLightTheme ? "dark" : "light"} />
|
||||
<Navigation
|
||||
// @ts-ignore
|
||||
ref={navigationRef}
|
||||
theme={NavigationTheme}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -72,7 +72,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
try {
|
||||
const updateInfo = await HotUpdater.checkForUpdate({
|
||||
source: getUpdateSource(HOT_UPDATER_URL, {
|
||||
updateStrategy: "appVersion",
|
||||
updateStrategy: "fingerprint",
|
||||
}),
|
||||
requestHeaders: {
|
||||
Authorization: `Bearer ${HOT_UPDATER_API_KEY}`,
|
||||
|
||||
@@ -91,7 +91,7 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
setIsUpdateModalVisible(true)
|
||||
const updateInfo = await HotUpdater.checkForUpdate({
|
||||
source: getUpdateSource(HOT_UPDATER_URL, {
|
||||
updateStrategy: "appVersion",
|
||||
updateStrategy: "fingerprint",
|
||||
}),
|
||||
requestHeaders: {
|
||||
Authorization: `Bearer ${HOT_UPDATER_API_KEY}`,
|
||||
|
||||
@@ -128,7 +128,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
try {
|
||||
const updateInfo = await HotUpdater.checkForUpdate({
|
||||
source: getUpdateSource(HOT_UPDATER_URL, {
|
||||
updateStrategy: "appVersion",
|
||||
updateStrategy: "fingerprint",
|
||||
}),
|
||||
requestHeaders: {
|
||||
Authorization: `Bearer ${HOT_UPDATER_API_KEY}`,
|
||||
|
||||
11
yarn.lock
11
yarn.lock
@@ -14672,6 +14672,7 @@ __metadata:
|
||||
react-native-change-icon: ^3.0.0
|
||||
react-native-clean-project: ^4.0.3
|
||||
react-native-dotenv: ^3.4.11
|
||||
react-native-edge-to-edge: ^1.8.1
|
||||
react-native-exit-app: ^2.0.0
|
||||
react-native-fast-image: ^8.6.3
|
||||
react-native-flash-message: ^0.4.2
|
||||
@@ -16530,6 +16531,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-edge-to-edge@npm:^1.8.1":
|
||||
version: 1.8.1
|
||||
resolution: "react-native-edge-to-edge@npm:1.8.1"
|
||||
peerDependencies:
|
||||
react: "*"
|
||||
react-native: "*"
|
||||
checksum: 712081dffc84c8c65cae99732b3ecb7cae2c4dfa49c18855a317a27370be96f87397f628c8d174a8819a383eb83a5011e6785a8040aaedb15b14baf1083ba882
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-exit-app@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "react-native-exit-app@npm:2.0.0"
|
||||
|
||||
Reference in New Issue
Block a user