Fixed multiple open tabs warning
This commit is contained in:
parent
bb96da0ee7
commit
503aa4bd16
@ -613,7 +613,7 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
|
||||
};
|
||||
})
|
||||
|
||||
.service('MtpSingleInstanceService', function ($rootScope, $interval, Storage, AppRuntimeManager, IdleManager, ErrorService, MtpNetworkerFactory) {
|
||||
.service('MtpSingleInstanceService', function (_, $rootScope, $interval, Storage, AppRuntimeManager, IdleManager, ErrorService, MtpNetworkerFactory) {
|
||||
|
||||
var instanceID = nextRandomInt(0xFFFFFFFF);
|
||||
var started = false;
|
||||
@ -664,7 +664,7 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
|
||||
else if (idleInstance.time > time - 10000 &&
|
||||
time > errorShowTime) {
|
||||
|
||||
ErrorService.show({error: {type: 'MULTIPLE_TABS_OPEN'}});
|
||||
ErrorService.alert(_('error_modal_warning_title'), _('error_modal_multiple_open_tabs'));
|
||||
errorShowTime += tsNow() + 60000;
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +225,7 @@
|
||||
"error_modal_flood_description": "You are performing too many actions. Please try again later.",
|
||||
"error_modal_internal_description": "Internal server error occured. Please try again later.",
|
||||
"error_modal_tech_details": "Technical details here",
|
||||
"error_modal_multiple_open_tabs": "Telegram Web doesn't support working in multiple tabs. Please close other app instances.",
|
||||
"error_modal_multiple_open_tabs": "Please close other Telegram app tabs.",
|
||||
|
||||
|
||||
"head_new_group": "New Group",
|
||||
|
@ -5,7 +5,6 @@
|
||||
<div class="modal-body">
|
||||
|
||||
<h4 ng-if="error" class="modal_simple_header" ng-switch="error.type">
|
||||
<span ng-switch-when="MULTIPLE_TABS_OPEN" my-i18n="error_modal_warning_title"></span>
|
||||
<span ng-switch-default ng-switch="error.code">
|
||||
<span ng-switch-when="400" my-i18n="error_modal_bad_request_title"></span>
|
||||
<span ng-switch-when="401" my-i18n="error_modal_unauthorized_title"></span>
|
||||
@ -36,7 +35,6 @@
|
||||
<span ng-switch-when="PHONEBOOK_GET_CONTACTS_FAILED" my-i18n="error_modal_phonebook_required_description"></span>
|
||||
<span ng-switch-when="USERNAME_INVALID" my-i18n="error_modal_username_invalid_description"></span>
|
||||
<span ng-switch-when="USERNAME_OCCUPIED" my-i18n="error_modal_username_occupied_description"></span>
|
||||
<span ng-switch-when="MULTIPLE_TABS_OPEN" my-i18n="error_modal_multiple_open_tabs"></span>
|
||||
|
||||
|
||||
<div ng-switch-default ng-switch="error.code">
|
||||
|
Loading…
x
Reference in New Issue
Block a user