From 7855525ad0a07e146d816446e097f486f8c6d50c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 30 Nov 2023 03:32:43 +0000 Subject: [PATCH] Update content of files --- data/web/fragment.com/css/auction.css | 18 +++++++++++++++--- data/web/fragment.com/js/auction.js | 10 ++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/data/web/fragment.com/css/auction.css b/data/web/fragment.com/css/auction.css index 38dbfe5120..7b1f8dc44d 100644 --- a/data/web/fragment.com/css/auction.css +++ b/data/web/fragment.com/css/auction.css @@ -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; diff --git a/data/web/fragment.com/js/auction.js b/data/web/fragment.com/js/auction.js index a0ed386e46..a5cb43cd86 100644 --- a/data/web/fragment.com/js/auction.js +++ b/data/web/fragment.com/js/auction.js @@ -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 + }); } };