Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32884466
D5514.1768160728.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D5514.1768160728.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,15 @@
</TouchableOpacity>
);
}
+ let staffUserHasBeenLoggedInIndicator = null;
+ if (this.props.staffCanSee && this.props.staffUserHasBeenLoggedIn) {
+ staffUserHasBeenLoggedInIndicator = (
+ <TouchableOpacity 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 +504,7 @@
const opacityStyle = { opacity: this.buttonOpacity };
buttons = (
<Animated.View style={[styles.buttonContainer, opacityStyle]}>
+ {staffUserHasBeenLoggedInIndicator}
{siweButton}
<TouchableOpacity
onPress={this.onPressLogIn}
@@ -658,6 +673,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 +689,8 @@
dimensions={dimensions}
splashStyle={splashStyle}
dispatch={dispatch}
+ staffUserHasBeenLoggedIn={staffUserHasBeenLoggedIn}
+ staffCanSee={staffCanSee}
/>
);
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 11, 7:45 PM (2 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5920088
Default Alt Text
D5514.1768160728.diff (2 KB)
Attached To
Mode
D5514: [native] Add `staffUserHasBeenLoggedInIndicator` to `LoggedInModal`
Attached
Detach File
Event Timeline
Log In to Comment