523 lines
30 KiB
TypeScript
523 lines
30 KiB
TypeScript
/* Metro module 10361; source: modules/user_profile/native/UserProfileConnections.tsx; dependencies: [31, 27, 1949, 3996, 6816, 661, 5044, 33, 1305, 4501, 697, 10362, 3860, 4002, 10365, 10366, 8514, 5043, 4915, 1423, 8872, 4863, 3853, 4081, 6797, 3856, 1244, 5278, 3859, 4573, 6249, 3868, 566, 10367, 6815, 10372, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import AvatarUtils from '../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
|
|
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
|
|
import Linking from '../../../lib/native/Linking.tsx'; /* Metro dependency 3853 */
|
|
import StreamerModeStore from '../../../stores/StreamerModeStore.tsx'; /* Metro dependency 3996 */
|
|
import Platforms from '../../../lib/Platforms.tsx'; /* Metro dependency 4915 */
|
|
import Module10365 from '../../../by-id/module-10365.js'; /* Metro dependency 10365 */
|
|
import Module10366 from '../../../by-id/module-10366.js'; /* Metro dependency 10366 */
|
|
import UseVisibleUserProfileConnectionsAndAppIdentities from '../hooks/useVisibleUserProfileConnectionsAndAppIdentities.tsx'; /* Metro dependency 10367 */
|
|
import UseUserProfileApplicationRoleConnections from '../hooks/useUserProfileApplicationRoleConnections.tsx'; /* Metro dependency 10372 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as AvatarUtilsModule from '../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
|
|
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
|
|
import * as BaseIconImageModule from '../../../design/components/Icon/native/BaseIconImage.tsx'; /* Metro dependency 3859 */
|
|
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
|
|
import * as NativeModule2 from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
|
|
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
|
|
import * as ConstantsModule2 from '../../connections/Constants.tsx'; /* Metro dependency 5044 */
|
|
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
|
|
import * as UserProfileCardModule from './UserProfileCard.tsx'; /* Metro dependency 6815 */
|
|
import * as ConstantsModule3 from './Constants.tsx'; /* Metro dependency 6816 */
|
|
import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */
|
|
import * as ConnectionMetadataVanityItemsModule from '../../connections/native/ConnectionMetadataVanityItems.tsx'; /* Metro dependency 10362 */
|
|
|
|
function _fun80261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6, offset: 0x01e73405, size: 737 bytes, params: 8, frame: 28
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const constantsModule = ConstantsModule3;
|
|
const CARD_PADDING = constantsModule.CARD_PADDING;
|
|
const CARD_ROWS_COLUMN_GAP = constantsModule.CARD_ROWS_COLUMN_GAP;
|
|
const env0_8 = constantsModule.CARD_ROWS_ICON_SIZE;
|
|
const env0_9 = constantsModule.CARD_ROWS_ICON_SIZE_VARIANT;
|
|
const constantsModule2 = ConstantsModule;
|
|
const env0_10 = constantsModule2.AnalyticEvents;
|
|
const env0_11 = constantsModule2.PlatformTypes;
|
|
const Icon = (NativeModule).Icon;
|
|
let Sizes = Icon.Sizes;
|
|
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
|
let getIconSize = NativeModule.getIconSize;
|
|
const value7 = Reflect.apply(getIconSize, NativeModule, [REFRESH_SMALL_16]);
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
object.cardContainer = {paddingBottom: CARD_PADDING - 12};
|
|
object.cardTitle = {marginBottom: 0};
|
|
object.connectionRow = {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': null, 'paddingVertical': 12,
|
|
'minHeight': 60, columnGap: CARD_ROWS_COLUMN_GAP};
|
|
object.connectionInfoContainer = {flexGrow: 1};
|
|
object.connectedAccountName = {'flexDirection': 'row', 'alignItems': 'center', 'columnGap': 4};
|
|
object.verifiedIconContainer = {height: value7, width: value7};
|
|
object.verifiedIcon = {'position': 'absolute', 'left': 0, 'top': 0};
|
|
object.connectionMetadata = {'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center',
|
|
'overflow': 'hidden'};
|
|
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
object.metadataItem = {color: INTERACTIVE_TEXT_ACTIVE};
|
|
object.poweredByContainer = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 6};
|
|
getIconSize = NativeModule.getIconSize;
|
|
Sizes = Icon.Sizes;
|
|
const MEDIUM = Sizes.MEDIUM;
|
|
object.applicationIcon = {borderRadius: Reflect.apply(getIconSize, NativeModule, [MEDIUM])};
|
|
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
const env0_17 = value.memo(_fun80263);
|
|
const env0_18 = value.memo(_fun80269);
|
|
value = value.memo(_fun80273);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileConnections.tsx');
|
|
exports.ApplicationRoleConnection = value;
|
|
exports.UserProfileAccountConnectionsCard = UserProfileAccountConnectionsCard;
|
|
exports.UserProfileApplicationRoleConnectionsCard = UserProfileApplicationRoleConnectionsCard;
|
|
function VerifiedIcon({theme, isTwitterVerifiedAccount}) { // fn#80262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:1125, offset: 0x01e736e6, size: 410 bytes, params: 2, frame: 25
|
|
isTwitterVerifiedAccount = !(isTwitterVerifiedAccount === undefined) && isTwitterVerifiedAccount;
|
|
const styles = useStyles();
|
|
const useToken = UseTokenModule.useToken;
|
|
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
|
const r14 = isTwitterVerifiedAccount ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_TWITTER : Reflect.apply(useToken,
|
|
UseTokenModule, [MOBILE_TEXT_HEADING_PRIMARY, theme]);
|
|
const r9 = SharedModule.isThemeLight(theme) || isTwitterVerifiedAccount ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
|
const Icon = (NativeModule).Icon;
|
|
return (
|
|
<View style={styles.verifiedIconContainer}>
|
|
<Icon
|
|
source={Module10365}
|
|
color={r14}
|
|
size={REFRESH_SMALL_16}
|
|
style={styles.verifiedIcon}
|
|
/>
|
|
<Icon
|
|
source={Module10366}
|
|
color={r9}
|
|
{...object}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun80263({userId, account, theme, locale, showMetadata}) { // fn#80263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:1603, offset: 0x01e73880, size: 1537 bytes, params: 2, frame: 35
|
|
var r23;
|
|
var r16;
|
|
var r12;
|
|
var object;
|
|
var moduleValue2;
|
|
var accountType;
|
|
var style;
|
|
var intl;
|
|
showMetadata = showMetadata === undefined || showMetadata;
|
|
const styles = useStyles();
|
|
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
|
|
[]).trackUserProfileAction;
|
|
let metadata = account.metadata;
|
|
const r9 = metadata ?? ({});
|
|
if (showMetadata) {
|
|
moduleValue2 = require(5043) /* metro dependency 5043: ConnectionsUtils */;
|
|
r23 = moduleValue2.getCreatedAtDate(r9[MetadataFields.CREATED_AT], locale);
|
|
} else {
|
|
r23 = null;
|
|
}
|
|
const env0_3 = r23;
|
|
if (showMetadata) {
|
|
object = {};
|
|
object.accountType = account.type;
|
|
object.metadata = r9;
|
|
object.style = styles.metadataItem;
|
|
accountType = object.accountType;
|
|
metadata = object.metadata;
|
|
style = object.style;
|
|
r16 = PlatformTypes.REDDIT === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateRedditMetadataItems(metadata,
|
|
|
|
style) : PlatformTypes.STEAM === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateSteamMetadataItems(metadata,
|
|
|
|
style) : PlatformTypes.BLUESKY === accountType || PlatformTypes.TWITTER === accountType || PlatformTypes.MASTODON === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateTwitterMetadataItems(metadata,
|
|
|
|
style) : PlatformTypes.PAYPAL === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generatePaypalMetadataItems(metadata,
|
|
|
|
style) : PlatformTypes.EBAY === accountType ? (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateEbayMetadataItems(metadata,
|
|
|
|
style) : PlatformTypes.TIKTOK !== accountType ? null : (require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */).generateTikTokMetadataItems(metadata,
|
|
|
|
style);
|
|
} else {
|
|
r16 = null;
|
|
}
|
|
const r13 = r16 != null && r16.length > 0;
|
|
const value14 = (Platforms).get(account.type);
|
|
const makeSource = AvatarUtilsModule.makeSource;
|
|
const isThemeDark2 = (SharedModule).isThemeDark(theme);
|
|
const value15 = value14 == null;
|
|
const source = Reflect.apply(makeSource, AvatarUtilsModule,
|
|
[isThemeDark2 ? value15 ? undefined : value14.icon.darkPNG : value15 ? undefined : value14.icon.lightPNG]);
|
|
const r5 = value14 == null || value14.getPlatformUserUrl == null ? undefined : value14.getPlatformUserUrl(account);
|
|
const type = account.type;
|
|
const TWITTER = PlatformTypes.TWITTER;
|
|
const r24 = type === TWITTER && r9[MetadataFields.TWITTER_VERIFIED] === '1';
|
|
const binding = env0_3;
|
|
const value19 = binding.useCallback(_fun80264, [account.type, r5, trackUserProfileAction, userId]);
|
|
const value20 = binding.useCallback(_fun80266, [account.name, trackUserProfileAction]);
|
|
const value21 = binding.useMemo(_fun80267, [account.name, r23, value14?.name]);
|
|
const value22 = env0_3.useMemo(_fun80268, [value14?.name, r5]);
|
|
const PressableComponent = r5 != null ? (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity : Pressable;
|
|
const r8 = r5 != null ? value19 : undefined;
|
|
const BaseIconImage = (BaseIconImageModule).BaseIconImage;
|
|
const items2 = [
|
|
<BaseIconImage size={CARD_ROWS_ICON_SIZE_VARIANT} source={source} />,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const items3 = [
|
|
<View style={styles.connectedAccountName}>
|
|
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
|
|
{account.name}
|
|
</Text>
|
|
{
|
|
account.verified
|
|
? (
|
|
<VerifiedIcon theme={theme} isTwitterVerifiedAccount={r24} />
|
|
)
|
|
: null
|
|
}
|
|
</View>,
|
|
];
|
|
if (r23 != null) {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r12 = (
|
|
<Text variant="text-xs/medium" color="text-muted">
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['9rfonh'], {date: r23})}
|
|
</Text>
|
|
);
|
|
} else {
|
|
r12 = null;
|
|
}
|
|
items3[1] = r12;
|
|
items3[2] = (
|
|
r13
|
|
? (
|
|
<View style={styles.connectionMetadata}>
|
|
{r16}
|
|
</View>
|
|
)
|
|
: null
|
|
);
|
|
items2[1] = (
|
|
<View style={styles.connectionInfoContainer}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
items2[2] = r5 != null && ((LinkExternalSmallIcon) => <LinkExternalSmallIcon size="sm" />)((require(6249) /* metro dependency 6249: LinkExternalSmallIcon */).LinkExternalSmallIcon);
|
|
return (
|
|
<PressableComponent
|
|
accessibilityLabel={value21}
|
|
accessibilityHint={value22}
|
|
accessibilityRole="button"
|
|
onPress={r8}
|
|
onLongPress={value20}
|
|
style={styles.connectionRow}
|
|
>
|
|
{items2}
|
|
</PressableComponent>
|
|
);
|
|
function _fun80264() { // fn#80264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:2692, offset: 0x01e73e81, size: 127 bytes, params: 1, frame: 14
|
|
var environment;
|
|
var value2;
|
|
if (ReactNativeModule.View != null) {
|
|
trackUserProfileAction({action: 'PRESS_VIEW_CONNECTED_ACCOUNT'});
|
|
value2 = environment.__proto__;
|
|
(require(8872) /* metro dependency 8872: MaskedLinkUtils */).handleClick({href: ReactNativeModule.View,
|
|
trusted: account.type !== PlatformTypes.DOMAIN, onConfirm: onConfirm_80265});
|
|
}
|
|
function onConfirm_80265() { // fn#80265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:2815, offset: 0x01e73f00, size: 108 bytes, params: 1, frame: 18
|
|
const value = environment.__proto__.__proto__;
|
|
const trackWithMetadata = AppAnalyticsUtilsModule.trackWithMetadata;
|
|
const CONNECTED_ACCOUNT_VIEWED = AnalyticEvents.CONNECTED_ACCOUNT_VIEWED;
|
|
Reflect.apply(trackWithMetadata, AppAnalyticsUtilsModule, [CONNECTED_ACCOUNT_VIEWED, {platform_type: account.type,
|
|
other_user_id: userId}]);
|
|
(Linking).openURL(env1_5);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun80266() { // fn#80266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:2973, offset: 0x01e73f6c, size: 137 bytes, params: 1, frame: 15
|
|
trackUserProfileAction({action: 'COPY_CONNECTED_ACCOUNT'});
|
|
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
|
|
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
|
|
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
|
|
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
|
|
ClipboardUtilsNativeModule.copy(account.name);
|
|
(ToastUtilsModule).presentCopiedToClipboard();
|
|
}
|
|
|
|
function _fun80267() { // fn#80267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:3174, offset: 0x01e73ff5, size: 182 bytes, params: 1, frame: 18
|
|
var value4;
|
|
var intl;
|
|
const items2 = [];
|
|
let push = items2.push;
|
|
Reflect.apply(push, items2, [ReactNativeModule.Pressable?.name ?? '']);
|
|
items2.push(account.name);
|
|
if (env0_3 != null) {
|
|
push = items2.push;
|
|
value4 = environment.__proto__;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
Reflect.apply(push, items2,
|
|
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9rfonh'],
|
|
{date: env0_3})]);
|
|
}
|
|
return items2.join(', ');
|
|
}
|
|
|
|
function _fun80268() { // fn#80268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:3401, offset: 0x01e740ab, size: 178 bytes, params: 1, frame: 17
|
|
var name;
|
|
var r0;
|
|
var value2;
|
|
var value3;
|
|
const intl = (IndexNativeModule).intl;
|
|
var formatToPlainString;
|
|
const t = (IndexNativeModule).t;
|
|
var OKzaN3;
|
|
var value;
|
|
if (ReactNativeModule.View != null) {
|
|
value = environment.__proto__;
|
|
value = intl.string(t.wuRE8M);
|
|
r0 = value;
|
|
} else {
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
OKzaN3 = t.OKzaN3;
|
|
name = ReactNativeModule.Pressable == null ? value3 : ReactNativeModule.Pressable.name;
|
|
value = '';
|
|
value = Reflect.apply(formatToPlainString, intl, [OKzaN3, {name: name ?? value}]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun80269({identity, application}) { // fn#80269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:4350, offset: 0x01e7415d, size: 477 bytes, params: 2, frame: 25
|
|
const styles = useStyles();
|
|
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
|
|
[]).trackUserProfileAction;
|
|
const iconSource = application.getIconSource(CARD_ROWS_ICON_SIZE);
|
|
const username = identity.profile?.username;
|
|
const r14 = username ?? '';
|
|
const binding = env0_3;
|
|
const value6 = binding.useCallback(_fun80270, [r14, trackUserProfileAction]);
|
|
const value7 = binding.useMemo(_fun80271, [application.name, r14]);
|
|
const value8 = binding.useMemo(function() {
|
|
var intl = require(dependencyMap[26]).intl;
|
|
var OKzaN3 = require(dependencyMap[26]).t.OKzaN3;
|
|
return intl.formatToPlainString(OKzaN3, {name: application.name});
|
|
}, [application.name]);
|
|
const r5 = (
|
|
iconSource != null
|
|
? ((BaseIconImage) => <BaseIconImage size={CARD_ROWS_ICON_SIZE_VARIANT} source={iconSource} style={styles.applicationIcon} />)((require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage)
|
|
: null
|
|
);
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Pressable
|
|
accessibilityLabel={value7}
|
|
accessibilityHint={value8}
|
|
accessibilityRole="button"
|
|
onLongPress={value6}
|
|
style={styles.connectionRow}
|
|
>
|
|
{r5}
|
|
<View style={styles.connectionInfoContainer}>
|
|
<View style={styles.connectedAccountName}>
|
|
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
|
|
{r14}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
</Pressable>
|
|
);
|
|
function _fun80270() { // fn#80270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:4561, offset: 0x01e7433a, size: 132 bytes, params: 1, frame: 15
|
|
trackUserProfileAction({action: 'COPY_CONNECTED_ACCOUNT'});
|
|
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
|
|
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
|
|
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
|
|
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
|
|
(ClipboardUtilsNativeModule).copy(env0_2);
|
|
(ToastUtilsModule).presentCopiedToClipboard();
|
|
}
|
|
|
|
function _fun80271() { // fn#80271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:4752, offset: 0x01e743be, size: 58 bytes, params: 1, frame: 12
|
|
const items2 = [];
|
|
items2.push(application.name);
|
|
items2.push(env0_2);
|
|
return items2.join(', ');
|
|
}
|
|
|
|
}
|
|
|
|
function _fun80273({applicationRoleConnection}) { // fn#80273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:5329, offset: 0x01e74449, size: 622 bytes, params: 2, frame: 30
|
|
const Text = (TextModule).Text;
|
|
const styles = useStyles();
|
|
const value2 = (ConnectionMetadataVanityItemsModule).generateRoleConnectionMetadataItems(applicationRoleConnection);
|
|
const applicationIconSource = (AvatarUtils).getApplicationIconSource({id: applicationRoleConnection.application.id,
|
|
icon: applicationRoleConnection.application.icon});
|
|
const Icon = (NativeModule).Icon;
|
|
const Icon2 = (NativeModule).Icon;
|
|
const Sizes = Icon2.Sizes;
|
|
const MEDIUM = Sizes.MEDIUM;
|
|
const icon = (
|
|
<Icon
|
|
size={MEDIUM}
|
|
source={applicationIconSource}
|
|
disableColor
|
|
/>
|
|
);
|
|
const items2 = [
|
|
applicationRoleConnection.platform_name != null
|
|
? (
|
|
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
|
|
{applicationRoleConnection.platform_name}
|
|
</Text>
|
|
)
|
|
: null,
|
|
];
|
|
items2[1] = (
|
|
applicationRoleConnection.platform_username != null
|
|
? (
|
|
<Text variant="text-md/normal" color="text-default">
|
|
{applicationRoleConnection.platform_username}
|
|
</Text>
|
|
)
|
|
: null
|
|
);
|
|
items2[2] = (
|
|
value2 != null && value2.length > 0
|
|
? (
|
|
<View style={styles.connectionMetadata}>
|
|
{value2}
|
|
</View>
|
|
)
|
|
: null
|
|
);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
items2[3] = (
|
|
<View style={styles.poweredByContainer}>
|
|
<Text variant="text-xs/medium" color="text-muted">
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zIT9YA,
|
|
{applicationHook: function() {
|
|
return applicationRoleConnection.application.name;
|
|
}})}
|
|
</Text>
|
|
</View>
|
|
);
|
|
return (
|
|
<View style={styles.connectionRow}>
|
|
{icon}
|
|
<View style={styles.connectionInfoContainer}>
|
|
{items2}
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function UserProfileAccountConnectionsCard({userId, style}) { // fn#80275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6366, offset: 0x01e746ca, size: 426 bytes, params: 2, frame: 25
|
|
var r0;
|
|
var defaultImport;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const UserProfileCardRows = (UserProfileCardModule).UserProfileCardRows;
|
|
var value;
|
|
const styles = useStyles();
|
|
const nativeModule = NativeModule2;
|
|
const useThemeContext = nativeModule.useThemeContext;
|
|
const env0_1 = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
|
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
const hidePersonalInformation = (require(566) /* metro dependency 566: flux */).useStateFromStores([StreamerModeStore],
|
|
function() {
|
|
return StreamerModeStore.hidePersonalInformation;
|
|
});
|
|
const {connections,
|
|
appIdentities} = (UseVisibleUserProfileConnectionsAndAppIdentities)(userId);
|
|
if (hidePersonalInformation) {
|
|
r0 = null;
|
|
} else if (connections.length !== 0) {
|
|
defaultImport = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImportProps2 = {style: [styles.cardContainer, style],
|
|
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5']),
|
|
titleStyle: styles.cardTitle};
|
|
value = connections.map(_fun80278);
|
|
value = ((Component) => <Component {...defaultImportProps2}><UserProfileCardRows>{[value,
|
|
appIdentities.map(_fun80279)]}</UserProfileCardRows></Component>)(defaultImport);
|
|
r0 = value;
|
|
} else if (appIdentities.length === 0) {
|
|
r0 = null;
|
|
} else {
|
|
defaultImport = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImportProps2 = {style: [styles.cardContainer, style],
|
|
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5']),
|
|
titleStyle: styles.cardTitle};
|
|
value = connections.map(_fun80278);
|
|
value = ((Component) => <Component {...defaultImportProps2}><UserProfileCardRows>{[value,
|
|
appIdentities.map(_fun80279)]}</UserProfileCardRows></Component>)(defaultImport);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function _fun80278(a0) { // fn#80278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6849, offset: 0x01e74883, size: 66 bytes, params: 2, frame: 16
|
|
return ((Component) => <Component account={a0} theme={theme} locale={locale} userId={userId} key={a0.id} />)(env1_17);
|
|
}
|
|
|
|
function _fun80279({application, identity}) { // fn#80279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:6909, offset: 0x01e748c5, size: 87 bytes, params: 2, frame: 18
|
|
const value = environment.__proto__;
|
|
return ((Component) => <Component identity={identity} application={application} key={'' + identity.application_id + '-' + identity.provider_issued_user_id} />)(env1_18);
|
|
}
|
|
|
|
}
|
|
|
|
function UserProfileApplicationRoleConnectionsCard({userId, style}) { // fn#80280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:7074, offset: 0x01e7491c, size: 297 bytes, params: 2, frame: 24
|
|
var r0;
|
|
var UserProfileCard;
|
|
var intl;
|
|
const styles = useStyles();
|
|
const value2 = (UseUserProfileApplicationRoleConnections)(userId);
|
|
const hidePersonalInformation = (require(566) /* metro dependency 566: flux */).useStateFromStores([StreamerModeStore],
|
|
function() {
|
|
return StreamerModeStore.hidePersonalInformation;
|
|
});
|
|
if (hidePersonalInformation) {
|
|
r0 = null;
|
|
} else if (value2.length === 0) {
|
|
r0 = null;
|
|
} else {
|
|
UserProfileCard = importDefault(6815) /* metro dependency 6815: UserProfileCard */;
|
|
var defaultImportProps = {style: [styles.cardContainer, style]};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
defaultImportProps.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
|
|
defaultImportProps.titleStyle = styles.cardTitle;
|
|
r0 = (
|
|
<UserProfileCard {...defaultImportProps}>
|
|
{((UserProfileCardRows) => <UserProfileCardRows>{value2.map(_fun80282)}</UserProfileCardRows>)((require(6815) /* metro dependency 6815: UserProfileCard */).UserProfileCardRows)}
|
|
</UserProfileCard>
|
|
);
|
|
}
|
|
return r0;
|
|
function _fun80282(a0) { // fn#80282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10547:7424, offset: 0x01e74a45, size: 42 bytes, params: 2, frame: 15
|
|
return ((Component) => <Component applicationRoleConnection={a0} key={a0.application.id} />)(env1_19);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun80261, 10361, [31, 27, 1949, 3996, 6816, 661, 5044, 33, 1305, 4501, 697, 10362, 3860, 4002, 10365,
|
|
10366, 8514, 5043, 4915, 1423, 8872, 4863, 3853, 4081, 6797, 3856, 1244, 5278, 3859, 4573, 6249, 3868, 566,
|
|
10367, 6815, 10372,
|
|
2]) /* metro module 10361, dependencies: [31, 27, 1949, 3996, 6816, 661, 5044, 33, 1305, 4501, 697, 10362, 3860, 4002, 10365, 10366, 8514, 5043, 4915, 1423, 8872, 4863, 3853, 4081, 6797, 3856, 1244, 5278, 3859, 4573, 6249, 3868, 566, 10367, 6815, 10372, 2] */;
|