227 lines
11 KiB
TypeScript
227 lines
11 KiB
TypeScript
/* Metro module 9005; source: modules/accept_invite/native/JoinServer.tsx; dependencies: [31, 27, 9006, 33, 4501, 697, 4573, 1244, 5463, 1484, 1478, 8967, 4578, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
|
|
import FreeFormInputGroup from '../../../design/void/Form/native/FreeFormInputGroup.tsx'; /* Metro dependency 8967 */
|
|
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
|
|
function _fun70070(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9190:6, offset: 0x01cecec1, size: 572 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const OrSeparator2 = OrSeparator;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_4 = value.View;
|
|
const env0_5 = value.ScrollView;
|
|
value = require(9006) /* metro dependency 9006: CreateGuildConstants */;
|
|
const env0_6 = value.CREATE_GUILD_SMALL_SCREEN_MAX_HEIGHT;
|
|
const env0_7 = value.CreateGuildModalStates;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
const env0_10 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object.growSpacing = {flexGrow: 2, minHeight: PX_24};
|
|
const object3 = {flexGrow: 2};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingHorizontal = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingBottom = PX_16;
|
|
object.container = object3;
|
|
const object4 = {};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.textInput = object4;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object.innerSeparator = {'height': 1, 'flexGrow': 2, backgroundColor: BORDER_SUBTLE};
|
|
object.separator = {'paddingVertical': 12, 'flexDirection': 'row', 'justifyContent': 'center',
|
|
'alignItems': 'center'};
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.orText = {'textAlign': 'center', 'marginHorizontal': null, 'textTransform': 'uppercase',
|
|
marginHorizontal: PX_8};
|
|
object.header = {textAlign: 'center'};
|
|
object.description = {'textAlign': 'center', 'marginTop': 8, 'marginBottom': 32};
|
|
object.exampleText = {marginTop: 8};
|
|
const env0_11 = Reflect.apply(createStyles, value, [object]);
|
|
const env0_13 = ['https://discord.gg/hTKzmak', 'hTKzmak', 'https://discord.gg/wumpus-friends'][0];
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/accept_invite/native/JoinServer.tsx');
|
|
exports.default = JoinServer;
|
|
exports.OrSeparator = OrSeparator2;
|
|
function OrSeparator() { // fn#70071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9190:944, offset: 0x01ced0fd, size: 227 bytes, params: 1, frame: 24
|
|
const styles = useStyles();
|
|
const items2 = [
|
|
<View style={styles.innerSeparator} />,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const HEuagM = (IndexNativeModule).t.HEuagM;
|
|
items2[1] = (
|
|
<Text
|
|
style={styles.orText}
|
|
variant="text-sm/semibold"
|
|
color="text-muted"
|
|
>
|
|
{Reflect.apply(string, intl, [HEuagM])}
|
|
</Text>
|
|
);
|
|
items2[2] = <View style={styles.innerSeparator} />;
|
|
return (
|
|
<View style={styles.separator}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function JoinServer({error, inviteString, onInviteChange, onDone, submitting}) { // fn#70072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9190:1212, offset: 0x01ced1e0, size: 1291 bytes, params: 2, frame: 39
|
|
var r8;
|
|
var jsxRuntimeEnv0_10Binding;
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var items2;
|
|
const styles = useStyles();
|
|
const insets = (UseSafeAreaInsetsKeyboardAwareNative)().insets;
|
|
const value2 = (UseNavigationNativeModule).useNavigation();
|
|
const height = (UseWindowDimensionsNative)().height;
|
|
let binding = ReactModule;
|
|
const value3 = binding.useCallback(_fun70073, [value2]);
|
|
const items4 = [styles.container];
|
|
const bottom = insets.bottom;
|
|
const PX_16 = (Native).space.PX_16;
|
|
items4[1] = {paddingBottom: bottom + PX_16};
|
|
if (height <= CREATE_GUILD_SMALL_SCREEN_MAX_HEIGHT) {
|
|
r8 = null;
|
|
} else {
|
|
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
|
string = intl.string;
|
|
items2 = [
|
|
<Text
|
|
style={styles.header}
|
|
accessibilityRole="header"
|
|
variant="heading-xl/bold"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{Reflect.apply(string, intl, [t.jlfuFW])}
|
|
</Text>,
|
|
];
|
|
string = intl.string;
|
|
items2[1] = (
|
|
<Text
|
|
style={styles.description}
|
|
variant="text-sm/medium"
|
|
color="text-default"
|
|
>
|
|
{Reflect.apply(string, intl, [t.lVvN3A])}
|
|
</Text>
|
|
);
|
|
r8 = (
|
|
<>
|
|
{items2}
|
|
</>
|
|
);
|
|
}
|
|
const items3 = [r8];
|
|
items3[1] = (
|
|
<FreeFormInputGroup
|
|
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qreV25)}
|
|
error={error}
|
|
value={inviteString}
|
|
onChangeText={onInviteChange}
|
|
placeholder={env0_13}
|
|
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qreV25)}
|
|
autoFocus
|
|
autoCapitalize="none"
|
|
autoCorrect={false}
|
|
returnKeyType="join"
|
|
textStyle={styles.textInput}
|
|
onSubmitEditing={onDone}
|
|
/>
|
|
);
|
|
const format = intl.format;
|
|
const vwWaTe = (require(1244) /* metro dependency 1244: indexNative */).t.vwWaTe;
|
|
binding = env0_12;
|
|
items3[2] = (
|
|
<Text
|
|
style={styles.exampleText}
|
|
variant="text-sm/medium"
|
|
color="text-muted"
|
|
>
|
|
{Reflect.apply(format, intl, [vwWaTe, {example1: binding[0], example2: binding[1], example3: binding[2],
|
|
exampleHook: exampleHook}])}
|
|
</Text>
|
|
);
|
|
const view = (
|
|
<View>
|
|
{items3}
|
|
</View>
|
|
);
|
|
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
|
const items5 = [
|
|
<View style={styles.growSpacing} />,
|
|
];
|
|
const Button = (ButtonNativeModule).Button;
|
|
items5[1] = (
|
|
<Button
|
|
size="lg"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+H/coT'])}
|
|
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+H/coT'])}
|
|
loading={submitting}
|
|
disabled={submitting}
|
|
onPress={onDone}
|
|
/>
|
|
);
|
|
items5[2] = <OrSeparator />;
|
|
items5[3] = (
|
|
<Button
|
|
size="lg"
|
|
variant="secondary"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MOqX/G'])}
|
|
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['MOqX/G'])}
|
|
onPress={value3}
|
|
/>
|
|
);
|
|
return (
|
|
<ScrollView keyboardShouldPersistTaps="handled" contentContainerStyle={items4}>
|
|
{view}
|
|
<>
|
|
{items5}
|
|
</>
|
|
</ScrollView>
|
|
);
|
|
function _fun70073() { // fn#70073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9190:1389, offset: 0x01ced6eb, size: 34 bytes, params: 1, frame: 11
|
|
const binding = env0_0;
|
|
const push = binding.push;
|
|
const JOIN_STUDENT_HUB = CreateGuildModalStates.JOIN_STUDENT_HUB;
|
|
Reflect.apply(push, binding, [JOIN_STUDENT_HUB]);
|
|
}
|
|
|
|
function exampleHook(a0, a1) { // fn#70074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9190:2362, owner: JoinServer.exampleHook, offset: 0x01ced70d, size: 67 bytes, params: 3, frame: 15
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="text-default"
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun70070, 9005, [31, 27, 9006, 33, 4501, 697, 4573, 1244, 5463, 1484, 1478, 8967, 4578,
|
|
2]) /* metro module 9005, dependencies: [31, 27, 9006, 33, 4501, 697, 4573, 1244, 5463, 1484, 1478, 8967, 4578, 2] */;
|