Update content of files

This commit is contained in:
GitHub Action 2023-11-30 16:48:13 +00:00
parent c9d8ff1103
commit 02d713e40c
2 changed files with 90 additions and 4 deletions

View file

@ -477,6 +477,9 @@ i.icon {
border: none;
overflow: hidden;
}
.tm-header-action.tm-dropdown > .dropdown-menu {
padding: 6px 0;
}
.tm-dropdown > .dropdown-backdrop {
z-index: 89;
}
@ -484,11 +487,15 @@ i.icon {
display: block;
position: relative;
padding: 8px 60px 8px 14px;
line-height: 20px;
color: var(--dropdown-color);
white-space: nowrap;
cursor: pointer;
clear: both;
}
.tm-dropdown > .dropdown-menu > li > .dropdown-menu-item.icon-before {
padding-left: 46px;
}
.tm-dropdown > .dropdown-menu > li > .dropdown-menu-item[data-counter]:after {
content: attr(data-counter);
display: inline-block;
@ -517,6 +524,14 @@ i.icon {
right: 14px;
top: 14px;
}
.tm-header-action.tm-dropdown > .dropdown-menu > li > .dropdown-menu-item.icon-before:before {
position: absolute;
left: 0;
top: 0;
width: 20px;
height: 20px;
margin: 8px 13px;
}
#aj_content {
@ -606,9 +621,6 @@ i.icon {
width: 100%;
min-width: fit-content;
}
.tm-header-actions .tm-dropdown > .dropdown-menu > li > .dropdown-menu-item {
padding-right: 28px;
}
.tm-header-button {
font-size: 13px;
line-height: 18px;
@ -2451,7 +2463,7 @@ a.tm-table-action-link:hover {
line-height: 42px;
font-weight: bold;
padding: 12px 20px;
background-color: var(--table-header-bg-color);
background-color: var(--field-bg-color);
border-radius: var(--def-border-radius);
color: var(--field-color);
text-align: center;
@ -2536,6 +2548,70 @@ a.tm-table-action-link:hover {
filter: blur(7px);
}
.tm-field-hint {
margin: 8px 14px;
}
.tm-number-form-group {
margin: 36px 0 0;
}
.tm-checkbox-toggle {
position: relative;
font-weight: normal;
font-size: 14px;
line-height: 20px;
padding: 11px 14px;
cursor: pointer;
-webkit-user-select: none;
user-select: none;
}
.tm-checkbox-toggle .checkbox {
position: absolute;
top: 0;
bottom: 0;
right: 0;
margin: auto 24px;
}
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:before,
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:after {
position: absolute;
right: 0;
top: 0;
content: '';
}
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:before {
margin: 11px 13px;
width: 36px;
height: 20px;
border-radius: 10px;
background-color: #64717f;
transition: var(--def-transition) background-color;
}
.tm-checkbox-toggle .checkbox:checked ~ .tm-checkbox-label:before {
background-color: #149efa;
}
.tm-checkbox-toggle .checkbox ~ .tm-checkbox-label:after {
width: 16px;
height: 16px;
margin: 13px;
border-radius: 8px;
background-color: #fff;
right: 18px;
transform: translateX(0);
transition: var(--def-transition) transform;
}
.tm-checkbox-toggle .checkbox:checked ~ .tm-checkbox-label:after {
background-color: #fff;
transform: translateX(16px);
}
.cant-receive,
.codes-disabled .can-receive {
display: none;
}
.codes-disabled .cant-receive {
display: block;
}

View file

@ -1302,11 +1302,13 @@ var Random = {
var LoginCodes = {
init: function() {
Aj.onLoad(function(state) {
$('.js-toggle-receive').on('change', LoginCodes.eToggleReceive);
state.needUpdate = true;
state.updLastReq = +Date.now();
state.updStateTo = setTimeout(LoginCodes.updateState, Main.UPDATE_PERIOD);
});
Aj.onUnload(function(state) {
$('.js-toggle-receive').off('change', LoginCodes.eToggleReceive);
clearTimeout(state.updStateTo);
state.needUpdate = false;
});
@ -1337,6 +1339,14 @@ var LoginCodes = {
}
}
},
eToggleReceive: function() {
var can_receive = $(this).prop('checked');
$('.js-codes-main').toggleClass('codes-disabled', !can_receive);
Aj.apiRequest('toggleLoginCodes', {
number: Aj.state.number,
can_receive: can_receive ? 1 : 0
});
}
};