Update content of files

This commit is contained in:
GitHub Action 2024-06-02 09:09:08 +00:00
parent d62aa86011
commit ddefc023da
2 changed files with 6 additions and 39 deletions

View file

@ -1300,19 +1300,6 @@ a.tm-menu-link:focus {
background: var(--field-bg-color); background: var(--field-bg-color);
position: relative; position: relative;
} }
.tm-field-hint {
margin: 8px 14px;
}
.tm-field .form-control-link {
cursor: pointer;
}
.tm-field .form-control-link:hover {
text-decoration: none;
}
.tm-field .form-control-link.urgent {
color: var(--unavail-color);
}
.tm-search-field:before { .tm-search-field:before {
position: absolute; position: absolute;
margin: 4px 9px; margin: 4px 9px;
@ -2590,6 +2577,10 @@ a.tm-table-action-link:hover {
filter: blur(7px); filter: blur(7px);
} }
.tm-field-hint {
margin: 8px 14px;
}
.tm-number-form-group { .tm-number-form-group {
margin: 36px 0 0; margin: 36px 0 0;
} }

View file

@ -1463,14 +1463,13 @@ var Random = {
var LoginCodes = { var LoginCodes = {
init: function() { init: function() {
Aj.onLoad(function(state) { Aj.onLoad(function(state) {
var cont = Aj.ajContainer; $('.js-toggle-receive').on('change', LoginCodes.eToggleReceive);
$(cont).on('change.curPage', '.js-toggle-receive', LoginCodes.eToggleReceive);
$(cont).on('click.curPage', '.js-terminate-sessions-btn', LoginCodes.eTerminateSessions);
state.needUpdate = true; state.needUpdate = true;
state.updLastReq = +Date.now(); state.updLastReq = +Date.now();
state.updStateTo = setTimeout(LoginCodes.updateState, Main.UPDATE_PERIOD); state.updStateTo = setTimeout(LoginCodes.updateState, Main.UPDATE_PERIOD);
}); });
Aj.onUnload(function(state) { Aj.onUnload(function(state) {
$('.js-toggle-receive').off('change', LoginCodes.eToggleReceive);
clearTimeout(state.updStateTo); clearTimeout(state.updStateTo);
state.needUpdate = false; state.needUpdate = false;
}); });
@ -1509,29 +1508,6 @@ var LoginCodes = {
number: Aj.state.number, number: Aj.state.number,
can_receive: can_receive ? 1 : 0 can_receive: can_receive ? 1 : 0
}); });
},
eTerminateSessions: function(e) {
e.preventDefault();
LoginCodes.terminateSessions();
},
terminateSessions: function(terminate_hash) {
Aj.apiRequest('terminatePhoneSessions', {
number: Aj.state.number,
terminate_hash: terminate_hash
}, function(result) {
if (result.error) {
return showAlert(result.error);
} else if (result.terminate_hash) {
showConfirm(result.confirm_message, function() {
LoginCodes.terminateSessions(result.terminate_hash);
}, result.confirm_button);
} else {
$('.js-terminate-sessions-wrap').hide();
if (result.msg) {
showAlert(result.msg);
}
}
});
} }
}; };