@onehat/ui 0.2.56 → 0.2.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Modal,
|
|
2
4
|
Row,
|
|
3
5
|
Text,
|
|
4
6
|
} from 'native-base';
|
|
@@ -9,10 +11,20 @@ export default function WaitMessage(props) {
|
|
|
9
11
|
textMessage = 'Please wait...',
|
|
10
12
|
} = props;
|
|
11
13
|
|
|
12
|
-
return <
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
return <Modal {...props} _backdrop={{ bg: "#000" }}>
|
|
15
|
+
<Modal.Content>
|
|
16
|
+
<Modal.Body
|
|
17
|
+
borderTopWidth={0}
|
|
18
|
+
bg="#fff"
|
|
19
|
+
p={3}
|
|
20
|
+
justifyContent="center"
|
|
21
|
+
alignItems="center"
|
|
22
|
+
borderRadius={5}
|
|
23
|
+
flexDirection="row"
|
|
24
|
+
>
|
|
25
|
+
<Loading minHeight="auto" h={5} w={5} mr={2} />
|
|
26
|
+
<Text color="#000">{textMessage}</Text>
|
|
27
|
+
</Modal.Body>
|
|
28
|
+
</Modal.Content>
|
|
29
|
+
</Modal>;
|
|
18
30
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import UiGlobals from '../UiGlobals.js';
|
|
2
2
|
|
|
3
3
|
export default function(clearAll = false) {
|
|
4
|
-
const reduxState =
|
|
4
|
+
const reduxState = UiGlobals.redux.getState();
|
|
5
5
|
if (!reduxState.App.user || (!reduxState.App.user.token && !reduxState.App.user.users__token)) {
|
|
6
6
|
return {};
|
|
7
7
|
}
|
package/src/UiGlobals.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { CURRENT_MODE } from './Constants/UiModes.js';
|
|
2
|
+
import _ from 'lodash';
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
const Globals = {
|
|
5
6
|
mode: CURRENT_MODE,
|
|
6
7
|
};
|
|
7
8
|
|
|
8
|
-
export default Globals;
|
|
9
|
+
export default Globals;
|
|
10
|
+
|
|
11
|
+
export function setGlobals(globals) {
|
|
12
|
+
_.merge(Globals, globals);
|
|
13
|
+
}
|