Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,261 @@
|
||||
/* Metro module 13461; source: modules/user_settings/devices/native/UserSettingsSessions.tsx; dependencies: [57, 31, 27, 1878, 661, 33, 4501, 6597, 697, 13258, 566, 13462, 4572, 6231, 1244, 6238, 6618, 4573, 1360, 5278, 1305, 8160, 1484, 11785, 7508, 13463, 10160, 10890, 8990, 13464, 2] */
|
||||
function _fun102356(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:6, offset: 0x022386e2, size: 551 bytes, params: 8, frame: 27
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = value.ScrollView;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const Fonts = value.Fonts;
|
||||
const env0_9 = value.UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {description: {'paddingHorizontal': 16, 'paddingTop': 8, 'marginBottom': 8}};
|
||||
const object4 = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
copyDataProperties(object4, textStyles(PRIMARY_MEDIUM, TEXT_DEFAULT, 14), undefined);
|
||||
object4['fontWeight'] = '500';
|
||||
object3.detailsText = object4;
|
||||
object3.container = {'display': 'flex', 'flex': 1};
|
||||
object3.loading = {marginTop: 16};
|
||||
object3.sessionInfo = {display: 'flex'};
|
||||
object3.sessionInfoRow = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'};
|
||||
object3.sessionInfoRowSpacing = {marginHorizontal: 4};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object3.logoutButton = {marginRight: 10, tintColor: INTERACTIVE_TEXT_DEFAULT};
|
||||
object3.list = {paddingHorizontal: 16};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/devices/native/UserSettingsSessions.tsx');
|
||||
exports.default = UserSettingsSessionsContainer;
|
||||
}
|
||||
|
||||
function UserSettingsSessions() { // fn#102357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:752, offset: 0x02238909, size: 981 bytes, params: 1, frame: 32
|
||||
var r10;
|
||||
var r8;
|
||||
var Stack;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
var length;
|
||||
var object4;
|
||||
var TableRow;
|
||||
var object5;
|
||||
const styles = useStyles();
|
||||
const {currentSession,
|
||||
otherSessions} = (require(13258) /* metro dependency 13258: AuthSessionsUtils */).useAuthSessions();
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const [property, env0_1] = env0_3(env0_4.useState(false), 2);
|
||||
env0_4.useEffect(_fun102359, []);
|
||||
const value5 = null;
|
||||
if (value5 == currentSession) {
|
||||
r8 = property ? <View style={styles.loading}><ActivityIndicator /></View> : value5;
|
||||
} else {
|
||||
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
var stackProps = {spacing: 24, style: styles.list};
|
||||
items2 = [<TableRowGroup title={intl.string(t.LLS19o)} hasIcons>{value5 != currentSession ? <SessionInfo session={currentSession} current /> : value5}</TableRowGroup>];
|
||||
length = otherSessions.length;
|
||||
if (length > 0) {
|
||||
r10 = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>{otherSessions.map(_fun102362)}<UnknownLegacySessionsInfo /></TableRowGroup>;
|
||||
} else if (value5 == currentUser) {
|
||||
r10 = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>{otherSessions.map(_fun102362)}<UnknownLegacySessionsInfo /></TableRowGroup>;
|
||||
} else if (currentUser.mfaEnabled) {
|
||||
r10 = value5;
|
||||
} else {
|
||||
r10 = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>{otherSessions.map(_fun102362)}<UnknownLegacySessionsInfo /></TableRowGroup>;
|
||||
}
|
||||
items2[1] = r10;
|
||||
length = otherSessions.length;
|
||||
if (length > 0) {
|
||||
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
r8 = <TableRow start end variant="danger" label={intl.string(t.cLmmeY)} subLabel={intl.string(t.OTXyaf)} onPress={onPress_102363} />;
|
||||
} else {
|
||||
r8 = value5;
|
||||
}
|
||||
items2[2] = r8;
|
||||
r8 = <Stack {...stackProps}>{items2}</Stack>;
|
||||
}
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<ScrollView style={styles.container}>
|
||||
<SafeAreaPaddingView bottom>
|
||||
<Text variant="text-sm/medium" style={styles.description}>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zZp618)}
|
||||
</Text>
|
||||
{r8}
|
||||
</SafeAreaPaddingView>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
function SessionInfo({session, current}) { // fn#102365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:2018, offset: 0x02238dd5, size: 1421 bytes, params: 2, frame: 40
|
||||
var r16;
|
||||
var r14;
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var moduleValue;
|
||||
var jsxRuntimeEnv0_12Binding;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const r20 = session.client_info?.location ?? session.client_info?.ip;
|
||||
const platform = session.client_info?.platform;
|
||||
const os = session.client_info?.os;
|
||||
let r6 = os == null ? undefined : os.toLowerCase().trim();
|
||||
if (r6 === null) {
|
||||
object = {};
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
|
||||
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
|
||||
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
|
||||
r6 = object;
|
||||
} else if (r6 === undefined) {
|
||||
object = {};
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
|
||||
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
|
||||
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
|
||||
r6 = object;
|
||||
} else if (r6 === '') {
|
||||
object = {};
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
|
||||
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
|
||||
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
|
||||
r6 = object;
|
||||
} else if (r6 === 'ios') {
|
||||
object = {text: os};
|
||||
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
|
||||
object.IconComponent = (require(8990) /* metro dependency 8990: MobilePhoneIcon */).MobilePhoneIcon;
|
||||
r6 = object;
|
||||
} else if (r6 === 'android') {
|
||||
object = {text: os};
|
||||
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
|
||||
object.IconComponent = (require(8990) /* metro dependency 8990: MobilePhoneIcon */).MobilePhoneIcon;
|
||||
r6 = object;
|
||||
} else if (r6 === 'horizon os') {
|
||||
object = {text: os};
|
||||
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
|
||||
object.IconComponent = (require(13464) /* metro dependency 13464: VrHeadsetIcon */).VrHeadsetIcon;
|
||||
r6 = object;
|
||||
} else {
|
||||
object = {text: os};
|
||||
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
|
||||
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
|
||||
r6 = object;
|
||||
}
|
||||
const text = r6.text;
|
||||
const iconSource = r6.iconSource;
|
||||
const IconComponent = r6.IconComponent;
|
||||
if (current) {
|
||||
r16 = null;
|
||||
} else {
|
||||
moduleValue = require(13258) /* metro dependency 13258: AuthSessionsUtils */;
|
||||
r16 = moduleValue.formatDate(session.approx_last_used_time);
|
||||
}
|
||||
object = [text, platform];
|
||||
const value7 = object.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
const PressableComponent = current ? null : ((PressableOpacity) => <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.E4MJNt)} onPress={onPress_102366} hitSlop={{'top': 5,
|
||||
'left': 5, 'bottom': 5,
|
||||
'right': 5}}>{((Icon) => <Icon style={styles.logoutButton} source={importDefault(8160) /* metro dependency 8160 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text2 = <Text variant="text-md/semibold">{value7[0]}</Text>;
|
||||
const value10 = value7.length > 1;
|
||||
if (value10) {
|
||||
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
items2 = [<Text variant="text-md/semibold" accessibilityLabel="," style={styles.sessionInfoRowSpacing}>{'·'}</Text>];
|
||||
items2[1] = <Text variant="text-md/semibold">{value7[1]}</Text>;
|
||||
r14 = <>{items2}</>;
|
||||
} else {
|
||||
r14 = value10;
|
||||
}
|
||||
const view = <View style={styles.sessionInfo} accessible><View style={styles.sessionInfoRow}>{text2}{r14}</View></View>;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Icon = TableRow2.Icon;
|
||||
return (
|
||||
<TableRow
|
||||
icon={<Icon source={iconSource} IconComponent={IconComponent} variant="translucent" />}
|
||||
label={view}
|
||||
subLabel={<View accessible>{r20 != null && <View style={styles.sessionInfoRow}><Text variant="text-xs/medium" color="text-subtle" style={styles.detailsText}>{r20}</Text></View>}{r16 != null && <View style={styles.sessionInfoRow}><Text variant="text-xs/medium" color="text-subtle" style={styles.detailsText}>{r16}</Text></View>}</View>}
|
||||
trailing={PressableComponent}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UnknownLegacySessionsInfo() { // fn#102367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:3953, offset: 0x02239395, size: 256 bytes, params: 1, frame: 21
|
||||
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {};
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Icon = TableRow2.Icon;
|
||||
object2.icon = <Icon variant="translucent" source={importDefault(11785) /* metro dependency 11785 */} />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iUa0sn);
|
||||
object2.subLabel = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['044+8i'],
|
||||
{onClick: onClick_102368});
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function UserSettingsSessionsContainer() { // fn#102369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:4391, offset: 0x022394e0, size: 23 bytes, params: 1, frame: 13
|
||||
return <UserSettingsSessions />;
|
||||
}
|
||||
|
||||
function _fun102359() { // fn#102359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:981, offset: 0x02238cde, size: 77 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(13462) /* metro dependency 13462: AuthSessionsActionCreators */).fetchAuthSessions();
|
||||
const env0_0 = global.setTimeout(_fun102360, 500);
|
||||
return _fun102361;
|
||||
}
|
||||
|
||||
function _fun102362(a0) { // fn#102362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1503, offset: 0x02238d64, size: 38 bytes, params: 2, frame: 15
|
||||
return <SessionInfo session={a0} key={a0.id_hash} />;
|
||||
}
|
||||
|
||||
function UserSettingsSessionsOnPress() { // fn#102363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1753, owner: UserSettingsSessions.onPress, offset: 0x02238d8a, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = require(13462) /* metro dependency 13462: AuthSessionsActionCreators */;
|
||||
const logOutSessions = value.logOutSessions;
|
||||
const otherSessionsBinding = otherSessions;
|
||||
return Reflect.apply(logOutSessions, value, [otherSessionsBinding.map(function(a0) {
|
||||
return a0.id_hash;
|
||||
})]);
|
||||
}
|
||||
|
||||
function SessionInfoOnPress() { // fn#102366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:2995, owner: SessionInfo.onPress, offset: 0x02239362, size: 51 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(13462) /* metro dependency 13462: AuthSessionsActionCreators */;
|
||||
return value.logOutSessions(session.id_hash);
|
||||
}
|
||||
|
||||
function UnknownLegacySessionsInfoOnClick() { // fn#102368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:4226, owner: UnknownLegacySessionsInfo.onClick, offset: 0x02239495, size: 75 bytes, params: 1, frame: 13
|
||||
const defaultImport = importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */;
|
||||
const setSection = defaultImport.setSection;
|
||||
let ACCOUNT = UserSettingsSections.ACCOUNT;
|
||||
Reflect.apply(setSection, defaultImport, [ACCOUNT]);
|
||||
const binding = env0_0;
|
||||
const push = binding.push;
|
||||
ACCOUNT = UserSettingsSections.ACCOUNT;
|
||||
Reflect.apply(push, binding, [ACCOUNT]);
|
||||
}
|
||||
|
||||
function _fun102361() { // fn#102361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1055, offset: 0x02238d2b, size: 57 bytes, params: 1, frame: 12
|
||||
const clearTimeout = global.clearTimeout;
|
||||
clearTimeout(env0_0);
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(13462) /* metro dependency 13462: AuthSessionsActionCreators */).clearAuthSessions();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user