Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3386184
D5514.id18006.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D5514.id18006.diff
View Options
diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -2,6 +2,7 @@
import _isEqual from 'lodash/fp/isEqual';
import * as React from 'react';
+import { useContext } from 'react';
import {
View,
StyleSheet,
@@ -41,12 +42,14 @@
derivedDimensionsInfoSelector,
} from '../selectors/dimensions-selectors';
import { splashStyleSelector } from '../splash';
+import { StaffContext } from '../staff/staff-context';
import type { EventSubscription, KeyboardEvent } from '../types/react-native';
import type { ImageStyle } from '../types/styles';
import {
runTiming,
ratchetAlongWithKeyboardHeight,
} from '../utils/animation-utils';
+import { useStaffCanSee } from '../utils/staff-utils';
import {
type StateContainer,
type StateChange,
@@ -114,6 +117,8 @@
+splashStyle: ImageStyle,
// Redux dispatch functions
+dispatch: Dispatch,
+ +staffUserHasBeenLoggedIn: boolean,
+ +staffCanSee: boolean,
...
};
type State = {
@@ -463,6 +468,19 @@
</TouchableOpacity>
);
}
+ let staffUserHasBeenLoggedInIndicator = null;
+ if (this.props.staffCanSee && this.props.staffUserHasBeenLoggedIn) {
+ staffUserHasBeenLoggedInIndicator = (
+ <TouchableOpacity
+ onPress={undefined}
+ style={styles.button}
+ activeOpacity={0.6}
+ >
+ <Text style={styles.buttonText}>STAFF HAS BEEN LOGGED IN</Text>
+ </TouchableOpacity>
+ );
+ }
+
if (this.state.mode === 'siwe') {
panel = (
<SIWEPanel
@@ -490,6 +508,7 @@
const opacityStyle = { opacity: this.buttonOpacity };
buttons = (
<Animated.View style={[styles.buttonContainer, opacityStyle]}>
+ {staffUserHasBeenLoggedInIndicator}
{siweButton}
<TouchableOpacity
onPress={this.onPressLogIn}
@@ -658,6 +677,8 @@
const loggedIn = useSelector(isLoggedIn);
const dimensions = useSelector(derivedDimensionsInfoSelector);
const splashStyle = useSelector(splashStyleSelector);
+ const { staffUserHasBeenLoggedIn } = useContext(StaffContext);
+ const staffCanSee = useStaffCanSee();
const dispatch = useDispatch();
return (
@@ -672,6 +693,8 @@
dimensions={dimensions}
splashStyle={splashStyle}
dispatch={dispatch}
+ staffUserHasBeenLoggedIn={staffUserHasBeenLoggedIn}
+ staffCanSee={staffCanSee}
/>
);
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 3:36 AM (20 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596886
Default Alt Text
D5514.id18006.diff (2 KB)
Attached To
Mode
D5514: [native] Add `staffUserHasBeenLoggedInIndicator` to `LoggedInModal`
Attached
Detach File
Event Timeline
Log In to Comment