109 lines
6.7 KiB
TypeScript
109 lines
6.7 KiB
TypeScript
/* Metro module 14335; source: modules/auth/native/components/AccountDisabledOrDeletionScheduled.tsx; dependencies: [31, 27, 1226, 661, 33, 4501, 697, 1484, 566, 5076, 8973, 1244, 9001, 14336, 4573, 6261, 4578, 2] */
|
|
function _fun108504(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:6, offset: 0x02323353, size: 243 bytes, params: 8, frame: 19
|
|
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;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const env0_6 = (require(661) /* metro dependency 661: Constants */).LoginStates;
|
|
const value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun108505);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/AccountDisabledOrDeletionScheduled.tsx');
|
|
exports.default = AccountDisabledOrDeletionScheduled;
|
|
}
|
|
|
|
function _fun108505(a0) { // fn#108505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:204, offset: 0x02323446, size: 222 bytes, params: 2, frame: 17
|
|
const object = {'display': 'flex', 'height': '100%', 'flex': 1};
|
|
const space = (importDefault(697) /* metro dependency 697: native */).space;
|
|
object.paddingBottom = a0 ? space.PX_8 : space.PX_16;
|
|
const PX_16 = a0 ? 0 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.paddingHorizontal = PX_16;
|
|
const BACKGROUND_BASE_LOW = a0 ? 'transparent' : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.backgroundColor = BACKGROUND_BASE_LOW;
|
|
object.justifyContent = a0 ? 'space-between' : 'center';
|
|
return {container: object, image: {'marginBottom': 32, 'alignSelf': 'center'}, title: {'textAlign': 'center',
|
|
'marginBottom': 8}, description: {'lineHeight': 18, 'marginBottom': 24, 'textAlign': 'center'}};
|
|
}
|
|
|
|
function AccountDisabledOrDeletionScheduled({handleLogin, onReset}) { // fn#108506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:729, offset: 0x02323524, size: 888 bytes, params: 2, frame: 31
|
|
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
|
const loginStatus = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
|
|
function() {
|
|
return AuthenticationStore.getLoginStatus();
|
|
});
|
|
const binding = loginStatus;
|
|
const env0_4 = binding.useRef(null);
|
|
binding.useEffect(_fun108508, [loginStatus, value2]);
|
|
const value3 = binding.useCallback(_fun108509, [onReset]);
|
|
const value4 = binding.useCallback(_fun108510, [handleLogin]);
|
|
const styles = useStyles((importDefault(8973) /* metro dependency 8973: useWideAuthView */)());
|
|
const ACCOUNT_DISABLED = LoginStates.ACCOUNT_DISABLED;
|
|
const value6 = loginStatus === ACCOUNT_DISABLED;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const r17 = value6 ? Reflect.apply(string, intl, [t['j3rC+U']]) : Reflect.apply(string, intl, [t.ZFWofo]);
|
|
string = intl.string;
|
|
const r11 = value6 ? Reflect.apply(string, intl, [t['6eNTWe']]) : Reflect.apply(string, intl, [t['pCBti+']]);
|
|
const AuthFormView = importDefault(9001) /* metro dependency 9001: AuthFormView */;
|
|
const WumpTrash = (require(14336) /* metro dependency 14336: WumpTrash */).WumpTrash;
|
|
const items3 = [<WumpTrash style={styles.image} />];
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
items3[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{r17}</Text>;
|
|
items3[2] = <Text style={styles.description} variant="text-sm/medium" color="text-default">{r11}</Text>;
|
|
const items2 = [<View>{items3}</View>];
|
|
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
string = intl.string;
|
|
const JhDw5o = (require(1244) /* metro dependency 1244: indexNative */).t.JhDw5o;
|
|
items2[1] = <View><ButtonGroup><Button variant="primary" text={Reflect.apply(string, intl,
|
|
[JhDw5o])} onPress={value3} /><Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.v51oiN)} onPress={value4} /></ButtonGroup></View>;
|
|
return (
|
|
<AuthFormView contentStyle={{flexGrow: 1}}>
|
|
<View style={styles.container}>
|
|
{items2}
|
|
</View>
|
|
</AuthFormView>
|
|
);
|
|
}
|
|
|
|
function _fun108508() { // fn#108508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:919, offset: 0x023238af, size: 114 bytes, params: 1, frame: 11
|
|
var value2;
|
|
const current = env0_4.current;
|
|
let loginStatusBinding = loginStatus;
|
|
if (current !== loginStatusBinding) {
|
|
if (env0_4.current != null) {
|
|
loginStatusBinding = loginStatus;
|
|
value2 = environment.__proto__;
|
|
if (loginStatusBinding !== LoginStates.ACCOUNT_SCHEDULED_FOR_DELETION && loginStatus !== LoginStates.ACCOUNT_DISABLED) {
|
|
env0_2.pop();
|
|
}
|
|
} else {
|
|
env0_4.current = loginStatus;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun108509() { // fn#108509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:1069, offset: 0x02323921, size: 64 bytes, params: 1, frame: 11
|
|
var value;
|
|
if (onReset == null) {
|
|
value = environment.__proto__;
|
|
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
|
|
value.loginReset();
|
|
} else {
|
|
onReset();
|
|
}
|
|
}
|
|
|
|
function _fun108510() { // fn#108510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:1131, offset: 0x02323961, size: 60 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
value = AuthenticationStore.getCredentials();
|
|
const login = value.login;
|
|
const password = value.password;
|
|
handleLogin(login, password === undefined ? '' : password, true);
|
|
}
|
|
|