mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
Merge branch 'master' into currency
This commit is contained in:
commit
b9e2df143d
4 changed files with 61 additions and 42 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -55,7 +55,7 @@ jobs:
|
|||
MNEMONICS_COLDCARD: ${{ secrets.MNEMONICS_COLDCARD }}
|
||||
|
||||
e2e:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -90,7 +90,7 @@ jobs:
|
|||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
java-version: '17'
|
||||
|
||||
- name: Build
|
||||
run: npm run e2e:release-build
|
||||
|
|
|
@ -441,41 +441,4 @@ export function BlueBigCheckmark({ style = {} }) {
|
|||
<Icon name="check" size={50} type="font-awesome" color="#0f5cc0" />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const tabsStyles = StyleSheet.create({
|
||||
root: {
|
||||
flexDirection: 'row',
|
||||
height: 50,
|
||||
borderColor: '#e3e3e3',
|
||||
borderBottomWidth: 1,
|
||||
},
|
||||
tabRoot: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderColor: 'white',
|
||||
borderBottomWidth: 2,
|
||||
},
|
||||
});
|
||||
|
||||
export const BlueTabs = ({ active, onSwitch, tabs }) => (
|
||||
<View style={[tabsStyles.root, isIpad && { marginBottom: 30 }]}>
|
||||
{tabs.map((Tab, i) => (
|
||||
<TouchableOpacity
|
||||
key={i}
|
||||
accessibilityRole="button"
|
||||
onPress={() => onSwitch(i)}
|
||||
style={[
|
||||
tabsStyles.tabRoot,
|
||||
active === i && {
|
||||
borderColor: BlueCurrentTheme.colors.buttonAlternativeTextColor,
|
||||
borderBottomWidth: 2,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Tab active={active === i} />
|
||||
</TouchableOpacity>
|
||||
))}
|
||||
</View>
|
||||
);
|
||||
}
|
55
components/Tabs.tsx
Normal file
55
components/Tabs.tsx
Normal file
|
@ -0,0 +1,55 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View, TouchableOpacity } from 'react-native';
|
||||
import { useTheme } from './themes';
|
||||
|
||||
const tabsStyles = StyleSheet.create({
|
||||
root: {
|
||||
flexDirection: 'row',
|
||||
height: 50,
|
||||
borderColor: '#e3e3e3',
|
||||
borderBottomWidth: 1,
|
||||
},
|
||||
tabRoot: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderColor: 'white',
|
||||
borderBottomWidth: 2,
|
||||
},
|
||||
activeTabRoot: {
|
||||
borderColor: 'transparent',
|
||||
borderBottomWidth: 2,
|
||||
},
|
||||
marginBottom: {
|
||||
marginBottom: 30,
|
||||
},
|
||||
});
|
||||
|
||||
interface TabProps {
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
interface TabsProps {
|
||||
active: number;
|
||||
onSwitch: (index: number) => void;
|
||||
tabs: React.ComponentType<TabProps>[];
|
||||
isIpad?: boolean;
|
||||
}
|
||||
|
||||
export const Tabs: React.FC<TabsProps> = ({ active, onSwitch, tabs, isIpad = false }) => {
|
||||
const { colors } = useTheme();
|
||||
return (
|
||||
<View style={[tabsStyles.root, isIpad && tabsStyles.marginBottom]}>
|
||||
{tabs.map((Tab, i) => (
|
||||
<TouchableOpacity
|
||||
key={i}
|
||||
accessibilityRole="button"
|
||||
onPress={() => onSwitch(i)}
|
||||
style={[tabsStyles.tabRoot, active === i && { ...tabsStyles.activeTabRoot, borderColor: colors.buttonAlternativeTextColor }]}
|
||||
>
|
||||
<Tab active={active === i} />
|
||||
</TouchableOpacity>
|
||||
))}
|
||||
</View>
|
||||
);
|
||||
};
|
|
@ -8,9 +8,10 @@ import { useNavigation, useRoute } from '@react-navigation/native';
|
|||
import loc from '../../loc';
|
||||
import { BlueCurrentTheme, useTheme } from '../../components/themes';
|
||||
import { FContainer, FButton } from '../../components/FloatButtons';
|
||||
import { BlueSpacing20, BlueTabs } from '../../BlueComponents';
|
||||
import { BlueSpacing20 } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
import { Tabs } from '../../components/Tabs';
|
||||
|
||||
const ENTROPY_LIMIT = 256;
|
||||
|
||||
|
@ -244,7 +245,7 @@ const Entropy = () => {
|
|||
</View>
|
||||
</TouchableOpacity>
|
||||
|
||||
<BlueTabs
|
||||
<Tabs
|
||||
active={tab}
|
||||
onSwitch={setTab}
|
||||
tabs={[
|
||||
|
|
Loading…
Add table
Reference in a new issue