mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-05 11:18:24 +00:00
Merge remote-tracking branch 'origin/ui-impr' into issue48
This commit is contained in:
@@ -25,7 +25,8 @@
|
|||||||
],
|
],
|
||||||
"recognizedJSXAttributes": [
|
"recognizedJSXAttributes": [
|
||||||
"tx",
|
"tx",
|
||||||
"subTx"
|
"subTx",
|
||||||
|
"contentTx"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,19 +216,17 @@ export function BottomModal(props: ModalProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const $outerContainerBase: ViewStyle = {
|
const $outerContainerBase: ViewStyle = {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
margin: 0,
|
margin: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
const $innerContainerBase: ViewStyle = {
|
const $innerContainerBase: ViewStyle = {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
borderTopLeftRadius: spacing.small,
|
borderTopLeftRadius: spacing.small,
|
||||||
borderTopRightRadius: spacing.small,
|
borderTopRightRadius: spacing.small,
|
||||||
padding: spacing.small
|
padding: spacing.small
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
+21
-16
@@ -1,20 +1,25 @@
|
|||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { StyleSheet, View, ActivityIndicator, ViewProps, TextStyle } from 'react-native'
|
import { StyleSheet, View, ActivityIndicator, ViewProps, TextStyle, ColorValue, ViewStyle } from 'react-native'
|
||||||
import { useThemeColor } from '../theme'
|
import { useThemeColor } from '../theme'
|
||||||
import { Text } from './Text'
|
import { Text } from './Text'
|
||||||
|
import { spacing } from '../theme'
|
||||||
|
|
||||||
export function Loading(props: ViewProps & {statusMessage?: string, textStyle?: TextStyle}) {
|
export function Loading(props: ViewProps & { statusMessage?: string, textStyle?: TextStyle, shiftedUp?: boolean }) {
|
||||||
return (
|
return (
|
||||||
<View style={[{
|
<View style={[StyleSheet.absoluteFillObject, $loading(useThemeColor('background'), props?.shiftedUp ?? false), props.style]}>
|
||||||
flex: 1,
|
<ActivityIndicator color="#ccc" animating size="large" />
|
||||||
alignItems: 'center',
|
{props.statusMessage && (<Text style={[{opacity: 1}, props.textStyle]} text={props.statusMessage}/>)}
|
||||||
backgroundColor: useThemeColor('background'),
|
</View>
|
||||||
opacity: 0.5,
|
)
|
||||||
justifyContent: 'center',
|
}
|
||||||
zIndex: 9999,
|
|
||||||
}, StyleSheet.absoluteFillObject, props.style]}>
|
const $loading = (bg: ColorValue, shiftedUp = false) => ({
|
||||||
<ActivityIndicator color="#ccc" animating size="large" />
|
flex: 1,
|
||||||
{props.statusMessage && (<Text style={[{opacity: 1}, props.textStyle]} text={props.statusMessage}/>)}
|
alignItems: 'center',
|
||||||
</View>
|
justifyContent: 'center',
|
||||||
)
|
backgroundColor: bg,
|
||||||
}
|
opacity: 0.5,
|
||||||
|
zIndex: 9999,
|
||||||
|
// for cards that go up in the header, the loading should cover them
|
||||||
|
marginTop: shiftedUp ? -(spacing.extraLarge * 2 + spacing.small) : 0,
|
||||||
|
} satisfies ViewStyle)
|
||||||
@@ -466,7 +466,7 @@ export const OwnName = observer(function (props: {navigation: any, pubkey: strin
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isLoading && <Loading />}
|
{isLoading && <Loading />}
|
||||||
</View>
|
</View>
|
||||||
<BottomModal
|
<BottomModal
|
||||||
isVisible={isResultModalVisible ? true : false}
|
isVisible={isResultModalVisible ? true : false}
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ export const IncomingRequests = observer(function (props: {
|
|||||||
style={$card}
|
style={$card}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isLoading && <Loading />}
|
|
||||||
</View>
|
</View>
|
||||||
|
{isLoading && <Loading />}
|
||||||
{error && <ErrorModal error={error} />}
|
{error && <ErrorModal error={error} />}
|
||||||
{info && <InfoModal message={info} />}
|
{info && <InfoModal message={info} />}
|
||||||
</Screen>
|
</Screen>
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ const $unselected: ViewStyle = {
|
|||||||
|
|
||||||
const $contentContainer: TextStyle = {
|
const $contentContainer: TextStyle = {
|
||||||
padding: spacing.small,
|
padding: spacing.small,
|
||||||
|
minHeight: spacing.huge,
|
||||||
}
|
}
|
||||||
|
|
||||||
const $picturesContainer: TextStyle = {
|
const $picturesContainer: TextStyle = {
|
||||||
|
|||||||
@@ -349,8 +349,8 @@ export const TranHistoryScreen: FC<TransactionsStackScreenProps<'TranHistory'>>
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
style={{maxHeight: spacing.screenHeight * 0.66}}
|
style={{maxHeight: spacing.screenHeight * 0.66}}
|
||||||
/>
|
/>
|
||||||
{isLoading && <Loading />}
|
{isLoading && <Loading shiftedUp={true} />}
|
||||||
</View>
|
</View>
|
||||||
<BottomModal
|
<BottomModal
|
||||||
isVisible={isDeleteModalVisible ? true : false}
|
isVisible={isDeleteModalVisible ? true : false}
|
||||||
|
|||||||
Reference in New Issue
Block a user