本文整理汇总了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();
}
}
}
示例2:
authManager.registerAuthenticationChangedHandler(function (newValue) {
if (authManager.login() === null) {
self.amount(0);
} else {
self.updateAccount();
}
});
示例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,
});
}
});
示例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();
});
}
示例5:
authManager.registerAuthenticationChangedHandler(() => {
this.isMy(authManager.login() === sender);
});