Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,103 @@
|
||||
/* Metro module 13184; source: modules/user_profile/native/UserProfileEditBannerButton.tsx; dependencies: [31, 27, 33, 4501, 697, 6771, 8514, 8743, 5278, 1244, 4573, 9646, 8752, 8507, 2] */
|
||||
function _fun100636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:6, offset: 0x021f1243, size: 375 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {position: 'relative'};
|
||||
const object5 = {'position': 'absolute', 'top': 12, 'right': 12, 'width': 28, 'height': 28, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
let CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object5.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.editButton = object5;
|
||||
const object6 = {'position': 'absolute', 'justifyContent': 'center', 'minHeight': 28, 'top': 12, 'right': 48,
|
||||
'paddingVertical': 4, 'paddingHorizontal': 12, 'borderRadius': null, 'backgroundColor': null, 'zIndex': 1};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object6.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object2.previewButton = object6;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEditBannerButton.tsx');
|
||||
exports.default = UserProfileEditBannerButton;
|
||||
}
|
||||
|
||||
function ProfilePreviewButton({userId}) { // fn#100637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:673, offset: 0x021f13ba, size: 352 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
||||
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
||||
const context = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule, []).context;
|
||||
const binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
if (userId == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
r0 = <PressableOpacity style={styles.previewButton} onPress={Reflect.apply(useCallback, binding, [_fun100638,
|
||||
[userId, context,
|
||||
analyticsLocations]])} accessibilityRole="button" accessibilityLabel={intl.string(t['3Qcx6K'])}>{((Text) => <Text variant="text-sm/semibold" color="always-white">{intl.string(t['3Qcx6K'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function EditButton({onPress, accessibilityLabel, disabled}) { // fn#100639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:1219, offset: 0x021f157b, size: 180 bytes, params: 2, frame: 21
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
onPress={onPress}
|
||||
disabled={disabled}
|
||||
style={styles.editButton}
|
||||
>
|
||||
<PencilIcon size="xs" color={WHITE} />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function UserProfileEditBannerButton({user, displayProfile, pendingBanner, pendingAvatarSrc, pendingThemeColors, pendingAccentColor, bannerSafeArea, showProfilePreviewButton, showEditButton, onPressEdit, editButtonAccessibilityLabel, editDisabled}) { // fn#100640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:1597, offset: 0x021f162f, size: 292 bytes, params: 2, frame: 31
|
||||
showEditButton = showEditButton === undefined || showEditButton;
|
||||
editDisabled = !(editDisabled === undefined) && editDisabled;
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{((Component) => <Component user={user} displayProfile={displayProfile} pendingBanner={pendingBanner} pendingAvatarSrc={pendingAvatarSrc} pendingThemeColors={pendingThemeColors} pendingAccentColor={pendingAccentColor} bannerHeight={(importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)()} bannerSafeArea={bannerSafeArea} />)(importDefault(8507) /* metro dependency 8507: UserProfileBanner */)}
|
||||
{showProfilePreviewButton && <ProfilePreviewButton userId={user.id} />}
|
||||
{showEditButton && <EditButton onPress={onPressEdit} accessibilityLabel={editButtonAccessibilityLabel} disabled={editDisabled} />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100638() { // fn#100638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13374:824, offset: 0x021f151a, size: 97 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var object2;
|
||||
if (userId != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, context, undefined);
|
||||
object2['userId'] = userId;
|
||||
object2['isPreviewingChanges'] = true;
|
||||
object2['sourceAnalyticsLocations'] = analyticsLocations;
|
||||
defaultImport(object2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user