Update content of files

This commit is contained in:
GitHub Action 2024-06-16 22:22:30 +00:00
parent 27c778d8ea
commit eeeb821570
2 changed files with 124 additions and 1 deletions

View file

@ -1543,6 +1543,19 @@ a.tm-menu-link:focus {
white-space: nowrap; white-space: nowrap;
} }
.icon-stars:before {
width: 13px;
height: 16px;
margin-right: 2px;
background-image: var(--image-url-stars-icon);
}
.form-control-wrap.icon-stars:before {
width: 15px;
height: 19px;
margin-left: -1px;
margin-right: 4px;
}
.tm-section { .tm-section {
padding: 0 10px 5px; padding: 0 10px 5px;
} }
@ -3820,7 +3833,8 @@ a.tm-table-action-link:hover {
height: 28px; height: 28px;
} }
.icon-ton:before { .icon-ton:before,
.icon-stars:before {
width: 15px; width: 15px;
height: 19px; height: 19px;
margin-left: -1px; margin-left: -1px;
@ -4189,6 +4203,8 @@ a.tm-table-action-link:hover {
--image-url-ton-text-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2220%22%20viewBox%3D%220%200%2016%2020%22%20width%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m2.68%205h10.63c.22%200%20.4.18.4.41%200%20.07-.01.14-.05.2l-5.04%209.08c-.22.4-.72.54-1.11.32-.14-.08-.25-.19-.32-.33l-4.87-9.08c-.1-.2-.03-.45.17-.55.06-.03.12-.05.19-.05zm5.32%209.78v-9.78z%22%20fill%3D%22none%22%20stroke%3D%22%238c9aa9%22%20stroke-width%3D%221.39%22%2F%3E%3C%2Fsvg%3E'); --image-url-ton-text-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2220%22%20viewBox%3D%220%200%2016%2020%22%20width%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m2.68%205h10.63c.22%200%20.4.18.4.41%200%20.07-.01.14-.05.2l-5.04%209.08c-.22.4-.72.54-1.11.32-.14-.08-.25-.19-.32-.33l-4.87-9.08c-.1-.2-.03-.45.17-.55.06-.03.12-.05.19-.05zm5.32%209.78v-9.78z%22%20fill%3D%22none%22%20stroke%3D%22%238c9aa9%22%20stroke-width%3D%221.39%22%2F%3E%3C%2Fsvg%3E');
--image-url-stars-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2245%22%20viewBox%3D%220%200%2046%2045%22%20width%3D%2246%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22a%22%20x1%3D%2225%25%22%20x2%3D%2274.92%25%22%20y1%3D%22.825%25%22%20y2%3D%22107.86%25%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23ffd951%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ffb222%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22b%22%20x1%3D%2250%25%22%20x2%3D%2250%25%22%20y1%3D%220%25%22%20y2%3D%2299.795%25%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23e58f0d%22%2F%3E%3Cstop%20offset%3D%22.99963%22%20stop-color%3D%22%23eb7915%22%2F%3E%3C%2FlinearGradient%3E%3Cpath%20id%3D%22c%22%20d%3D%22m15.45%2013.17%205.29-10.61c.61-1.22%202.09-1.71%203.3-1.09.47.24.86.63%201.09%201.11l5%2010.23c.41.83%201.21%201.4%202.12%201.51l10.47%201.27c1.42.17%202.43%201.47%202.26%202.91-.07.59-.34%201.14-.76%201.56l-8.27%208.2c-.33.33-.49.8-.44%201.27l1.38%2011.08c.2%201.59-.92%203.04-2.49%203.23-.59.08-1.19-.04-1.72-.32l-8.74-4.81c-.63-.35-1.39-.36-2.03-.03l-9.06%204.68c-1.27.66-2.83.14-3.48-1.14-.25-.49-.34-1.03-.26-1.57l.72-5.08c.36-2.49%201.89-4.64%204.1-5.78l10.06-5.17c.27-.14.37-.47.24-.74-.11-.21-.34-.33-.57-.29l-12.3%201.77c-1.88.27-3.78-.27-5.26-1.48l-4.09-3.36c-1.17-.96-1.35-2.7-.4-3.88.44-.55%201.08-.9%201.77-.99l10.5-1.36c.68-.09%201.26-.51%201.57-1.12z%22%2F%3E%3Cfilter%20id%3D%22d%22%20height%3D%22111.7%25%22%20width%3D%22111.4%25%22%20x%3D%22-5.7%25%22%20y%3D%22-5.9%25%22%3E%3CfeOffset%20dx%3D%222%22%20dy%3D%223%22%20in%3D%22SourceAlpha%22%20result%3D%22shadowOffsetInner1%22%2F%3E%3CfeComposite%20in%3D%22shadowOffsetInner1%22%20in2%3D%22SourceAlpha%22%20k2%3D%22-1%22%20k3%3D%221%22%20operator%3D%22arithmetic%22%20result%3D%22shadowInnerInner1%22%2F%3E%3CfeColorMatrix%20in%3D%22shadowInnerInner1%22%20type%3D%22matrix%22%20values%3D%220%200%200%200%201%20%20%200%200%200%200%201%20%20%200%200%200%200%201%20%200%200%200%200.65667938%200%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cuse%20fill%3D%22url%28%23a%29%22%20fill-rule%3D%22evenodd%22%20xlink%3Ahref%3D%22%23c%22%2F%3E%3Cuse%20fill%3D%22%23000%22%20filter%3D%22url%28%23d%29%22%20xlink%3Ahref%3D%22%23c%22%2F%3E%3Cuse%20stroke%3D%22url%28%23b%29%22%20stroke-width%3D%222%22%20xlink%3Ahref%3D%22%23c%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
--image-url-support-bots-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%234db2ff%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%28.67%202%29%22%3E%3Cpath%20d%3D%22m7.33%200c2.58%200%204.67%202.09%204.67%204.67v4.56c0%201.28-1.04%202.33-2.33%202.33h-4.68c-1.28%200-2.32-1.05-2.32-2.33v-4.56c0-2.58%202.09-4.67%204.66-4.67zm0%201.11c-1.96%200-3.55%201.59-3.55%203.56v.44c0%20.74.59%201.33%201.33%201.33h4.45c.73%200%201.33-.59%201.33-1.33v-.44c0-1.97-1.59-3.56-3.56-3.56z%22%2F%3E%3Crect%20height%3D%224.89%22%20rx%3D%22.89%22%20width%3D%221.78%22%20x%3D%2212.89%22%20y%3D%224.89%22%2F%3E%3Crect%20height%3D%224.89%22%20rx%3D%22.89%22%20width%3D%221.78%22%20y%3D%224.89%22%2F%3E%3Cellipse%20cx%3D%228.89%22%20cy%3D%224.22%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3Cellipse%20cx%3D%225.78%22%20cy%3D%224.22%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E'); --image-url-support-bots-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%234db2ff%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%28.67%202%29%22%3E%3Cpath%20d%3D%22m7.33%200c2.58%200%204.67%202.09%204.67%204.67v4.56c0%201.28-1.04%202.33-2.33%202.33h-4.68c-1.28%200-2.32-1.05-2.32-2.33v-4.56c0-2.58%202.09-4.67%204.66-4.67zm0%201.11c-1.96%200-3.55%201.59-3.55%203.56v.44c0%20.74.59%201.33%201.33%201.33h4.45c.73%200%201.33-.59%201.33-1.33v-.44c0-1.97-1.59-3.56-3.56-3.56z%22%2F%3E%3Crect%20height%3D%224.89%22%20rx%3D%22.89%22%20width%3D%221.78%22%20x%3D%2212.89%22%20y%3D%224.89%22%2F%3E%3Crect%20height%3D%224.89%22%20rx%3D%22.89%22%20width%3D%221.78%22%20y%3D%224.89%22%2F%3E%3Cellipse%20cx%3D%228.89%22%20cy%3D%224.22%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3Cellipse%20cx%3D%225.78%22%20cy%3D%224.22%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
--image-url-support-bots-text-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2217%22%20viewBox%3D%220%200%2017%2017%22%20width%3D%2217%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%238c9aa9%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%28.708333%202.125%29%22%3E%3Cpath%20d%3D%22m7.79%200c2.74%200%204.96%202.22%204.96%204.96v4.84c0%201.37-1.11%202.48-2.47%202.48h-4.97c-1.37%200-2.48-1.11-2.48-2.48v-4.84c0-2.74%202.22-4.96%204.96-4.96zm0%201.18c-2.08%200-3.78%201.69-3.78%203.78v.47c0%20.78.64%201.42%201.42%201.42h4.72c.79%200%201.42-.64%201.42-1.42v-.47c0-2.09-1.69-3.78-3.78-3.78z%22%2F%3E%3Crect%20height%3D%225.19%22%20rx%3D%22.94%22%20width%3D%221.89%22%20x%3D%2213.69%22%20y%3D%225.19%22%2F%3E%3Crect%20height%3D%225.19%22%20rx%3D%22.94%22%20width%3D%221.89%22%20y%3D%225.19%22%2F%3E%3Cellipse%20cx%3D%229.44%22%20cy%3D%224.49%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3Cellipse%20cx%3D%226.14%22%20cy%3D%224.49%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E'); --image-url-support-bots-text-icon: url('data:image/svg+xml,%3Csvg%20height%3D%2217%22%20viewBox%3D%220%200%2017%2017%22%20width%3D%2217%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%238c9aa9%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate%28.708333%202.125%29%22%3E%3Cpath%20d%3D%22m7.79%200c2.74%200%204.96%202.22%204.96%204.96v4.84c0%201.37-1.11%202.48-2.47%202.48h-4.97c-1.37%200-2.48-1.11-2.48-2.48v-4.84c0-2.74%202.22-4.96%204.96-4.96zm0%201.18c-2.08%200-3.78%201.69-3.78%203.78v.47c0%20.78.64%201.42%201.42%201.42h4.72c.79%200%201.42-.64%201.42-1.42v-.47c0-2.09-1.69-3.78-3.78-3.78z%22%2F%3E%3Crect%20height%3D%225.19%22%20rx%3D%22.94%22%20width%3D%221.89%22%20x%3D%2213.69%22%20y%3D%225.19%22%2F%3E%3Crect%20height%3D%225.19%22%20rx%3D%22.94%22%20width%3D%221.89%22%20y%3D%225.19%22%2F%3E%3Cellipse%20cx%3D%229.44%22%20cy%3D%224.49%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3Cellipse%20cx%3D%226.14%22%20cy%3D%224.49%22%20rx%3D%221%22%20ry%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');

View file

@ -2646,6 +2646,113 @@ var Ads = {
} }
}; };
var Stars = {
initWithdraw: function() {
Aj.onLoad(function(state) {
var cont = Aj.ajContainer;
$(cont).on('click.curPage', '.js-withdraw-btn', Stars.eWithdrawRevenue);
state.$withdrawForm = $('.js-withdraw-form', cont);
Main.initForm(state.$withdrawForm);
state.$withdrawBtn = $('.js-withdraw-btn', cont);
state.updLastReq = +Date.now();
state.canUpdate = true;
if (state.needUpdate) {
state.updStateTo = setTimeout(Stars.updateWithdrawState, Main.UPDATE_PERIOD);
}
});
Aj.onUnload(function(state) {
clearTimeout(state.updStateTo);
state.canUpdate = false;
Main.destroyForm(state.$withdrawForm);
});
},
updateWithdrawState: function(force) {
var now = +Date.now();
if (document.hasFocus() || force ||
Aj.state.updLastReq && (now - Aj.state.updLastReq) > Main.FORCE_UPDATE_PERIOD) {
Aj.state.updLastReq = now;
Aj.apiRequest('updateStarsRevenueWithdrawalState', {
transaction: Aj.state.transaction,
withdrawal_data: Aj.state.withdrawalData,
mode: Aj.state.mode
}, function(result) {
if (result.mode) {
Aj.state.mode = result.mode;
}
if (result.withdrawal_data) {
Aj.state.withdrawalData = result.withdrawal_data;
Aj.state.$withdrawForm.field('withdrawal_data').value(result.withdrawal_data);
}
if (result.html) {
Stars.updateContent(result.html);
}
Aj.state.needUpdate = result.need_update;
if (Aj.state.canUpdate && Aj.state.needUpdate) {
Aj.state.updStateTo = setTimeout(Stars.updateWithdrawState, Main.UPDATE_PERIOD);
}
});
} else {
if (Aj.state.canUpdate && Aj.state.needUpdate) {
Aj.state.updStateTo = setTimeout(Stars.updateWithdrawState, Main.CHECK_PERIOD);
}
}
},
updateContent: function(html) {
$('.js-main-content').html(html).find('.js-preview-sticker').each(function() {
RLottie.init(this, {playUntilEnd: true});
});
},
eWithdrawRevenue: function(e) {
e.stopImmediatePropagation();
e.preventDefault();
var $form = Aj.state.$withdrawForm;
var transaction = $form.field('transaction').value();
var wallet_address = $form.field('wallet_address').value();
var withdrawal_data = $form.field('withdrawal_data').value();
var params = {
transaction: transaction,
wallet_address: wallet_address,
withdrawal_data: withdrawal_data
};
if ($form.data('disabled')) {
return false;
}
var onSuccess = function(result) {
$form.data('disabled', false);
if (result.error) {
return showAlert(result.error);
}
if (result.confirm_message && result.confirm_hash) {
showConfirm(result.confirm_message, function() {
params.confirm_hash = result.confirm_hash;
$form.data('disabled', true);
Aj.apiRequest('initStarsRevenueWithdrawalRequest', params, onSuccess);
}, result.confirm_button, function() {
Aj.state.needUpdate = true;
if (Aj.state.canUpdate && Aj.state.needUpdate) {
Aj.state.updStateTo = setTimeout(Stars.updateWithdrawState, Main.CHECK_PERIOD);
}
});
} else {
if (result.mode) {
Aj.state.mode = result.mode;
}
if (result.html) {
Stars.updateContent(result.html);
}
Aj.state.needUpdate = result.need_update;
if (Aj.state.canUpdate && Aj.state.needUpdate) {
Aj.state.updStateTo = setTimeout(Stars.updateWithdrawState, Main.UPDATE_PERIOD);
}
}
};
$form.data('disabled', true);
Aj.state.needUpdate = false;
clearTimeout(Aj.state.updStateTo);
Aj.apiRequest('initStarsRevenueWithdrawalRequest', params, onSuccess);
}
};
var QR = { var QR = {
showPopup: function(options) { showPopup: function(options) {
options = $.extend({ options = $.extend({