mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
improve claim all seeding
This commit is contained in:
@@ -353,11 +353,8 @@ if (isset($total_size) && $total_size){
|
||||
$hasData = true;
|
||||
}
|
||||
if ($hasData) {
|
||||
$claimAllBtn = '';
|
||||
if ($id == $CURUSER['id'] && has_role_work_seeding($CURUSER['id'])) {
|
||||
$claimAllBtn = sprintf('<input type="button" value="%s" id="claim-all-seeding">', nexus_trans('claim.claim_all_seeding_btn'));
|
||||
}
|
||||
$header = sprintf('<div style="display: flex;justify-content: space-between"><div>%s</div><div>%s</div></div>', $summary, $claimAllBtn);
|
||||
$btnArr = apply_filter("user_seeding_top_btn", [], $CURUSER['id']);
|
||||
$header = sprintf('<div style="display: flex;justify-content: space-between"><div>%s</div><div>%s</div></div>', $summary, implode("", $btnArr));
|
||||
echo '<br/>' . $header . $table;
|
||||
} else {
|
||||
echo $lang_getusertorrentlistajax['text_no_record'];
|
||||
|
||||
@@ -633,7 +633,7 @@ if ($userInfo->id == $CURUSER['id'] && has_role_work_seeding($userInfo->id)) {
|
||||
$claimJs = <<<JS
|
||||
jQuery("body").on("click", "#claim-all-seeding", function (e) {
|
||||
layer.confirm("$claimAllSeedingConfirmation", {}, function () {
|
||||
jQuery.post('ajax.php', {"action": "claimAllSeeding"}, function (response) {
|
||||
jQuery.post('/plugin/claim_all_seeding', {"action": "claimAllSeeding"}, function (response) {
|
||||
if (response.ret == 0) {
|
||||
window.location.reload()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user