How to use the react-native-router-flux.Actions.LoadingModal function in react-native-router-flux

To help you get started, we’ve selected a few react-native-router-flux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CarGuo / GSYGithubAPP / app / components / LoginPage.js View on Github external
toLogin() {
        let {login} = this.props;
        if (!this.params.userName || this.params.userName.length === 0) {
            Toast(I18n('LoginNameTip'));
            return
        }
        if (!this.params.password || this.params.password.length === 0) {
            Toast(I18n('LoginPWTip'));
            return
        }
        this.setState({
            saveUserName: this.params.userName,
            savePassword: this.params.password
        });
        Actions.LoadingModal({backExit: false});
        Keyboard.dismiss();
        login.doLogin(this.params.userName, this.params.password, (res) => {
            this.exitLoading();
            if (!res) {
                Toast(I18n('LoginFailTip'));
            } else {
                Actions.reset("root")
            }
        })
    }
github CarGuo / GSYGithubAPP / app / components / PersonPage.js View on Github external
doFollowLogic() {
        Actions.LoadingModal({backExit: false});
        userAction.doFollow(this.props.currentUser, !this.state.hadFollowed).then(() => {
            this._refreshInfo();
            setTimeout(() => {
                Actions.pop();
            }, 500);
        })
    }
}
github CarGuo / GSYGithubAPP / app / components / IssueDetailPage.js View on Github external
editComment(commentId, text, rowID) {
        let {repositoryName, userName} = this.props;
        let {issue} = this.state;
        Actions.LoadingModal({backExit: false});
        issueActions.editComment(userName, repositoryName, issue.number, commentId,
            {body: text}).then((res) => {
            setTimeout(() => {
                Actions.pop();
                if (res && res.result) {
                    let dataList = this.state.dataSource;
                    dataList.splice(parseInt(rowID), 1, res.data);
                    this.setState({
                        dataSource: dataList
                    })
                } else {
                    Actions.TextInputModal({
                        textConfirm: (text) => {
                            this.editComment(commentId, text, rowID)
                        },
                        titleText: I18n('editIssue'),
github CarGuo / GSYGithubAPP / app / components / IssueDetailPage.js View on Github external
sendIssueComment(text) {
        let {repositoryName, userName} = this.props;
        let {issue} = this.state;
        Actions.LoadingModal({backExit: false});
        issueActions.addIssueComment(userName, repositoryName, issue.number, text).then((res) => {
            setTimeout(() => {
                Actions.pop();
                if (res && res.result) {
                    let dataList = this.state.dataSource;
                    dataList.push(res.data);
                    this.setState({
                        dataSource: dataList
                    })
                } else {
                    Actions.TextInputModal({
                        needEditTitle: false,
                        textConfirm: this.sendIssueComment,
                        text: text,
                        titleText: I18n('commentsIssue'),
                        bottomBar: true,
github CarGuo / GSYGithubAPP / app / components / IssueDetailPage.js View on Github external
lockedIssue() {
        let {repositoryName, userName} = this.props;
        let {issue} = this.state;
        Actions.LoadingModal({backExit: false});
        issueActions.lockIssue(userName, repositoryName, issue.number, issue.locked).then((res) => {
            setTimeout(() => {
                Actions.pop();
                if (res && res.result && res.data) {
                    this.setState({
                        issue: res.data
                    })
                }
            }, 500);
        })
    }
github CarGuo / GSYGithubAPP / app / components / RepositoryIssueListPage.js View on Github external
_createIssue(text, title) {
        let {repositoryName, userName} = this.props;
        Actions.LoadingModal({backExit: false});
        issueActions.createIssue(userName, repositoryName,
            {title: title, body: text}).then((res) => {
            setTimeout(() => {
                Actions.pop();
                if (res && res.data) {
                    let data = this.state.dataSource;
                    data.splice(0, 0, res.data);
                    this.setState({
                        dataSource: data,
                    })
                }
            }, 500);
        })
    }
github CarGuo / GSYGithubAPP / app / components / PersonInfoPage.js View on Github external
postChanged(params) {
        Actions.LoadingModal({backExit: false});
        userActions.updateUser(params).then(() => {
            setTimeout((res) => {
                Actions.pop();
            }, 500);
        });
    }
github CarGuo / GSYGithubAPP / app / components / IssueDetailPage.js View on Github external
editIssue(text, title) {
        if (!title || title.length === 0) {
            return
        }
        let {repositoryName, userName} = this.props;
        let {issue} = this.state;
        Actions.LoadingModal({backExit: false});
        issueActions.editIssue(userName, repositoryName, issue.number,
            {title: title, body: text}).then((res) => {
            setTimeout(() => {
                Actions.pop();
                if (res && res.result) {
                    this.setState({
                        issue: res.data
                    })
                } else {
                    Actions.TextInputModal({
                        textConfirm: this.editIssue,
                        titleText: I18n('editIssue'),
                        needEditTitle: true,
                        text: text,
                        titleValue: title,
                        bottomBar: true,
github CarGuo / GSYGithubAPP / app / components / widget / UserHeadItem.js View on Github external
rightBtnPress: () => {
                                                Actions.LoadingModal({backExit: false});
                                                userActions.setAllNotificationAsRead().then((res) => {
                                                    Actions.pop();
                                                    setTimeout(() => {
                                                        if (res && res.result) {
                                                            Actions.pop();
                                                        }
                                                    }, 500);
                                                })
                                            }
                                        });
github CarGuo / GSYGithubAPP / app / components / RepositoryDetailPage.js View on Github external
itemClick: () => {
                Actions.LoadingModal({backExit: false});
                repositoryActions.doRepositoryWatch(ownerName, repositoryName, !watched).then((res) => {
                    setTimeout(() => {
                        Actions.pop();
                        this._refresh();
                    }, 500);
                })
            }, itemStyle: {
                borderLeftWidth: StyleSheet.hairlineWidth, borderLeftColor: Constant.lineColor,