Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Add) Config option to toggle torrent thanks button #3453

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading