当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript authManager.login方法代码示例

本文整理汇总了TypeScript中poker/authmanager.authManager.login方法的典型用法代码示例。如果您正苦于以下问题:TypeScript authManager.login方法的具体用法?TypeScript authManager.login怎么用?TypeScript authManager.login使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在poker/authmanager.authManager的用法示例。


在下文中一共展示了authManager.login方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: checkTableReload

    private async checkTableReload(tableId: number) {
        const reloadData = await this.getReload(tableId);
        if (reloadData.emergencyReload) {
            console.log("Emergency reload requested.");
            const api = this.getApi();

            // await api.confirmEmergencyReload(tableId);
            window.location.replace("http://google.com/");
            return;
        }

        if (reloadData.reloadRequired) {
            console.log("Normal reload requested.");
            if (appConfig.game.seatMode) {
                const seatId = parseInt(authManager.login().replace("Игрок", ""), 10);
                const propertyName = `seat${seatId}Reloaded`;
                if (reloadData[propertyName] === false) {
                    console.log(`Reloading seat ${seatId}.`);
                    const api = this.getApi();
                    await api.confirmSeatReload(tableId, seatId);
                    location.reload();
                }
            }

            if (appConfig.game.tablePreviewMode && !reloadData.tableReloaded) {
                console.log("Reloading table.");
                const api = this.getApi();
                await api.confirmTableReload(tableId);
                location.reload();
            }
        }
    }
开发者ID:online-poker,项目名称:poker-html-client,代码行数:32,代码来源:appreloadservice.ts

示例2:

 authManager.registerAuthenticationChangedHandler(function (newValue) {
     if (authManager.login() === null) {
         self.amount(0);
     } else {
         self.updateAccount();
     }
 });
开发者ID:online-poker,项目名称:poker-html-client,代码行数:7,代码来源:lobbypage.ts

示例3: AccountManager

 authManager.registerAuthenticationChangedHandler(async (newValue) => {
     if (newValue) {
         const api = new AccountManager();
         const data = await api.getAccount();
         const personalAccountData = data.Data;
         self.player({
             login: authManager.login(),
             amount: personalAccountData.RealMoney,
         });
     } else {
         self.player({
             login: "",
             amount: null,
         });
     }
 });
开发者ID:online-poker,项目名称:poker-html-client,代码行数:16,代码来源:withdrawalpage.ts

示例4: constructor

    constructor(messageId: number, date: Date, sender: string, message: string) {
        this.messageId = messageId;
        this.isAdmin = false;
        if (sender.toLowerCase() === "admin") {
            this.isAdmin = true;
        }

        this.isMy = ko.observable(authManager.login() === sender);
        authManager.registerAuthenticationChangedHandler(() => {
            this.isMy(authManager.login() === sender);
        });

        this.sender = sender;
        this.message = ko.observable(message);
        this.date = date.getHours() + ":" + date.getMinutes();
        this.fullMessage = ko.computed(() => {
            return "[" + this.date + "]" + this.sender + " - " + this.message();
        });
    }
开发者ID:online-poker,项目名称:poker-html-client,代码行数:19,代码来源:playerMessage.ts

示例5:

 authManager.registerAuthenticationChangedHandler(() => {
     this.isMy(authManager.login() === sender);
 });
开发者ID:online-poker,项目名称:poker-html-client,代码行数:3,代码来源:playerMessage.ts


注:本文中的poker/authmanager.authManager.login方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。