Skip to content

Commit

Permalink
Merge pull request #3453 from Roardom/disable-thanks-system
Browse files Browse the repository at this point in the history
(Add) Config option to toggle torrent thanks button
  • Loading branch information
HDVinnie committed Feb 1, 2024
2 parents eba9cc7 + 88ffbc5 commit 2ac6b2c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
17 changes: 17 additions & 0 deletions config/other.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,21 @@
| The ID value of staff forum area. Should be the main / parent ID.
*/
'staff-forum-id' => '',

/*
|--------------------------------------------------------------------------
| Thanks system
|--------------------------------------------------------------------------
| Allows users to press a button to thank the uploader of a torrent.
*/
'thanks-system' => [
/*
|--------------------------------------------------------------------------
| Enable the thanks system
|--------------------------------------------------------------------------
| True = Enabled
| False = Disabled
*/
'is-enabled' => true,
],
];
9 changes: 6 additions & 3 deletions resources/views/torrent/partials/buttons.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ class="form__button form__button--outlined form__button--centered"
@endif
@endif

<li class="form__group form__group--short-horizontal">
@livewire('thank-button', ['torrent' => $torrent])
</li>
@if (config('other.thanks-system.is-enabled'))
<li class="form__group form__group--short-horizontal">
@livewire('thank-button', ['torrent' => $torrent])
</li>
@endif

@if ($torrent->nfo)
<li x-data="dialog" class="form__group form__group--short-horizontal">
<button
Expand Down

0 comments on commit 2ac6b2c

Please sign in to comment.