mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-05 11:09:33 -06:00
Merge pull request #3608 from HDInnovations/Livewire-3
(Update) Livewire 3
This commit is contained in:
21
.github/workflows/compile-assets-test.yml
vendored
21
.github/workflows/compile-assets-test.yml
vendored
@@ -6,14 +6,33 @@ jobs:
|
||||
matrix:
|
||||
operating-system:
|
||||
- ubuntu-22.04
|
||||
php-version:
|
||||
- '8.3'
|
||||
name: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup PHP 8.3
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
extensions: curl, dom, gd, libxml, mbstring, zip, mysql, xml, intl, bcmath, redis-phpredis/phpredis@6.0.1
|
||||
ini-values: error_reporting=E_ALL
|
||||
coverage: pcov
|
||||
tools: composer:v2
|
||||
env:
|
||||
REDIS_CONFIGURE_OPTS: --enable-redis
|
||||
- name: Configure Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
- name: Install Composer Dependencies
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --optimize-autoloader
|
||||
- name: Install JS Dependencies
|
||||
run: bun install
|
||||
- name: Compile Assets (Vite)
|
||||
|
||||
4
.github/workflows/larastan.yml
vendored
4
.github/workflows/larastan.yml
vendored
@@ -30,7 +30,9 @@ jobs:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup PHP 8.2
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
|
||||
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
@@ -9,10 +9,10 @@ jobs:
|
||||
name: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
steps:
|
||||
- name: Code Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
fetch-depth: 0
|
||||
- name: Run Pint
|
||||
uses: aglipanci/laravel-pint-action@2.0.0
|
||||
with:
|
||||
|
||||
2
.github/workflows/phpunit-test.yml
vendored
2
.github/workflows/phpunit-test.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup PHP 8.2
|
||||
- name: Setup PHP 8.3
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
|
||||
6
.github/workflows/prettier-blade.yml
vendored
6
.github/workflows/prettier-blade.yml
vendored
@@ -9,10 +9,10 @@ jobs:
|
||||
name: ${{ matrix.operating-system }}
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
steps:
|
||||
- name: Code Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
fetch-depth: 0
|
||||
- name: Configure Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Announce;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -26,32 +28,20 @@ class AnnounceSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
public int $perPage = 50;
|
||||
|
||||
#[Url]
|
||||
public string $torrentId = '';
|
||||
|
||||
#[Url]
|
||||
public string $userId = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => 25],
|
||||
'torrentId' => ['except' => ''],
|
||||
'userId' => ['except' => ''],
|
||||
'sortField' => ['except' => ''],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
#[Url]
|
||||
public int $perPage = 50;
|
||||
|
||||
final public function updatingUserId(): void
|
||||
{
|
||||
@@ -66,7 +56,8 @@ class AnnounceSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Announce>
|
||||
*/
|
||||
final public function getAnnouncesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function announces(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Announce::query()
|
||||
->when($this->torrentId !== '', fn ($query) => $query->where('torrent_id', '=', $this->torrentId))
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Apikey;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -27,35 +29,26 @@ class ApikeySearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $apikey = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'username' => ['except' => ''],
|
||||
'apikey' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Apikey>
|
||||
*/
|
||||
final public function getApikeysProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function apikeys(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Apikey::with([
|
||||
'user' => fn ($query) => $query->withTrashed()->with('group'),
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\TicketAttachment;
|
||||
use App\Models\User;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithFileUploads;
|
||||
|
||||
@@ -27,6 +29,7 @@ class AttachmentUpload extends Component
|
||||
|
||||
public ?int $ticket = null;
|
||||
|
||||
#[Validate('image|max:1024')]
|
||||
public $attachment;
|
||||
|
||||
public $storedImage;
|
||||
@@ -39,9 +42,7 @@ class AttachmentUpload extends Component
|
||||
|
||||
final public function upload(): void
|
||||
{
|
||||
$this->validate([
|
||||
'attachment' => 'image|max:1024', // 1MB Max
|
||||
]);
|
||||
$this->validate();
|
||||
|
||||
$fileName = uniqid('', true).'.'.$this->attachment->getClientOriginalExtension();
|
||||
|
||||
@@ -55,13 +56,14 @@ class AttachmentUpload extends Component
|
||||
$attachment->file_extension = $this->attachment->getMimeType();
|
||||
$attachment->save();
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Ticket Attachment Uploaded Successfully!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Ticket Attachment Uploaded Successfully!');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, TicketAttachment>
|
||||
*/
|
||||
final public function getAttachmentsProperty(): \Illuminate\Database\Eloquent\Collection
|
||||
#[Computed]
|
||||
final public function attachments(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return Ticket::find($this->ticket)->attachments;
|
||||
}
|
||||
|
||||
@@ -14,51 +14,45 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Audit;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use JsonException;
|
||||
|
||||
class AuditLogSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $modelName = '';
|
||||
|
||||
#[Url]
|
||||
public string $modelId = '';
|
||||
|
||||
#[Url]
|
||||
public string $action = '';
|
||||
|
||||
#[Url]
|
||||
public string $record = '';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'username' => ['except' => ''],
|
||||
'modelName' => ['except' => ''],
|
||||
'modelId' => ['except' => ''],
|
||||
'action' => ['except' => ''],
|
||||
'record' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
final public function getModelNamesProperty()
|
||||
#[Computed]
|
||||
final public function modelNames(): array
|
||||
{
|
||||
$modelList = [];
|
||||
$path = app_path().'/Models';
|
||||
@@ -77,9 +71,11 @@ class AuditLogSearch extends Component
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws JsonException
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Audit>
|
||||
*/
|
||||
final public function getAuditsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function audits(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$audits = Audit::with('user')
|
||||
->when($this->username, fn ($query) => $query->whereRelation('user', 'username', '=', $this->username))
|
||||
|
||||
@@ -19,6 +19,7 @@ use App\Rules\PathToZip;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Component;
|
||||
use Spatie\Backup\BackupDestination\Backup;
|
||||
use Spatie\Backup\BackupDestination\BackupDestination;
|
||||
@@ -35,7 +36,8 @@ class BackupPanel extends Component
|
||||
/**
|
||||
* @return array<mixed>
|
||||
*/
|
||||
final public function getBackupStatusesProperty(): array
|
||||
#[Computed]
|
||||
final public function backupStatuses(): array
|
||||
{
|
||||
return BackupDestinationStatusFactory::createForMonitorConfig(config('backup.monitor_backups'))
|
||||
->map(fn (BackupDestinationStatus $backupDestinationStatus) => [
|
||||
@@ -53,7 +55,8 @@ class BackupPanel extends Component
|
||||
->toArray();
|
||||
}
|
||||
|
||||
final public function getActiveDiskProperty(): ?string
|
||||
#[Computed]
|
||||
final public function activeDisk(): ?string
|
||||
{
|
||||
if (\count($this->backupStatuses)) {
|
||||
return $this->backupStatuses[0]['disk'];
|
||||
@@ -65,7 +68,8 @@ class BackupPanel extends Component
|
||||
/**
|
||||
* @return array<mixed>
|
||||
*/
|
||||
final public function getDisksProperty(): array
|
||||
#[Computed]
|
||||
final public function disks(): array
|
||||
{
|
||||
return collect($this->backupStatuses)
|
||||
->map(fn ($backupStatus): mixed => $backupStatus['disk'])
|
||||
@@ -76,7 +80,8 @@ class BackupPanel extends Component
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
final public function getBackupsProperty(): array
|
||||
#[Computed]
|
||||
final public function backups(): array
|
||||
{
|
||||
$this->validateActiveDisk();
|
||||
|
||||
@@ -110,7 +115,7 @@ class BackupPanel extends Component
|
||||
->first(fn (Backup $backup) => $backup->path() === $deletingFile['path'])
|
||||
->delete();
|
||||
|
||||
$this->emit('refreshBackups');
|
||||
$this->dispatch('refreshBackups');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,7 +183,7 @@ class BackupPanel extends Component
|
||||
)->validate();
|
||||
} catch (ValidationException $e) {
|
||||
$message = $e->validator->errors()->get('activeDisk')[0];
|
||||
$this->emitSelf('showErrorToast', $message);
|
||||
$this->dispatch('showErrorToast', message: $message)->self();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
@@ -201,7 +206,7 @@ class BackupPanel extends Component
|
||||
)->validate();
|
||||
} catch (ValidationException $e) {
|
||||
$message = $e->validator->errors()->get('file')[0];
|
||||
$this->emitSelf('showErrorToast', $message);
|
||||
$this->dispatch('showErrorToast', message: $message)->self();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\BlockedIp;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -21,32 +24,16 @@ class BlockIpAddress extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $ipAddress = '';
|
||||
|
||||
#[Url]
|
||||
#[Validate('required|filled')]
|
||||
public string $reason = '';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
protected $rules = [
|
||||
'reason' => [
|
||||
'required',
|
||||
'filled',
|
||||
],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function store(): void
|
||||
{
|
||||
abort_unless(auth()->user()->group->is_modo, 403);
|
||||
@@ -63,7 +50,7 @@ class BlockIpAddress extends Component
|
||||
|
||||
cache()->forget('blocked-ips');
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Ip Addresses Successfully Blocked!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Ip Addresses Successfully Blocked!');
|
||||
}
|
||||
|
||||
final public function destroy(BlockedIp $blockedIp): void
|
||||
@@ -71,13 +58,14 @@ class BlockIpAddress extends Component
|
||||
if (auth()->user()->group->is_modo) {
|
||||
$blockedIp->delete();
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'IP has successfully been deleted!']);
|
||||
$this->dispatch('success', type: 'success', message: 'IP has successfully been deleted!');
|
||||
} else {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'Permission Denied!']);
|
||||
$this->dispatch('error', type: 'error', message: 'Permission Denied!');
|
||||
}
|
||||
}
|
||||
|
||||
final public function getIpAddressesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function ipAddresses(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return BlockedIp::query()
|
||||
->latest()
|
||||
|
||||
@@ -20,14 +20,17 @@ use Livewire\Component;
|
||||
class BookmarkButton extends Component
|
||||
{
|
||||
public Torrent $torrent;
|
||||
|
||||
public User $user;
|
||||
|
||||
public bool $isBookmarked;
|
||||
|
||||
public int $bookmarksCount;
|
||||
|
||||
final public function store(): void
|
||||
{
|
||||
if ($this->user->bookmarks()->where('torrent_id', '=', $this->torrent->id)->exists()) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'Torrent Has Already Been Bookmarked!']);
|
||||
$this->dispatch('error', type: 'error', message: 'Torrent Has Already Been Bookmarked!');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -35,7 +38,7 @@ class BookmarkButton extends Component
|
||||
$this->user->bookmarks()->attach($this->torrent->id);
|
||||
$this->isBookmarked = true;
|
||||
$this->bookmarksCount++;
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Torrent Has Been Bookmarked Successfully!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Torrent Has Been Bookmarked Successfully!');
|
||||
}
|
||||
|
||||
final public function destroy(): void
|
||||
@@ -43,7 +46,7 @@ class BookmarkButton extends Component
|
||||
$this->user->bookmarks()->detach($this->torrent->id);
|
||||
$this->isBookmarked = false;
|
||||
$this->bookmarksCount--;
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Torrent Has Been Unbookmarked Successfully!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Torrent Has Been Unbookmarked Successfully!');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Collection;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -21,13 +23,9 @@ class CollectionSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -36,7 +34,8 @@ class CollectionSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Collection>
|
||||
*/
|
||||
final public function getCollectionsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function collections(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Collection::withCount('movie')
|
||||
->with('movie')
|
||||
|
||||
@@ -105,7 +105,7 @@ class Comment extends Component
|
||||
$this->comment->update((new AntiXSS())->xss_clean($this->editState));
|
||||
$this->isEditing = false;
|
||||
} else {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'Permission Denied!']);
|
||||
$this->dispatch('error', type: 'error', message: 'Permission Denied!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class Comment extends Component
|
||||
$this->comment->delete();
|
||||
$this->emitUp('refresh');
|
||||
} else {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'Permission Denied!']);
|
||||
$this->dispatch('error', type: 'error', message: 'Permission Denied!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class Comment extends Component
|
||||
$modelName = str()->snake(class_basename($this->comment->commentable_type), ' ');
|
||||
|
||||
if ($modelName !== 'ticket' && auth()->user()->can_comment === false) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => trans('comment.rights-revoked')]);
|
||||
$this->dispatch('error', type: 'error', message: __('comment.rights-revoked'));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -233,7 +233,7 @@ class Comment extends Component
|
||||
|
||||
$this->isReplying = false;
|
||||
|
||||
$this->emitSelf('refresh');
|
||||
$this->dispatch('refresh')->self();
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -32,6 +32,7 @@ use App\Notifications\NewCommentTag;
|
||||
use App\Repositories\ChatRepository;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use voku\helper\AntiXSS;
|
||||
@@ -98,13 +99,13 @@ class Comments extends Component
|
||||
$modelName = str()->snake(class_basename($this->model), ' ');
|
||||
|
||||
if ($modelName !== 'ticket' && $this->user->can_comment === false) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => trans('comment.rights-revoked')]);
|
||||
$this->dispatch('error', type: 'error', message: __('comment.rights-revoked'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (strtolower(class_basename($this->model)) === 'torrent' && $this->model->status !== Torrent::APPROVED) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => trans('comment.torrent-status')]);
|
||||
$this->dispatch('error', type: 'error', message: __('comment.torrent-status'));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -207,7 +208,8 @@ class Comments extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Comment>
|
||||
*/
|
||||
final public function getCommentsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function comments(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return $this->model
|
||||
->comments()
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Company;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -21,13 +23,9 @@ class CompanySearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -36,7 +34,8 @@ class CompanySearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Company>
|
||||
*/
|
||||
final public function getCompaniesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function companies(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Company::withCount('tv', 'movie')
|
||||
->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%'))
|
||||
|
||||
@@ -36,7 +36,7 @@ class DislikeButton extends Component
|
||||
final public function store(): void
|
||||
{
|
||||
if ($this->user->id === $this->post->user_id) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'You Cannot Dislike Your Own Post!']);
|
||||
$this->dispatch('error', type: 'error', message: 'You Cannot Dislike Your Own Post!');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class DislikeButton extends Component
|
||||
$exist = Like::where('user_id', '=', $this->user->id)->where('post_id', '=', $this->post->id)->first();
|
||||
|
||||
if ($exist) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'You Have Already Liked Or Disliked This Post!']);
|
||||
$this->dispatch('error', type: 'error', message: 'You Have Already Liked Or Disliked This Post!');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ class DislikeButton extends Component
|
||||
|
||||
$this->dislikesCount += 1;
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Your Dislike Was Successfully Applied!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Your Dislike Was Successfully Applied!');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -15,39 +15,34 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\EmailUpdate;
|
||||
use App\Models\User;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use App\Traits\LivewireSort;
|
||||
|
||||
class EmailUpdateSearch extends Component
|
||||
{
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
/**
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'username' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<EmailUpdate>
|
||||
*/
|
||||
final public function getEmailUpdatesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function emailUpdates(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return EmailUpdate::with([
|
||||
'user' => fn ($query) => $query->withTrashed()->with('group'),
|
||||
@@ -63,15 +58,4 @@ class EmailUpdateSearch extends Component
|
||||
'emailUpdates' => $this->emailUpdates,
|
||||
]);
|
||||
}
|
||||
|
||||
final public function sortBy(string $field): void
|
||||
{
|
||||
if ($this->sortField === $field) {
|
||||
$this->sortDirection = $this->sortDirection === 'asc' ? 'desc' : 'asc';
|
||||
} else {
|
||||
$this->sortDirection = 'asc';
|
||||
}
|
||||
|
||||
$this->sortField = $field;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ use App\Models\FailedLoginAttempt;
|
||||
use App\Traits\LivewireSort;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -25,38 +27,29 @@ class FailedLoginSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $userId = '';
|
||||
|
||||
#[Url]
|
||||
public string $ipAddress = '';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'username' => ['except' => ''],
|
||||
'userId' => ['except' => ''],
|
||||
'ipAddress' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, FailedLoginAttempt>
|
||||
*/
|
||||
final public function getFailedLoginsTop10IpProperty(): \Illuminate\Database\Eloquent\Collection
|
||||
#[Computed]
|
||||
final public function failedLoginsTop10Ip(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return FailedLoginAttempt::query()
|
||||
->select(['ip_address', DB::raw('COUNT(*) as login_attempts'), DB::raw('MAX(created_at) as latest_created_at')])
|
||||
@@ -71,7 +64,8 @@ class FailedLoginSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<FailedLoginAttempt>
|
||||
*/
|
||||
final public function getFailedLoginsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function failedLogins(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return FailedLoginAttempt::query()
|
||||
->with('user.group')
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Forum;
|
||||
use App\Models\ForumCategory;
|
||||
use App\Models\Topic;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -23,38 +25,34 @@ class ForumCategoryTopicSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
public string $sortField = 'last_post_created_at';
|
||||
public string $sortDirection = 'desc';
|
||||
public string $label = '';
|
||||
public string $state = '';
|
||||
public string $subscribed = '';
|
||||
public string $read = '';
|
||||
public ForumCategory $category;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'search' => ['except' => ''],
|
||||
'sortField' => ['except' => 'last_post_created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'read' => ['except' => ''],
|
||||
'label' => ['except' => ''],
|
||||
'state' => ['except' => ''],
|
||||
'subscribed' => ['except' => ''],
|
||||
];
|
||||
#[Url]
|
||||
public string $sortField = 'last_post_created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public string $label = '';
|
||||
|
||||
#[Url]
|
||||
public string $state = '';
|
||||
|
||||
#[Url]
|
||||
public string $subscribed = '';
|
||||
|
||||
#[Url]
|
||||
public string $read = '';
|
||||
|
||||
public ForumCategory $category;
|
||||
|
||||
final public function mount(ForumCategory $category): void
|
||||
{
|
||||
$this->category = $category;
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -63,7 +61,8 @@ class ForumCategoryTopicSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Topic>
|
||||
*/
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function topics(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Forum;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\Topic;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -23,28 +25,30 @@ class ForumTopicSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
public string $sortField = 'last_post_created_at';
|
||||
public string $sortDirection = 'desc';
|
||||
public string $label = '';
|
||||
public string $state = '';
|
||||
public string $subscribed = '';
|
||||
public string $read = '';
|
||||
public Forum $forum;
|
||||
public ?Subscription $subscription;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'search' => ['except' => ''],
|
||||
'sortField' => ['except' => 'last_post_created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'read' => ['except' => ''],
|
||||
'label' => ['except' => ''],
|
||||
'state' => ['except' => ''],
|
||||
'subscribed' => ['except' => ''],
|
||||
];
|
||||
#[Url]
|
||||
public string $sortField = 'last_post_created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public string $label = '';
|
||||
|
||||
#[Url]
|
||||
public string $state = '';
|
||||
|
||||
#[Url]
|
||||
public string $subscribed = '';
|
||||
|
||||
#[Url]
|
||||
public string $read = '';
|
||||
|
||||
public Forum $forum;
|
||||
|
||||
public ?Subscription $subscription;
|
||||
|
||||
final public function mount(Forum $forum): void
|
||||
{
|
||||
@@ -52,11 +56,6 @@ class ForumTopicSearch extends Component
|
||||
$this->subscription = Subscription::where('user_id', '=', auth()->id())->where('forum_id', '=', $forum->id)->first();
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -65,7 +64,8 @@ class ForumTopicSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Topic>
|
||||
*/
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function topics(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Gift;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -26,37 +28,29 @@ class GiftLogSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $sender = '';
|
||||
|
||||
#[Url]
|
||||
public string $receiver = '';
|
||||
|
||||
#[Url]
|
||||
public string $comment = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'sender' => ['except' => ''],
|
||||
'receiver' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Gift>
|
||||
*/
|
||||
final public function getGiftsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function gifts(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Gift::with([
|
||||
'sender' => fn ($query) => $query->withTrashed()->with('group'),
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\History;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -27,37 +29,33 @@ class HistorySearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $agent = '';
|
||||
|
||||
#[Url]
|
||||
public string $torrent = '';
|
||||
|
||||
#[Url]
|
||||
public string $user = '';
|
||||
|
||||
#[Url]
|
||||
public string $seeder = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $active = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $groupBy = 'none';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => 25],
|
||||
'agent' => ['except' => ''],
|
||||
'torrent' => ['except' => ''],
|
||||
'user' => ['except' => ''],
|
||||
'seeder' => ['except' => 'any'],
|
||||
'active' => ['except' => 'any'],
|
||||
'groupBy' => ['except' => 'none'],
|
||||
'sortField' => ['except' => ''],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingUser(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -91,7 +89,8 @@ class HistorySearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<History>
|
||||
*/
|
||||
final public function getHistoriesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function histories(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return History::query()
|
||||
->with('user', 'torrent:id,name')
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Invite;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -24,43 +26,36 @@ class InviteLogSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $sender = '';
|
||||
|
||||
#[Url]
|
||||
public string $email = '';
|
||||
|
||||
#[Url]
|
||||
public string $code = '';
|
||||
|
||||
#[Url]
|
||||
public string $receiver = '';
|
||||
|
||||
#[Url]
|
||||
public string $custom = '';
|
||||
|
||||
#[Url]
|
||||
public string $groupBy = 'none';
|
||||
|
||||
#[Url]
|
||||
public int $threshold = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'sender' => ['except' => ''],
|
||||
'email' => ['except' => ''],
|
||||
'code' => ['except' => ''],
|
||||
'receiver' => ['except' => ''],
|
||||
'custom' => ['except' => ''],
|
||||
'groupBy' => ['except' => 'none'],
|
||||
'threshold' => ['except' => 25],
|
||||
'page' => ['except' => 1],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function mount(): void
|
||||
{
|
||||
$this->sortField = match ($this->groupBy) {
|
||||
@@ -69,11 +64,6 @@ class InviteLogSearch extends Component
|
||||
};
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingGroupBy($value): void
|
||||
{
|
||||
$this->sortField = match ($value) {
|
||||
@@ -85,7 +75,8 @@ class InviteLogSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Invite>
|
||||
*/
|
||||
final public function getInvitesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function invites(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Invite::withTrashed()
|
||||
->with(['sender.group', 'receiver.group'])
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace App\Http\Livewire;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use SplFileInfo;
|
||||
@@ -46,17 +47,13 @@ class LaravelLogViewer extends Component
|
||||
$this->castLivewireProperties($field, $value);
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingLogs(): void
|
||||
{
|
||||
$this->page = 1;
|
||||
}
|
||||
|
||||
final public function getLogFilesProperty()
|
||||
#[Computed]
|
||||
final public function logFiles()
|
||||
{
|
||||
$directory = storage_path('logs');
|
||||
|
||||
@@ -64,7 +61,8 @@ class LaravelLogViewer extends Component
|
||||
->sortByDesc(fn (SplFileInfo $file) => $file->getMTime())->values();
|
||||
}
|
||||
|
||||
final public function getEntriesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function entries(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$files = $this->logFiles;
|
||||
$logString = '';
|
||||
|
||||
@@ -18,6 +18,8 @@ use App\Models\User;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -27,40 +29,29 @@ class LeakerSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 50;
|
||||
|
||||
#[Url]
|
||||
public string $torrentIds = '';
|
||||
|
||||
#[Url]
|
||||
public ?int $minutesLeakedWithin = null;
|
||||
|
||||
#[Url]
|
||||
public string $agent = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'leak_count';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => 25],
|
||||
'torrentIds' => ['except' => ''],
|
||||
'agent' => ['except' => ''],
|
||||
'minutesLeakedWithin' => ['except' => null],
|
||||
'sortField' => ['except' => ''],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<User>
|
||||
*/
|
||||
final public function getLeakersProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function leakers(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return History::query()
|
||||
->select([
|
||||
@@ -86,7 +77,8 @@ class LeakerSearch extends Component
|
||||
->paginate($this->perPage);
|
||||
}
|
||||
|
||||
final public function getTorrentIdCountProperty(): int
|
||||
#[Computed]
|
||||
final public function torrentIdCount(): int
|
||||
{
|
||||
return \count(array_filter(array_map('trim', explode(',', $this->torrentIds))));
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class LikeButton extends Component
|
||||
final public function store(): void
|
||||
{
|
||||
if ($this->user->id === $this->post->user_id) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'You Cannot Like Your Own Post!']);
|
||||
$this->dispatch('error', type: 'error', message: 'You Cannot Like Your Own Post!');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class LikeButton extends Component
|
||||
$exist = Like::where('user_id', '=', $this->user->id)->where('post_id', '=', $this->post->id)->first();
|
||||
|
||||
if ($exist) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'You Have Already Liked Or Disliked This Post!']);
|
||||
$this->dispatch('error', type: 'error', message: 'You Have Already Liked Or Disliked This Post!');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ class LikeButton extends Component
|
||||
|
||||
$this->likesCount += 1;
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Your Like Was Successfully Applied!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Your Like Was Successfully Applied!');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Movie;
|
||||
use App\Models\Type;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -13,29 +15,23 @@ class MissingMediaSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public array $categories = [];
|
||||
|
||||
public int $perPage = 50;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'categories' => ['except' => []],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
#[Url]
|
||||
public int $perPage = 50;
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Movie>
|
||||
*/
|
||||
final public function getMediasProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function medias(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Movie::with(['torrents:tmdb,resolution_id,type_id' => ['resolution:id,position,name']])
|
||||
->withCount(['requests' => fn ($query) => $query->whereNull('torrent_id')->whereNull('claimed')])
|
||||
@@ -46,7 +42,8 @@ class MissingMediaSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, Type>
|
||||
*/
|
||||
final public function getTypesProperty(): \Illuminate\Database\Eloquent\Collection
|
||||
#[Computed]
|
||||
final public function types(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return Type::select('id', 'position', 'name')->orderBy('position')->get();
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Network;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -21,13 +23,9 @@ class NetworkSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -36,7 +34,8 @@ class NetworkSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Network>
|
||||
*/
|
||||
final public function getNetworksProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function networks(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Network::withCount('tv')
|
||||
->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%'))
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Note;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -10,24 +12,12 @@ class NoteSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'search' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -36,7 +26,8 @@ class NoteSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Note>
|
||||
*/
|
||||
final public function getNotesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function notes(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Note::query()
|
||||
->with([
|
||||
@@ -59,6 +50,6 @@ class NoteSearch extends Component
|
||||
{
|
||||
$note->delete();
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Note has successfully been deleted!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Note has successfully been deleted!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -23,61 +25,79 @@ class NotificationSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public bool $bon_gifts = false;
|
||||
|
||||
#[Url]
|
||||
public bool $comment = false;
|
||||
|
||||
#[Url]
|
||||
public bool $comment_tags = false;
|
||||
|
||||
#[Url]
|
||||
public bool $followers = false;
|
||||
|
||||
#[Url]
|
||||
public bool $posts = false;
|
||||
|
||||
#[Url]
|
||||
public bool $post_tags = false;
|
||||
|
||||
#[Url]
|
||||
public bool $post_tips = false;
|
||||
|
||||
#[Url]
|
||||
public bool $request_bounties = false;
|
||||
|
||||
#[Url]
|
||||
public bool $request_claims = false;
|
||||
|
||||
#[Url]
|
||||
public bool $request_fills = false;
|
||||
|
||||
#[Url]
|
||||
public bool $request_approvals = false;
|
||||
|
||||
#[Url]
|
||||
public bool $request_rejections = false;
|
||||
|
||||
#[Url]
|
||||
public bool $request_unclaims = false;
|
||||
|
||||
#[Url]
|
||||
public bool $reseed_requests = false;
|
||||
|
||||
#[Url]
|
||||
public bool $thanks = false;
|
||||
|
||||
#[Url]
|
||||
public bool $upload_tips = false;
|
||||
|
||||
#[Url]
|
||||
public bool $topics = false;
|
||||
|
||||
#[Url]
|
||||
public bool $unfollows = false;
|
||||
|
||||
#[Url]
|
||||
public bool $uploads = false;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<\Illuminate\Notifications\DatabaseNotification>
|
||||
*/
|
||||
final public function getNotificationsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function notifications(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return auth()->user()->notifications()
|
||||
return auth()->user()?->notifications()
|
||||
->select('*')
|
||||
->selectRaw("CASE WHEN read_at IS NULL THEN 'FALSE' ELSE 'TRUE' END as is_read")
|
||||
->where(function ($query): void {
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Passkey;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -27,35 +29,26 @@ class PasskeySearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $passkey = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'username' => ['except' => ''],
|
||||
'passkey' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Passkey>
|
||||
*/
|
||||
final public function getPasskeysProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function passkeys(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Passkey::with([
|
||||
'user' => fn ($query) => $query->withTrashed()->with('group'),
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Peer;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -24,43 +26,42 @@ class PeerSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public bool $duplicateIpsOnly = false;
|
||||
|
||||
#[Url]
|
||||
public bool $includeSeedsize = false;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $ip = '';
|
||||
|
||||
#[Url]
|
||||
public string $port = '';
|
||||
|
||||
#[Url]
|
||||
public string $agent = '';
|
||||
|
||||
#[Url]
|
||||
public string $torrent = '';
|
||||
|
||||
#[Url]
|
||||
public string $connectivity = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $active = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $groupBy = 'none';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'page' => ['except' => 1],
|
||||
'duplicateIpsOnly' => ['except' => false],
|
||||
'includeSeedsize' => ['except' => false],
|
||||
'perPage' => ['except' => 25],
|
||||
'ip' => ['except' => ''],
|
||||
'port' => ['except' => ''],
|
||||
'agent' => ['except' => ''],
|
||||
'torrent' => ['except' => ''],
|
||||
'connectivity' => ['except' => 'any'],
|
||||
'active' => ['except' => 'any'],
|
||||
'groupBy' => ['except' => 'none'],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingIp(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -91,7 +92,8 @@ class PeerSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Peer>
|
||||
*/
|
||||
final public function getPeersProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function peers(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Peer::query()
|
||||
->when(
|
||||
|
||||
@@ -18,21 +18,17 @@ use App\Models\Category;
|
||||
use App\Models\Person;
|
||||
use App\Models\Torrent;
|
||||
use App\Models\User;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
|
||||
class PersonCredit extends Component
|
||||
{
|
||||
public Person $person;
|
||||
|
||||
#[Url]
|
||||
public ?int $occupationId = null;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
public $queryString = [
|
||||
'occupationId',
|
||||
];
|
||||
|
||||
final public function mount(): void
|
||||
{
|
||||
$this->occupationId ??= match (true) {
|
||||
@@ -50,7 +46,8 @@ class PersonCredit extends Component
|
||||
};
|
||||
}
|
||||
|
||||
final public function getPersonalFreeleechProperty(): bool
|
||||
#[Computed]
|
||||
final public function personalFreeleech(): bool
|
||||
{
|
||||
return cache()->get('personal_freeleech:'.auth()->user()->id) ?? false;
|
||||
}
|
||||
@@ -63,52 +60,62 @@ class PersonCredit extends Component
|
||||
$value = Occupation::from($value);
|
||||
}
|
||||
|
||||
public function getDirectedCountProperty(): int
|
||||
#[Computed]
|
||||
public function directedCount(): int
|
||||
{
|
||||
return $this->person->directedMovies()->count() + $this->person->directedTv()->count();
|
||||
}
|
||||
|
||||
public function getCreatedCountProperty(): int
|
||||
#[Computed]
|
||||
public function createdCount(): int
|
||||
{
|
||||
return $this->person->createdTv()->count();
|
||||
}
|
||||
|
||||
public function getWrittenCountProperty(): int
|
||||
#[Computed]
|
||||
public function writtenCount(): int
|
||||
{
|
||||
return $this->person->writtenMovies()->count() + $this->person->writtenTv()->count();
|
||||
}
|
||||
|
||||
public function getProducedCountProperty(): int
|
||||
#[Computed]
|
||||
public function producedCount(): int
|
||||
{
|
||||
return $this->person->producedMovies()->count() + $this->person->producedTv()->count();
|
||||
}
|
||||
|
||||
public function getComposedCountProperty(): int
|
||||
#[Computed]
|
||||
public function composedCount(): int
|
||||
{
|
||||
return $this->person->composedMovies()->count() + $this->person->composedTv()->count();
|
||||
}
|
||||
|
||||
public function getCinematographedCountProperty(): int
|
||||
#[Computed]
|
||||
public function cinematographedCount(): int
|
||||
{
|
||||
return $this->person->cinematographedMovies()->count() + $this->person->cinematographedTv()->count();
|
||||
}
|
||||
|
||||
public function getEditedCountProperty(): int
|
||||
#[Computed]
|
||||
public function editedCount(): int
|
||||
{
|
||||
return $this->person->editedMovies()->count() + $this->person->editedTv()->count();
|
||||
}
|
||||
|
||||
public function getProductionDesignedCountProperty(): int
|
||||
#[Computed]
|
||||
public function productionDesignedCount(): int
|
||||
{
|
||||
return $this->person->productionDesignedMovies()->count() + $this->person->productionDesignedTv()->count();
|
||||
}
|
||||
|
||||
public function getArtDirectedCountProperty(): int
|
||||
#[Computed]
|
||||
public function artDirectedCount(): int
|
||||
{
|
||||
return $this->person->artDirectedMovies()->count() + $this->person->artDirectedTv()->count();
|
||||
}
|
||||
|
||||
public function getActedCountProperty(): int
|
||||
#[Computed]
|
||||
public function actedCount(): int
|
||||
{
|
||||
return $this->person->actedMovies()->count() + $this->person->actedTv()->count();
|
||||
}
|
||||
@@ -116,7 +123,8 @@ class PersonCredit extends Component
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection<int, Torrent>
|
||||
*/
|
||||
final public function getMediasProperty(): \Illuminate\Support\Collection
|
||||
#[Computed]
|
||||
final public function medias(): \Illuminate\Support\Collection
|
||||
{
|
||||
if ($this->occupationId === null) {
|
||||
return collect();
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Person;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -21,20 +23,18 @@ class PersonSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $occupationIds = [];
|
||||
|
||||
#[Url]
|
||||
public string $firstCharacter = '';
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -43,7 +43,8 @@ class PersonSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Person>
|
||||
*/
|
||||
final public function getPersonsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function persons(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Person::select(['id', 'still', 'name'])
|
||||
->whereNotNull('still')
|
||||
@@ -57,7 +58,8 @@ class PersonSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, Person>
|
||||
*/
|
||||
final public function getFirstCharactersProperty()
|
||||
#[Computed]
|
||||
final public function firstCharacters()
|
||||
{
|
||||
return Person::selectRaw('substr(name, 1, 1) as alpha, count(*) as count')
|
||||
->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%'))
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Post;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -21,19 +23,9 @@ class PostSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public String $search = '';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'search' => ['except' => ''],
|
||||
];
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -42,7 +34,8 @@ class PostSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Post>
|
||||
*/
|
||||
final public function getPostsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function posts(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Post::query()
|
||||
->with('user', 'user.group', 'topic:id,name,state')
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Tv;
|
||||
use App\Models\Movie;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Component;
|
||||
|
||||
class RandomMedia extends Component
|
||||
@@ -23,7 +24,8 @@ class RandomMedia extends Component
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection<int, Movie>
|
||||
*/
|
||||
final public function getMoviesProperty(): \Illuminate\Support\Collection
|
||||
#[Computed]
|
||||
final public function movies(): \Illuminate\Support\Collection
|
||||
{
|
||||
$cacheKey = config('cache.prefix').':random-media-movie-ids';
|
||||
|
||||
@@ -38,7 +40,8 @@ class RandomMedia extends Component
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection<int, Movie>
|
||||
*/
|
||||
final public function getMovies2Property(): \Illuminate\Support\Collection
|
||||
#[Computed]
|
||||
final public function movies2(): \Illuminate\Support\Collection
|
||||
{
|
||||
$cacheKey = config('cache.prefix').':random-media-movie-ids';
|
||||
|
||||
@@ -53,7 +56,8 @@ class RandomMedia extends Component
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection<int, Tv>
|
||||
*/
|
||||
final public function getTvsProperty(): \Illuminate\Support\Collection
|
||||
#[Computed]
|
||||
final public function tvs(): \Illuminate\Support\Collection
|
||||
{
|
||||
$cacheKey = config('cache.prefix').':random-media-tv-ids';
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Rsskey;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -27,35 +29,26 @@ class RsskeySearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $rsskey = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'username' => ['except' => ''],
|
||||
'rsskey' => ['except' => ''],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Rsskey>
|
||||
*/
|
||||
final public function getRsskeysProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function rsskeys(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Rsskey::with([
|
||||
'user' => fn ($query) => $query->withTrashed()->with('group'),
|
||||
|
||||
@@ -24,6 +24,8 @@ use App\Models\User;
|
||||
use App\Services\Unit3dAnnounce;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use MarcReichel\IGDBLaravel\Models\Game;
|
||||
|
||||
@@ -43,17 +45,18 @@ class SimilarTorrent extends Component
|
||||
public string $reason;
|
||||
|
||||
/**
|
||||
* @var array<int, bool|string>
|
||||
*
|
||||
* Currently, in livewire v2, a checkbox type is false|string.
|
||||
* In livewire v3, the type should be changed to array<int, bool>.
|
||||
* @var array<int, bool>
|
||||
*/
|
||||
#[Url]
|
||||
public array $checked = [];
|
||||
|
||||
#[Url]
|
||||
public bool $selectPage = false;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'bumped_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
protected $listeners = ['destroy' => 'deleteRecords'];
|
||||
@@ -76,7 +79,8 @@ class SimilarTorrent extends Component
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection<int, Torrent>
|
||||
*/
|
||||
final public function getTorrentsProperty(): \Illuminate\Support\Collection
|
||||
#[Computed]
|
||||
final public function torrents(): \Illuminate\Support\Collection
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
@@ -123,7 +127,8 @@ class SimilarTorrent extends Component
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, TorrentRequest>
|
||||
*/
|
||||
final public function getTorrentRequestsProperty(): \Illuminate\Database\Eloquent\Collection
|
||||
#[Computed]
|
||||
final public function torrentRequests(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return TorrentRequest::with(['user:id,username,group_id', 'user.group', 'category', 'type', 'resolution'])
|
||||
->withCount(['comments'])
|
||||
@@ -136,25 +141,26 @@ class SimilarTorrent extends Component
|
||||
final public function alertConfirm(): void
|
||||
{
|
||||
if (!auth()->user()->group->is_modo) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'Permission Denied!']);
|
||||
$this->dispatch('error', type: 'error', message: 'Permission Denied!');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$torrents = Torrent::whereKey(array_keys($this->checked, true))->pluck('name')->toArray();
|
||||
$names = $torrents;
|
||||
$this->dispatchBrowserEvent('swal:confirm', [
|
||||
'type' => 'warning',
|
||||
'message' => 'Are you sure?',
|
||||
'body' => 'If deleted, you will not be able to recover the following files!'.nl2br("\n")
|
||||
$this->dispatch(
|
||||
'swal:confirm',
|
||||
type: 'warning',
|
||||
message: 'Are you sure?',
|
||||
body: 'If deleted, you will not be able to recover the following files!'.nl2br("\n")
|
||||
.nl2br(implode("\n", $names)),
|
||||
]);
|
||||
);
|
||||
}
|
||||
|
||||
final public function deleteRecords(): void
|
||||
{
|
||||
if (!auth()->user()->group->is_modo) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'Permission Denied!']);
|
||||
$this->dispatch('error', type: 'error', message: 'Permission Denied!');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -229,14 +235,16 @@ class SimilarTorrent extends Component
|
||||
$this->checked = [];
|
||||
$this->selectPage = false;
|
||||
|
||||
$this->dispatchBrowserEvent('swal:modal', [
|
||||
'type' => 'success',
|
||||
'message' => 'Torrents Deleted Successfully!',
|
||||
'text' => 'A personal message has been sent to all users that have downloaded these torrents.',
|
||||
]);
|
||||
$this->dispatch(
|
||||
'swal:modal',
|
||||
type: 'success',
|
||||
message: 'Torrents Deleted Successfully!',
|
||||
text: 'A personal message has been sent to all users that have downloaded these torrents.',
|
||||
);
|
||||
}
|
||||
|
||||
final public function getPersonalFreeleechProperty(): bool
|
||||
#[Computed]
|
||||
final public function personalFreeleech(): bool
|
||||
{
|
||||
return cache()->get('personal_freeleech:'.auth()->id()) ?? false;
|
||||
}
|
||||
|
||||
@@ -20,27 +20,29 @@ use Livewire\Component;
|
||||
class SmallBookmarkButton extends Component
|
||||
{
|
||||
public Torrent $torrent;
|
||||
|
||||
public bool $isBookmarked;
|
||||
|
||||
public User $user;
|
||||
|
||||
final public function store(): void
|
||||
{
|
||||
if ($this->user->bookmarks()->where('torrent_id', '=', $this->torrent->id)->exists()) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'Torrent Has Already Been Bookmarked!']);
|
||||
$this->dispatch('error', type: 'error', message: 'Torrent Has Already Been Bookmarked!');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->user->bookmarks()->attach($this->torrent->id);
|
||||
$this->isBookmarked = true;
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Torrent Has Been Bookmarked Successfully!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Torrent Has Been Bookmarked Successfully!');
|
||||
}
|
||||
|
||||
final public function destroy(): void
|
||||
{
|
||||
$this->user->bookmarks()->detach($this->torrent->id);
|
||||
$this->isBookmarked = false;
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Torrent Has Been Unbookmarked Successfully!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Torrent Has Been Unbookmarked Successfully!');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Forum;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -24,7 +25,8 @@ class SubscribedForum extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Forum>
|
||||
*/
|
||||
final public function getForumsProperty()
|
||||
#[Computed]
|
||||
final public function forums()
|
||||
{
|
||||
return Forum::query()
|
||||
->with('latestPoster', 'lastRepliedTopic')
|
||||
@@ -36,7 +38,7 @@ class SubscribedForum extends Component
|
||||
|
||||
final public function updatedSubscribedForumsPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
$this->dispatch('paginationChanged');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Topic;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -24,7 +25,8 @@ class SubscribedTopic extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Topic>
|
||||
*/
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function topics(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
@@ -42,7 +44,7 @@ class SubscribedTopic extends Component
|
||||
|
||||
final public function updatedSubscribedTopicsPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
$this->dispatch('paginationChanged');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -17,6 +17,8 @@ use App\Models\Subtitle;
|
||||
use App\Models\Torrent;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -25,28 +27,30 @@ class SubtitleSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $categories = [];
|
||||
|
||||
#[Url]
|
||||
public string $language = '';
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -55,7 +59,8 @@ class SubtitleSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Subtitle>
|
||||
*/
|
||||
final public function getSubtitlesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function subtitles(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Subtitle::with(['user.group', 'torrent.category', 'language'])
|
||||
->whereHas('torrent')
|
||||
|
||||
@@ -32,13 +32,13 @@ class ThankButton extends Component
|
||||
final public function store(): void
|
||||
{
|
||||
if ($this->user->id === $this->torrent->user_id) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'You Cannot Thank Your Own Content!']);
|
||||
$this->dispatch('error', type: 'error', message: 'You Cannot Thank Your Own Content!');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Thank::query()->whereBelongsTo($this->user)->whereBelongsTo($this->torrent)->exists()) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'You Have Already Thanked!']);
|
||||
$this->dispatch('error', type: 'error', message: 'You Have Already Thanked!');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class ThankButton extends Component
|
||||
|
||||
$this->torrent->notifyUploader('thank', $thank);
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Your Thank Was Successfully Applied!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Your Thank Was Successfully Applied!');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -27,36 +29,29 @@ class TicketSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public ?User $user = null;
|
||||
|
||||
#[Url]
|
||||
public string $tab = 'open';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'updated_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'search' => ['except' => ''],
|
||||
'tab' => ['except' => 'open'],
|
||||
];
|
||||
|
||||
final public function mount(): void
|
||||
{
|
||||
$this->user = auth()->user();
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -70,7 +65,8 @@ class TicketSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Ticket>
|
||||
*/
|
||||
final public function getTicketsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function tickets(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Ticket::query()
|
||||
->with(['user.group', 'staff.group', 'category', 'priority'])
|
||||
|
||||
@@ -17,6 +17,9 @@ use App\Models\Category;
|
||||
use App\Models\Torrent;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
/**
|
||||
@@ -25,30 +28,19 @@ use Livewire\Component;
|
||||
*/
|
||||
class Top10 extends Component
|
||||
{
|
||||
#[Url]
|
||||
#[Validate('in:movie_meta,tv_meta')]
|
||||
public string $metaType = 'movie_meta';
|
||||
|
||||
#[Url]
|
||||
#[Validate('in:day,week,month,year,all')]
|
||||
public string $interval = 'day';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'metaType' => ['except' => 'movie_meta'],
|
||||
'interval' => ['except' => 'day'],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $rules = [
|
||||
'metaType' => 'in:movie_meta,tv_meta',
|
||||
'interval' => 'in:day,week,month,year,all',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, Torrent>
|
||||
*/
|
||||
final public function getWorksProperty(): Collection
|
||||
#[Computed]
|
||||
final public function works(): Collection
|
||||
{
|
||||
$this->validate();
|
||||
|
||||
@@ -86,7 +78,8 @@ class Top10 extends Component
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
final public function getMetaTypesProperty(): array
|
||||
#[Computed]
|
||||
final public function metaTypes(): array
|
||||
{
|
||||
$metaTypes = [];
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ use App\Models\Post;
|
||||
use App\Models\Topic;
|
||||
use App\Models\TopicRead;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -24,27 +26,16 @@ class TopicPostSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
public Topic $topic;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'search' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function mount(Topic $topic): void
|
||||
{
|
||||
$this->topic = $topic;
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -53,7 +44,8 @@ class TopicPostSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Post>
|
||||
*/
|
||||
final public function getPostsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function posts(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$posts = Post::query()
|
||||
->with('user', 'user.group')
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\ForumCategory;
|
||||
use App\Models\Topic;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -22,34 +24,30 @@ class TopicSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'last_post_created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public string $label = '';
|
||||
|
||||
#[Url]
|
||||
public string $state = '';
|
||||
|
||||
#[Url]
|
||||
public string $subscribed = '';
|
||||
|
||||
#[Url]
|
||||
public string $forumId = '';
|
||||
|
||||
#[Url]
|
||||
public string $read = '';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'search' => ['except' => ''],
|
||||
'sortField' => ['except' => 'last_post_created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'read' => ['except' => ''],
|
||||
'label' => ['except' => ''],
|
||||
'state' => ['except' => ''],
|
||||
'subscribed' => ['except' => ''],
|
||||
'forumId' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -58,7 +56,8 @@ class TopicSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, ForumCategory>
|
||||
*/
|
||||
final public function getForumCategoriesProperty(): \Illuminate\Database\Eloquent\Collection
|
||||
#[Computed]
|
||||
final public function forumCategories(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return ForumCategory::query()
|
||||
->with([
|
||||
@@ -72,7 +71,8 @@ class TopicSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Topic>
|
||||
*/
|
||||
final public function getTopicsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function topics(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Topic::query()
|
||||
->select('topics.*')
|
||||
|
||||
@@ -15,8 +15,11 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Announce;
|
||||
use App\Models\TorrentDownload;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -25,47 +28,36 @@ use Livewire\WithPagination;
|
||||
*/
|
||||
class TorrentDownloadSearch extends Component
|
||||
{
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 50;
|
||||
|
||||
#[Url]
|
||||
public string $torrentName = '';
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $torrentDownloadType = '';
|
||||
|
||||
#[Url]
|
||||
public string $from = '';
|
||||
|
||||
#[Url]
|
||||
public string $until = '';
|
||||
|
||||
#[Url]
|
||||
public string $groupBy = 'none';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'id';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => 25],
|
||||
'torrentName' => ['except' => ''],
|
||||
'username' => ['except' => ''],
|
||||
'torrentDownloadType' => ['except' => ''],
|
||||
'from' => ['except' => null],
|
||||
'until' => ['except' => null],
|
||||
'groupBy' => ['except' => 'none'],
|
||||
'sortField' => ['except' => 'id'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingGroupBy(string $value): void
|
||||
{
|
||||
$this->sortField = match ($value) {
|
||||
@@ -97,7 +89,8 @@ class TorrentDownloadSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<TorrentDownload>
|
||||
*/
|
||||
final public function getTorrentDownloadsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function torrentDownloads(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return TorrentDownload::query()
|
||||
->with([
|
||||
@@ -128,17 +121,6 @@ class TorrentDownloadSearch extends Component
|
||||
->paginate($this->perPage);
|
||||
}
|
||||
|
||||
final public function sortBy(string $field): void
|
||||
{
|
||||
if ($this->sortField === $field) {
|
||||
$this->sortDirection = $this->sortDirection === 'asc' ? 'desc' : 'asc';
|
||||
} else {
|
||||
$this->sortDirection = 'desc';
|
||||
}
|
||||
|
||||
$this->sortField = $field;
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
{
|
||||
return view('livewire.torrent-download-search', [
|
||||
|
||||
@@ -19,6 +19,8 @@ use App\Models\TorrentRequestClaim;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -28,105 +30,96 @@ class TorrentRequestSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $name = '';
|
||||
|
||||
#[Url]
|
||||
public string $requestor = '';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $categories = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $types = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $resolutions = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $genres = [];
|
||||
|
||||
#[Url]
|
||||
public ?int $tmdbId = null;
|
||||
|
||||
#[Url]
|
||||
public string $imdbId = '';
|
||||
|
||||
#[Url]
|
||||
public ?int $tvdbId = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $malId = null;
|
||||
|
||||
#[Url]
|
||||
public bool $unfilled = false;
|
||||
|
||||
#[Url]
|
||||
public bool $claimed = false;
|
||||
|
||||
#[Url]
|
||||
public bool $pending = false;
|
||||
|
||||
#[Url]
|
||||
public bool $filled = false;
|
||||
|
||||
#[Url]
|
||||
public bool $myRequests = false;
|
||||
|
||||
#[Url]
|
||||
public bool $myClaims = false;
|
||||
|
||||
#[Url]
|
||||
public bool $myVoted = false;
|
||||
|
||||
#[Url]
|
||||
public bool $myFilled = false;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public bool $showFilters = false;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'name' => ['except' => ''],
|
||||
'requestor' => ['except' => ''],
|
||||
'categories' => ['except' => []],
|
||||
'types' => ['except' => []],
|
||||
'resolutions' => ['except' => []],
|
||||
'genres' => ['except' => []],
|
||||
'tmdbId' => ['except' => ''],
|
||||
'imdbId' => ['except' => ''],
|
||||
'tvdbId' => ['except' => ''],
|
||||
'malId' => ['except' => ''],
|
||||
'unfilled' => ['except' => false],
|
||||
'claimed' => ['except' => false],
|
||||
'pending' => ['except' => false],
|
||||
'filled' => ['except' => false],
|
||||
'myRequests' => ['except' => false],
|
||||
'myClaims' => ['except' => false],
|
||||
'myVoted' => ['except' => false],
|
||||
'myFilled' => ['except' => false],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'page' => ['except' => 1],
|
||||
];
|
||||
|
||||
final public function updating(string $field, mixed &$value): void
|
||||
{
|
||||
$this->castLivewireProperties($field, $value);
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function toggleShowFilters(): void
|
||||
{
|
||||
$this->showFilters = !$this->showFilters;
|
||||
}
|
||||
|
||||
final public function getTorrentRequestStatProperty(): ?object
|
||||
#[Computed]
|
||||
final public function torrentRequestStat(): ?object
|
||||
{
|
||||
return DB::table('requests')
|
||||
->selectRaw('count(*) as total')
|
||||
@@ -135,7 +128,8 @@ class TorrentRequestSearch extends Component
|
||||
->first();
|
||||
}
|
||||
|
||||
final public function getTorrentRequestBountyStatProperty(): ?object
|
||||
#[Computed]
|
||||
final public function torrentRequestBountyStat(): ?object
|
||||
{
|
||||
return DB::table('requests')
|
||||
->selectRaw('coalesce(sum(bounty), 0) as total')
|
||||
@@ -147,7 +141,8 @@ class TorrentRequestSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<TorrentRequest>
|
||||
*/
|
||||
final public function getTorrentRequestsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function torrentRequests(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$user = auth()->user();
|
||||
$isRegexAllowed = $user->group->is_modo;
|
||||
|
||||
@@ -21,6 +21,8 @@ use App\Models\User;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use Closure;
|
||||
@@ -31,196 +33,188 @@ class TorrentSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $name = '';
|
||||
|
||||
#[Url]
|
||||
public string $description = '';
|
||||
|
||||
#[Url]
|
||||
public string $mediainfo = '';
|
||||
|
||||
#[Url]
|
||||
public string $uploader = '';
|
||||
|
||||
#[Url]
|
||||
public string $keywords = '';
|
||||
|
||||
#[Url]
|
||||
public ?int $startYear = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $endYear = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $minSize = null;
|
||||
|
||||
#[Url]
|
||||
public int $minSizeMultiplier = 1;
|
||||
|
||||
#[Url]
|
||||
public ?int $maxSize = null;
|
||||
|
||||
#[Url]
|
||||
public int $maxSizeMultiplier = 1;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $categories = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $types = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $resolutions = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $genres = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $regions = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $distributors = [];
|
||||
|
||||
#[Url]
|
||||
public string $adult = 'any';
|
||||
|
||||
#[Url]
|
||||
public ?int $tmdbId = null;
|
||||
|
||||
#[Url]
|
||||
public string $imdbId = '';
|
||||
|
||||
#[Url]
|
||||
public ?int $tvdbId = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $malId = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $playlistId = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $collectionId = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $networkId = null;
|
||||
|
||||
#[Url]
|
||||
public ?int $companyId = null;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $primaryLanguages = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $free = [];
|
||||
|
||||
#[Url]
|
||||
public bool $doubleup = false;
|
||||
|
||||
#[Url]
|
||||
public bool $featured = false;
|
||||
|
||||
#[Url]
|
||||
public bool $refundable = false;
|
||||
|
||||
#[Url]
|
||||
public bool $stream = false;
|
||||
|
||||
#[Url]
|
||||
public bool $sd = false;
|
||||
|
||||
#[Url]
|
||||
public bool $highspeed = false;
|
||||
|
||||
#[Url]
|
||||
public bool $bookmarked = false;
|
||||
|
||||
#[Url]
|
||||
public bool $wished = false;
|
||||
|
||||
#[Url]
|
||||
public bool $internal = false;
|
||||
|
||||
#[Url]
|
||||
public bool $personalRelease = false;
|
||||
|
||||
#[Url]
|
||||
public bool $alive = false;
|
||||
|
||||
#[Url]
|
||||
public bool $dying = false;
|
||||
|
||||
#[Url]
|
||||
public bool $dead = false;
|
||||
|
||||
#[Url]
|
||||
public bool $graveyard = false;
|
||||
|
||||
#[Url]
|
||||
public bool $notDownloaded = false;
|
||||
|
||||
#[Url]
|
||||
public bool $downloaded = false;
|
||||
|
||||
#[Url]
|
||||
public bool $seeding = false;
|
||||
|
||||
#[Url]
|
||||
public bool $leeching = false;
|
||||
|
||||
#[Url]
|
||||
public bool $incomplete = false;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'bumped_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public string $view = 'list';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'name' => ['except' => ''],
|
||||
'description' => ['except' => ''],
|
||||
'mediainfo' => ['except' => ''],
|
||||
'uploader' => ['except' => ''],
|
||||
'keywords' => ['except' => ''],
|
||||
'startYear' => ['except' => ''],
|
||||
'endYear' => ['except' => ''],
|
||||
'minSize' => ['except' => ''],
|
||||
'maxSize' => ['except' => ''],
|
||||
'categories' => ['except' => []],
|
||||
'types' => ['except' => []],
|
||||
'resolutions' => ['except' => []],
|
||||
'genres' => ['except' => []],
|
||||
'regions' => ['except' => []],
|
||||
'distributors' => ['except' => []],
|
||||
'tmdbId' => ['except' => ''],
|
||||
'imdbId' => ['except' => ''],
|
||||
'tvdbId' => ['except' => ''],
|
||||
'malId' => ['except' => ''],
|
||||
'playlistId' => ['except' => ''],
|
||||
'collectionId' => ['except' => ''],
|
||||
'companyId' => ['except' => ''],
|
||||
'networkId' => ['except' => ''],
|
||||
'primaryLanguages' => ['except' => []],
|
||||
'free' => ['except' => []],
|
||||
'doubleup' => ['except' => false],
|
||||
'featured' => ['except' => false],
|
||||
'refundable' => ['except' => false],
|
||||
'stream' => ['except' => false],
|
||||
'sd' => ['except' => false],
|
||||
'highspeed' => ['except' => false],
|
||||
'bookmarked' => ['except' => false],
|
||||
'wished' => ['except' => false],
|
||||
'internal' => ['except' => false],
|
||||
'personalRelease' => ['except' => false],
|
||||
'alive' => ['except' => false],
|
||||
'dying' => ['except' => false],
|
||||
'dead' => ['except' => false],
|
||||
'graveyard' => ['except' => false],
|
||||
'downloaded' => ['except' => false],
|
||||
'seeding' => ['except' => false],
|
||||
'leeching' => ['except' => false],
|
||||
'incomplete' => ['except' => false],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
'sortField' => ['except' => 'bumped_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'view' => ['except' => 'list'],
|
||||
];
|
||||
|
||||
final public function updating(string $field, mixed &$value): void
|
||||
{
|
||||
$this->castLivewireProperties($field, $value);
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingName(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -231,7 +225,8 @@ class TorrentSearch extends Component
|
||||
$this->perPage = \in_array($this->view, ['card', 'poster']) ? 24 : 25;
|
||||
}
|
||||
|
||||
final public function getPersonalFreeleechProperty(): bool
|
||||
#[Computed]
|
||||
final public function personalFreeleech(): bool
|
||||
{
|
||||
return cache()->get('personal_freeleech:'.auth()->id()) ?? false;
|
||||
}
|
||||
@@ -301,7 +296,8 @@ class TorrentSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Torrent>
|
||||
*/
|
||||
final public function getTorrentsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function torrents(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
@@ -389,7 +385,8 @@ class TorrentSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Torrent>
|
||||
*/
|
||||
final public function getGroupedTorrentsProperty()
|
||||
#[Computed]
|
||||
final public function groupedTorrents()
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
@@ -637,7 +634,8 @@ class TorrentSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Torrent>
|
||||
*/
|
||||
final public function getGroupedPostersProperty()
|
||||
#[Computed]
|
||||
final public function groupedPosters()
|
||||
{
|
||||
// Whitelist which columns are allowed to be ordered by
|
||||
if (!\in_array($this->sortField, [
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Tv;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -21,13 +23,9 @@ class TvSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $search;
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -36,7 +34,8 @@ class TvSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Tv>
|
||||
*/
|
||||
final public function getShowsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function shows(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Tv::with(['networks', 'genres'])
|
||||
->withCount('seasons')
|
||||
|
||||
@@ -18,6 +18,7 @@ use Laravel\Fortify\Actions\DisableTwoFactorAuthentication;
|
||||
use Laravel\Fortify\Actions\EnableTwoFactorAuthentication;
|
||||
use Laravel\Fortify\Actions\GenerateNewRecoveryCodes;
|
||||
use Laravel\Fortify\Features;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Component;
|
||||
|
||||
class TwoFactorAuthForm extends Component
|
||||
@@ -77,7 +78,7 @@ class TwoFactorAuthForm extends Component
|
||||
final public function confirmTwoFactorAuthentication(ConfirmTwoFactorAuthentication $confirm): void
|
||||
{
|
||||
if (empty($this->code)) {
|
||||
$this->dispatchBrowserEvent('error', ['type' => 'error', 'message' => 'The two factor authentication code input must not be empty.']);
|
||||
$this->dispatch('error', type: 'error', message: 'The two factor authentication code input must not be empty.');
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -122,7 +123,8 @@ class TwoFactorAuthForm extends Component
|
||||
/**
|
||||
* Get the current user of the application.
|
||||
*/
|
||||
final public function getUserProperty(): ?\Illuminate\Contracts\Auth\Authenticatable
|
||||
#[Computed]
|
||||
final public function user(): ?\Illuminate\Contracts\Auth\Authenticatable
|
||||
{
|
||||
return auth()->user();
|
||||
}
|
||||
@@ -130,7 +132,8 @@ class TwoFactorAuthForm extends Component
|
||||
/**
|
||||
* Determine if two-factor authentication is enabled.
|
||||
*/
|
||||
final public function getEnabledProperty(): bool
|
||||
#[Computed]
|
||||
final public function enabled(): bool
|
||||
{
|
||||
return !empty($this->user->two_factor_secret);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Peer;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -29,55 +31,44 @@ class UserActive extends Component
|
||||
|
||||
public ?User $user = null;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $name = '';
|
||||
|
||||
#[Url]
|
||||
public string $ip = '';
|
||||
|
||||
#[Url]
|
||||
public string $port = '';
|
||||
|
||||
#[Url]
|
||||
public string $client = '';
|
||||
|
||||
#[Url]
|
||||
public string $seeding = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $active = 'include';
|
||||
|
||||
#[Url]
|
||||
public string $visible = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public bool $showMorePrecision = false;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'perPage' => ['except' => 50],
|
||||
'name' => ['except' => ''],
|
||||
'ip' => ['except' => ''],
|
||||
'port' => ['except' => ''],
|
||||
'client' => ['excpet' => ''],
|
||||
'seeding' => ['except' => 'any'],
|
||||
'active' => ['except' => 'any'],
|
||||
'visible' => ['except' => 'any'],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'showMorePrecision' => ['except' => false],
|
||||
];
|
||||
|
||||
final public function mount(int $userId): void
|
||||
{
|
||||
$this->user = User::find($userId);
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -86,7 +77,8 @@ class UserActive extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Peer>
|
||||
*/
|
||||
final public function getActivesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function actives(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Peer::query()
|
||||
->join('torrents', 'peers.torrent_id', '=', 'torrents.id')
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Note;
|
||||
use App\Models\User;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -24,36 +27,26 @@ class UserNotes extends Component
|
||||
|
||||
public User $user;
|
||||
|
||||
#[Url]
|
||||
#[Validate('required|filled')]
|
||||
public string $message = '';
|
||||
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
#[Url]
|
||||
#[Validate('array')]
|
||||
public array $messages = [];
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $rules = [
|
||||
'message' => [
|
||||
'required',
|
||||
'filled',
|
||||
],
|
||||
'messages' => [
|
||||
'array',
|
||||
],
|
||||
'messages.*' => [
|
||||
'required',
|
||||
'filled',
|
||||
]
|
||||
];
|
||||
|
||||
final public function mount(): void
|
||||
{
|
||||
$this->messages = Note::where('user_id', '=', $this->user->id)->pluck('message', 'id')->toArray();
|
||||
@@ -62,7 +55,8 @@ class UserNotes extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Note>
|
||||
*/
|
||||
final public function getNotesProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function notes(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Note::query()
|
||||
->with('staffuser', 'staffuser.group')
|
||||
@@ -81,7 +75,7 @@ class UserNotes extends Component
|
||||
{
|
||||
abort_unless(auth()->user()->group->is_modo, 403);
|
||||
|
||||
$this->validateOnly('message');
|
||||
$this->validate();
|
||||
|
||||
Note::create([
|
||||
'user_id' => $this->user->id,
|
||||
@@ -91,22 +85,21 @@ class UserNotes extends Component
|
||||
|
||||
$this->message = '';
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Note has successfully been posted!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Note has successfully been posted!');
|
||||
}
|
||||
|
||||
final public function update(int $id): void
|
||||
{
|
||||
abort_unless(auth()->user()->group->is_modo, 403);
|
||||
|
||||
$this->validateOnly('messages');
|
||||
$this->validateOnly('messages.*');
|
||||
$this->validate();
|
||||
|
||||
Note::whereKey($id)->update([
|
||||
'staff_id' => auth()->id(),
|
||||
'message' => $this->messages[$id],
|
||||
]);
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Note has successfully been updated!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Note has successfully been updated!');
|
||||
}
|
||||
|
||||
final public function destroy(int $id): void
|
||||
@@ -115,6 +108,6 @@ class UserNotes extends Component
|
||||
|
||||
Note::findOrFail($id)->delete();
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Note has successfully been deleted!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Note has successfully been deleted!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\Resurrection;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -26,37 +28,26 @@ class UserResurrections extends Component
|
||||
|
||||
public ?User $user = null;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $name = '';
|
||||
|
||||
#[Url]
|
||||
public string $rewarded = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'perPage' => ['except' => ''],
|
||||
'name' => ['except' => ''],
|
||||
'rewarded' => ['except' => 'any'],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
];
|
||||
|
||||
final public function mount(int $userId): void
|
||||
{
|
||||
$this->user = User::find($userId);
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -65,7 +56,8 @@ class UserResurrections extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Resurrection>
|
||||
*/
|
||||
final public function getResurrectionsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function resurrections(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Resurrection::query()
|
||||
->select([
|
||||
|
||||
@@ -17,6 +17,8 @@ use App\Models\Group;
|
||||
use App\Models\User;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -26,45 +28,36 @@ class UserSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public bool $show = false;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $username = '';
|
||||
|
||||
#[Url]
|
||||
public string $email = '';
|
||||
|
||||
#[Url]
|
||||
public string $rsskey = '';
|
||||
|
||||
#[Url]
|
||||
public string $apikey = '';
|
||||
|
||||
#[Url]
|
||||
public string $passkey = '';
|
||||
|
||||
#[Url]
|
||||
public ?int $groupId = null;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'username' => ['except' => ''],
|
||||
'email' => ['except' => ''],
|
||||
'apikey' => ['except' => ''],
|
||||
'rsskey' => ['except' => ''],
|
||||
'passkey' => ['except' => ''],
|
||||
'show' => ['except' => false],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingShow(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -80,7 +73,8 @@ class UserSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<User>
|
||||
*/
|
||||
final public function getUsersProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function users(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return User::query()
|
||||
->with('group')
|
||||
@@ -98,7 +92,8 @@ class UserSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection<int, Group>
|
||||
*/
|
||||
final public function getGroupsProperty()
|
||||
#[Computed]
|
||||
final public function groups()
|
||||
{
|
||||
return Group::orderBy('position')->get();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace App\Http\Livewire;
|
||||
use App\Models\History;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -26,67 +28,56 @@ class UserTorrents extends Component
|
||||
|
||||
public ?User $user = null;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $name = '';
|
||||
|
||||
#[Url]
|
||||
public string $unsatisfied = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $active = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $completed = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $uploaded = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $hitrun = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $prewarn = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $immune = 'any';
|
||||
|
||||
#[Url]
|
||||
public string $downloaded = 'any';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $status = [];
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public bool $showMorePrecision = false;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'perPage' => ['except' => ''],
|
||||
'name' => ['except' => ''],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'unsatisfied' => ['except' => 'any'],
|
||||
'active' => ['except' => 'any'],
|
||||
'completed' => ['except' => 'any'],
|
||||
'prewarn' => ['except' => 'any'],
|
||||
'hitrun' => ['except' => 'any'],
|
||||
'immune' => ['except' => 'any'],
|
||||
'uploaded' => ['except' => 'any'],
|
||||
'downloaded' => ['except' => 'any'],
|
||||
'status' => ['except' => []],
|
||||
'showMorePrecision' => ['except' => false],
|
||||
];
|
||||
|
||||
final public function mount(int $userId): void
|
||||
{
|
||||
$this->user = User::find($userId);
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -95,7 +86,8 @@ class UserTorrents extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<History>
|
||||
*/
|
||||
final public function getHistoryProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function history(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$histories = History::query()
|
||||
->join(
|
||||
|
||||
@@ -17,6 +17,8 @@ use App\Models\Scopes\ApprovedScope;
|
||||
use App\Models\Torrent;
|
||||
use App\Models\User;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -27,45 +29,35 @@ class UserUploads extends Component
|
||||
|
||||
public ?User $user = null;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $name = '';
|
||||
|
||||
#[Url]
|
||||
public string $personalRelease = 'any';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
#[Url]
|
||||
public array $status = [];
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
#[Url]
|
||||
public bool $showMorePrecision = false;
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'perPage' => ['except' => ''],
|
||||
'name' => ['except' => ''],
|
||||
'personalRelease' => ['except' => 'any'],
|
||||
'sortField' => ['except' => 'created_at'],
|
||||
'sortDirection' => ['except' => 'desc'],
|
||||
'status' => ['except' => []],
|
||||
];
|
||||
|
||||
final public function mount(int $userId): void
|
||||
{
|
||||
$this->user = User::find($userId);
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -74,7 +66,8 @@ class UserUploads extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Torrent>
|
||||
*/
|
||||
final public function getUploadsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function uploads(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
$uploads = Torrent::query()
|
||||
->withCount('thanks')
|
||||
|
||||
@@ -18,6 +18,9 @@ use App\Models\User;
|
||||
use App\Models\Warning;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -35,35 +38,27 @@ class UserWarnings extends Component
|
||||
|
||||
public User $user;
|
||||
|
||||
#[Url]
|
||||
public string $warningTab = 'automated';
|
||||
|
||||
#[Url]
|
||||
#[Validate('required|filled|max:255')]
|
||||
public string $message = '';
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 10;
|
||||
|
||||
#[Url]
|
||||
public ?string $sortField = null;
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'warningTab' => ['except' => 'automated'],
|
||||
];
|
||||
|
||||
protected $rules = [
|
||||
'message' => [
|
||||
'required',
|
||||
'filled',
|
||||
'max:255',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Warning>
|
||||
*/
|
||||
final public function getWarningsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function warnings(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return $this->user
|
||||
->userwarning()
|
||||
@@ -83,17 +78,20 @@ class UserWarnings extends Component
|
||||
->paginate($this->perPage);
|
||||
}
|
||||
|
||||
final public function getAutomatedWarningsCountProperty(): int
|
||||
#[Computed]
|
||||
final public function automatedWarningsCount(): int
|
||||
{
|
||||
return $this->user->userwarning()->whereNotNull('torrent')->count();
|
||||
}
|
||||
|
||||
final public function getManualWarningsCountProperty(): int
|
||||
#[Computed]
|
||||
final public function manualWarningsCount(): int
|
||||
{
|
||||
return $this->user->userwarning()->whereNull('torrent')->count();
|
||||
}
|
||||
|
||||
final public function getDeletedWarningsCountProperty(): int
|
||||
#[Computed]
|
||||
final public function deletedWarningsCount(): int
|
||||
{
|
||||
return $this->user->userwarning()->onlyTrashed()->count();
|
||||
}
|
||||
@@ -125,7 +123,7 @@ class UserWarnings extends Component
|
||||
|
||||
$this->message = '';
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Warning issued successfully!']);
|
||||
$this->dispatch('success', type: 'success', message: 'Warning issued successfully!');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,7 +147,7 @@ class UserWarnings extends Component
|
||||
'message' => $staff->username.' has decided to deactivate your warning for torrent '.$warning->torrent.' You lucked out! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]',
|
||||
]);
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Warning Was Successfully Deactivated']);
|
||||
$this->dispatch('success', type: 'success', message: 'Warning Was Successfully Deactivated');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,7 +162,7 @@ class UserWarnings extends Component
|
||||
'active' => true,
|
||||
]);
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Warning Was Successfully Reactivated']);
|
||||
$this->dispatch('success', type: 'success', message: 'Warning Was Successfully Reactivated');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,7 +189,7 @@ class UserWarnings extends Component
|
||||
'message' => $staff->username.' has decided to deactivate all of your warnings. You lucked out! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]',
|
||||
]);
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'All Warnings Were Successfully Deactivated']);
|
||||
$this->dispatch('success', type: 'success', message: 'All Warnings Were Successfully Deactivated');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,7 +216,7 @@ class UserWarnings extends Component
|
||||
'message' => $staff->username.' has decided to delete your warning for torrent '.$warning->torrent.' You lucked out! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]',
|
||||
]);
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Warning Was Successfully Deleted']);
|
||||
$this->dispatch('success', type: 'success', message: 'Warning Was Successfully Deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,7 +243,7 @@ class UserWarnings extends Component
|
||||
'message' => $staff->username.' has decided to delete all of your warnings. You lucked out! [color=red][b]THIS IS AN AUTOMATED SYSTEM MESSAGE, PLEASE DO NOT REPLY![/b][/color]',
|
||||
]);
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'All Warnings Were Successfully Deleted']);
|
||||
$this->dispatch('success', type: 'success', message: 'All Warnings Were Successfully Deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +255,7 @@ class UserWarnings extends Component
|
||||
|
||||
Warning::withTrashed()->findOrFail($id)->restore();
|
||||
|
||||
$this->dispatchBrowserEvent('success', ['type' => 'success', 'message' => 'Warning Was Successfully Restored']);
|
||||
$this->dispatch('success', type: 'success', message: 'Warning Was Successfully Restored');
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Warning;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -23,40 +25,30 @@ class WarningLogSearch extends Component
|
||||
use LivewireSort;
|
||||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public string $sender = '';
|
||||
|
||||
#[Url]
|
||||
public string $receiver = '';
|
||||
|
||||
#[Url]
|
||||
public string $torrent = '';
|
||||
|
||||
#[Url]
|
||||
public string $reason = '';
|
||||
|
||||
#[Url]
|
||||
public bool $show = false;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $queryString = [
|
||||
'sender' => ['except' => ''],
|
||||
'receiver' => ['except' => ''],
|
||||
'torrent' => ['except' => ''],
|
||||
'reason' => ['except' => ''],
|
||||
'show' => ['except' => false],
|
||||
'page' => ['except' => 1],
|
||||
'perPage' => ['except' => ''],
|
||||
];
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function toggleProperties($property): void
|
||||
{
|
||||
if ($property === 'show') {
|
||||
@@ -67,7 +59,8 @@ class WarningLogSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Warning>
|
||||
*/
|
||||
final public function getWarningsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function warnings(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Warning::query()
|
||||
->with(['warneduser.group', 'staffuser.group', 'torrenttitle'])
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Watchlist;
|
||||
use App\Traits\LivewireSort;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Url;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
@@ -25,12 +27,16 @@ class WatchlistSearch extends Component
|
||||
|
||||
public ?\Illuminate\Contracts\Auth\Authenticatable $user = null;
|
||||
|
||||
#[Url]
|
||||
public int $perPage = 25;
|
||||
|
||||
#[Url]
|
||||
public string $search = '';
|
||||
|
||||
#[Url]
|
||||
public string $sortField = 'created_at';
|
||||
|
||||
#[Url]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
final public function mount(): void
|
||||
@@ -38,11 +44,6 @@ class WatchlistSearch extends Component
|
||||
$this->user = auth()->user();
|
||||
}
|
||||
|
||||
final public function updatedPage(): void
|
||||
{
|
||||
$this->emit('paginationChanged');
|
||||
}
|
||||
|
||||
final public function updatingSearch(): void
|
||||
{
|
||||
$this->resetPage();
|
||||
@@ -51,7 +52,8 @@ class WatchlistSearch extends Component
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<\App\Models\User>
|
||||
*/
|
||||
final public function getUsersProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
#[Computed]
|
||||
final public function users(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
return Watchlist::query()
|
||||
->with(['user.group', 'author.group'])
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"ext-zip": "*",
|
||||
"assada/laravel-achievements": "^2.6",
|
||||
"bjeavons/zxcvbn-php": "^1.3.1",
|
||||
"doctrine/dbal": "^3.7.2",
|
||||
"doctrine/dbal": "^3.8.3",
|
||||
"gabrielelana/byte-units": "^0.5.0",
|
||||
"guzzlehttp/guzzle": "^7.8.1",
|
||||
"hdvinnie/laravel-html-purifier": "^2.0.0",
|
||||
@@ -25,36 +25,36 @@
|
||||
"intervention/image": "^2.7.2",
|
||||
"joypixels/assets": "^v7.0.1",
|
||||
"laravel/fortify": "1.20.0",
|
||||
"laravel/framework": "^10.41.0",
|
||||
"laravel/framework": "^10.46.0",
|
||||
"laravel/tinker": "^2.9.0",
|
||||
"livewire/livewire": "^2.12.6",
|
||||
"livewire/livewire": "^v3.4.4",
|
||||
"marcreichel/igdb-laravel": "^3.8.1",
|
||||
"paragonie/constant_time_encoding": "^2.6.3",
|
||||
"spatie/laravel-backup": "^8.5.0",
|
||||
"spatie/laravel-backup": "^8.6.0",
|
||||
"spatie/laravel-cookie-consent": "^3.2.4",
|
||||
"spatie/laravel-image-optimizer": "^1.7.1",
|
||||
"spatie/ssl-certificate": "^2.6.2",
|
||||
"symfony/dom-crawler": "^6.4.0",
|
||||
"spatie/laravel-image-optimizer": "^1.8.0",
|
||||
"spatie/ssl-certificate": "^2.6.4",
|
||||
"symfony/dom-crawler": "^6.4.4",
|
||||
"theodorejb/polycast": "dev-master",
|
||||
"voku/anti-xss": "^4.1.42",
|
||||
"vstelmakh/url-highlight": "^3.0.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"brianium/paratest": "7.2.2",
|
||||
"diverently/phpstan-livewire": "^1.0.2",
|
||||
"brianium/paratest": "v7.4.0",
|
||||
"calebdw/larastan-livewire": "^1.0",
|
||||
"fakerphp/faker": "^1.23.1",
|
||||
"jasonmccreary/laravel-test-assertions": "^2.3",
|
||||
"larastan/larastan": "^2.8.1",
|
||||
"laravel/pint": "^1.13.9",
|
||||
"laravel/sail": "^1.27.1",
|
||||
"jasonmccreary/laravel-test-assertions": "^2.4",
|
||||
"larastan/larastan": "^2.9.2",
|
||||
"laravel/pint": "^1.14.0",
|
||||
"laravel/sail": "^1.28.1",
|
||||
"mockery/mockery": "^1.6.7",
|
||||
"nunomaduro/collision": "7.7.0",
|
||||
"pestphp/pest": "^2.9.0",
|
||||
"pestphp/pest-plugin-drift": "^2.0",
|
||||
"pestphp/pest-plugin-laravel": "^2.1",
|
||||
"pestphp/pest-plugin-livewire": "^2.0",
|
||||
"phpunit/phpunit": "10.2.3",
|
||||
"spatie/laravel-ignition": "^2.4.1"
|
||||
"nunomaduro/collision": "v7.10.0",
|
||||
"pestphp/pest": "^v2.33.4",
|
||||
"pestphp/pest-plugin-drift": "^2.5",
|
||||
"pestphp/pest-plugin-laravel": "^v2.2.0",
|
||||
"pestphp/pest-plugin-livewire": "^2.1",
|
||||
"phpunit/phpunit": "10.5.9",
|
||||
"spatie/laravel-ignition": "^2.4.2"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
|
||||
1132
composer.lock
generated
1132
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -2,155 +2,144 @@
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
| Class Namespace
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the root namespace for Livewire component classes in
|
||||
| your application. This value affects component auto-discovery and
|
||||
| any Livewire file helper commands, like `artisan make:livewire`.
|
||||
|
|
||||
| After changing this item, run: `php artisan livewire:discover`.
|
||||
| This value sets the root class namespace for Livewire component classes in
|
||||
| your application. This value will change where component auto-discovery
|
||||
| finds components. It's also referenced by the file creation commands.
|
||||
|
|
||||
*/
|
||||
|
||||
'class_namespace' => 'App\\Http\\Livewire',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
| View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the path for Livewire component views. This affects
|
||||
| file manipulation helper commands like `artisan make:livewire`.
|
||||
| This value is used to specify where Livewire component Blade templates are
|
||||
| stored when running file creation commands like `artisan make:livewire`.
|
||||
| It is also used if you choose to omit a component's render() method.
|
||||
|
|
||||
*/
|
||||
|
||||
'view_path' => resource_path('views/livewire'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
| Layout
|
||||
|--------------------------------------------------------------------------
|
||||
| The default layout view that will be used when rendering a component via
|
||||
| Route::get('/some-endpoint', SomeComponent::class);. In this case the
|
||||
| the view returned by SomeComponent will be wrapped in "layouts.app"
|
||||
|---------------------------------------------------------------------------
|
||||
| The view that will be used as the layout when rendering a single component
|
||||
| as an entire page via `Route::get('/post/create', CreatePost::class);`.
|
||||
| In this case, the view returned by CreatePost will render into $slot.
|
||||
|
|
||||
*/
|
||||
|
||||
'layout' => 'layout.default',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire Assets URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the path to Livewire JavaScript assets, for cases where
|
||||
| your app's domain root is not the correct path. By default, Livewire
|
||||
| will load its JavaScript assets from the app's "relative root".
|
||||
|
|
||||
| Examples: "/assets", "myurl.com/app".
|
||||
|---------------------------------------------------------------------------
|
||||
| Lazy Loading Placeholder
|
||||
|---------------------------------------------------------------------------
|
||||
| Livewire allows you to lazy load components that would otherwise slow down
|
||||
| the initial page load. Every component can have a custom placeholder or
|
||||
| you can define the default placeholder view for all components below.
|
||||
|
|
||||
*/
|
||||
|
||||
'asset_url' => null,
|
||||
'lazy_placeholder' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire App URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value should be used if livewire assets are served from CDN.
|
||||
| Livewire will communicate with an app through this url.
|
||||
|
|
||||
| Examples: "https://my-app.com", "myurl.com/app".
|
||||
|
|
||||
*/
|
||||
|
||||
'app_url' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire Endpoint Middleware Group
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the middleware group that will be applied to the main
|
||||
| Livewire "message" endpoint (the endpoint that gets hit everytime
|
||||
| a Livewire component updates). It is set to "web" by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware_group' => 'web',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Livewire Temporary File Uploads Endpoint Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
| Temporary File Uploads
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| Livewire handles file uploads by storing uploads in a temporary directory
|
||||
| before the file is validated and stored permanently. All file uploads
|
||||
| are directed to a global endpoint for temporary storage. The config
|
||||
| items below are used for customizing the way the endpoint works.
|
||||
| before the file is stored permanently. All file uploads are directed to
|
||||
| a global endpoint for temporary storage. You may configure this below:
|
||||
|
|
||||
*/
|
||||
|
||||
'temporary_file_upload' => [
|
||||
'disk' => null, // Example: 'local', 's3' Default: 'default'
|
||||
'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB)
|
||||
'directory' => null, // Example: 'tmp' Default 'livewire-tmp'
|
||||
'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1'
|
||||
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs.
|
||||
'disk' => null, // Example: 'local', 's3' | Default: 'default'
|
||||
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
|
||||
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
|
||||
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
|
||||
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
|
||||
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
|
||||
'mov', 'avi', 'wmv', 'mp3', 'm4a',
|
||||
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
|
||||
],
|
||||
'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated.
|
||||
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Manifest File Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value sets the path to the Livewire manifest file.
|
||||
| The default should work for most cases (which is
|
||||
| "<app_root>/bootstrap/cache/livewire-components.php"), but for specific
|
||||
| cases like when hosting on Laravel Vapor, it could be set to a different value.
|
||||
|
|
||||
| Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php".
|
||||
|
|
||||
*/
|
||||
|
||||
'manifest_path' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Back Button Cache
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines whether the back button cache will be used on pages
|
||||
| that contain Livewire. By disabling back button cache, it ensures that
|
||||
| the back button shows the correct state of components, instead of
|
||||
| potentially stale, cached data.
|
||||
|
|
||||
| Setting it to "false" (default) will disable back button cache.
|
||||
|
|
||||
*/
|
||||
|
||||
'back_button_cache' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
| Render On Redirect
|
||||
|--------------------------------------------------------------------------
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines whether Livewire will render before it's redirected
|
||||
| or not. Setting it to "false" (default) will mean the render method is
|
||||
| skipped when redirecting. And "true" will mean the render method is
|
||||
| run before redirecting. Browsers bfcache can store a potentially
|
||||
| stale view if render is skipped on redirect.
|
||||
| This value determines if Livewire will run a component's `render()` method
|
||||
| after a redirect has been triggered using something like `redirect(...)`
|
||||
| Setting this to true will render the view once more before redirecting
|
||||
|
|
||||
*/
|
||||
|
||||
'render_on_redirect' => false,
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| Eloquent Model Binding
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| Previous versions of Livewire supported binding directly to eloquent model
|
||||
| properties using wire:model by default. However, this behavior has been
|
||||
| deemed too "magical" and has therefore been put under a feature flag.
|
||||
|
|
||||
*/
|
||||
|
||||
'legacy_model_binding' => true,
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| Auto-inject Frontend Assets
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| By default, Livewire automatically injects its JavaScript and CSS into the
|
||||
| <head> and <body> of pages containing Livewire components. By disabling
|
||||
| this behavior, you need to use @livewireStyles and @livewireScripts.
|
||||
|
|
||||
*/
|
||||
|
||||
'inject_assets' => false,
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| Navigate (SPA mode)
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| By adding `wire:navigate` to links in your Livewire application, Livewire
|
||||
| will prevent the default link handling and instead request those pages
|
||||
| via AJAX, creating an SPA-like effect. Configure this behavior here.
|
||||
|
|
||||
*/
|
||||
|
||||
'navigate' => [
|
||||
'show_progress_bar' => true,
|
||||
'progress_bar_color' => '#2299dd',
|
||||
],
|
||||
|
||||
/*
|
||||
|---------------------------------------------------------------------------
|
||||
| HTML Morph Markers
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| Livewire intelligently "morphs" existing HTML into the newly rendered HTML
|
||||
| after each update. To make this process more reliable, Livewire injects
|
||||
| "markers" into the rendered Blade surrounding @if, @class & @foreach.
|
||||
|
|
||||
*/
|
||||
|
||||
'inject_morph_markers' => true,
|
||||
];
|
||||
|
||||
@@ -195,6 +195,11 @@ parameters:
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(string\\)\\: bool\\)\\|null, 'strlen' given\\.$#"
|
||||
count: 2
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Property Illuminate\\\\Console\\\\Command\\:\\:\\$output \\(Illuminate\\\\Console\\\\OutputStyle\\) does not accept Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput\\.$#"
|
||||
count: 1
|
||||
@@ -886,7 +891,7 @@ parameters:
|
||||
path: app/Http/Livewire/BackupPanel.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BackupPanel\\:\\:getBackupsProperty\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BackupPanel\\:\\:backups\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BackupPanel.php
|
||||
|
||||
@@ -916,7 +921,7 @@ parameters:
|
||||
path: app/Http/Livewire/BbcodeInput.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BlockIpAddress\\:\\:getIpAddressesProperty\\(\\) return type with generic interface Illuminate\\\\Contracts\\\\Pagination\\\\LengthAwarePaginator does not specify its types\\: TItem$#"
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BlockIpAddress\\:\\:ipAddresses\\(\\) return type with generic interface Illuminate\\\\Contracts\\\\Pagination\\\\LengthAwarePaginator does not specify its types\\: TItem$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BlockIpAddress.php
|
||||
|
||||
@@ -926,9 +931,9 @@ parameters:
|
||||
path: app/Http/Livewire/BlockIpAddress.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Http\\\\Livewire\\\\BlockIpAddress\\:\\:\\$rules has no type specified\\.$#"
|
||||
message: "#^Call to an undefined method App\\\\Http\\\\Livewire\\\\Comment\\:\\:emitUp\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BlockIpAddress.php
|
||||
path: app/Http/Livewire/Comment.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method App\\\\Models\\\\User\\|Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Models\\\\User\\>\\:\\:notify\\(\\)\\.$#"
|
||||
@@ -1025,18 +1030,23 @@ parameters:
|
||||
count: 1
|
||||
path: app/Http/Livewire/InviteLogSearch.php
|
||||
|
||||
-
|
||||
message: "#^Access to an undefined property App\\\\Http\\\\Livewire\\\\LaravelLogViewer\\:\\:\\$page\\.$#"
|
||||
count: 3
|
||||
path: app/Http/Livewire/LaravelLogViewer.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 0 on array\\<int, string\\>\\|false\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/LaravelLogViewer.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\LaravelLogViewer\\:\\:getEntriesProperty\\(\\) return type with generic interface Illuminate\\\\Contracts\\\\Pagination\\\\LengthAwarePaginator does not specify its types\\: TItem$#"
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\LaravelLogViewer\\:\\:entries\\(\\) return type with generic interface Illuminate\\\\Contracts\\\\Pagination\\\\LengthAwarePaginator does not specify its types\\: TItem$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/LaravelLogViewer.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\LaravelLogViewer\\:\\:getLogFilesProperty\\(\\) has no return type specified\\.$#"
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\LaravelLogViewer\\:\\:logFiles\\(\\) has no return type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/LaravelLogViewer.php
|
||||
|
||||
@@ -1155,11 +1165,6 @@ parameters:
|
||||
count: 7
|
||||
path: app/Http/Livewire/UserWarnings.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Http\\\\Livewire\\\\UserWarnings\\:\\:\\$rules has no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/UserWarnings.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\WarningLogSearch\\:\\:toggleProperties\\(\\) has parameter \\$property with no type specified\\.$#"
|
||||
count: 1
|
||||
@@ -1250,6 +1255,21 @@ parameters:
|
||||
count: 1
|
||||
path: app/Http/Resources/UserResource.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\Application\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/Application.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\ApplicationImageProof\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/ApplicationImageProof.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\ApplicationUrlProof\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/ApplicationUrlProof.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function htmlspecialchars expects string, array\\<string\\>\\|string given\\.$#"
|
||||
count: 1
|
||||
@@ -1260,6 +1280,36 @@ parameters:
|
||||
count: 1
|
||||
path: app/Models/Article.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\Audit\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/Audit.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\Chatroom\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/Chatroom.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\FailedLoginAttempt\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/FailedLoginAttempt.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\Keyword\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/Keyword.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\Message\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/Message.php
|
||||
|
||||
-
|
||||
message: "#^PHPDoc type array\\<string\\> of property App\\\\Models\\\\Option\\:\\:\\$fillable is not covariant with PHPDoc type array\\<int, string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||
count: 1
|
||||
path: app/Models/Option.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function htmlspecialchars expects string, array\\<string\\>\\|string given\\.$#"
|
||||
count: 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
includes:
|
||||
- ./vendor/larastan/larastan/extension.neon
|
||||
- ./vendor/diverently/phpstan-livewire/extension.neon
|
||||
- ./vendor/calebdw/larastan-livewire/extension.neon
|
||||
- ./phpstan-baseline.neon
|
||||
parameters:
|
||||
paths:
|
||||
|
||||
@@ -28,14 +28,129 @@ if (token) {
|
||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||
}
|
||||
|
||||
/*
|
||||
* NPM Packages
|
||||
*/
|
||||
// Sweet Alert
|
||||
import Swal from 'sweetalert2';
|
||||
window.Swal = Swal;
|
||||
|
||||
// Vite
|
||||
import.meta.glob([
|
||||
'/public/img/pipes/**',
|
||||
'/resources/sass/vendor/webfonts/font-awesome/**',
|
||||
]);
|
||||
|
||||
// Livewire + AlpineJS
|
||||
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm.js';
|
||||
|
||||
Alpine.data('dialog', () => ({
|
||||
showDialog: {
|
||||
['x-on:click.stop']() {
|
||||
this.$refs.dialog.showModal();
|
||||
}
|
||||
},
|
||||
dialogElement: {
|
||||
['x-ref']: 'dialog',
|
||||
},
|
||||
dialogForm: {
|
||||
['x-on:click.outside']() {
|
||||
let closest = this.$event.target.closest('dialog');
|
||||
|
||||
if (closest === null || closest === this.$event.target) {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Alpine.data('dialogLivewire', () => ({
|
||||
showDialog: {
|
||||
['x-on:click.stop']() {
|
||||
this.$refs.dialog.showModal();
|
||||
}
|
||||
},
|
||||
dialogElement: {
|
||||
['x-ref']: 'dialog',
|
||||
},
|
||||
dialogForm: {
|
||||
['x-on:click.outside']() {
|
||||
let closest = this.$event.target.closest('dialog');
|
||||
|
||||
if (closest === null || closest === this.$event.target) {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
},
|
||||
['x-on:submit.prevent']() {
|
||||
let closest = this.$event.target.closest('dialog');
|
||||
|
||||
if (closest === null || closest === this.$event.target) {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
}
|
||||
},
|
||||
submitDialogForm: {
|
||||
['x-on:click']() {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Alpine.data('toggle', () => ({
|
||||
toggleState: false,
|
||||
isToggledOn() {
|
||||
return this.toggleState === true;
|
||||
},
|
||||
isToggledOff() {
|
||||
return this.toggleState === false;
|
||||
},
|
||||
toggle() {
|
||||
this.toggleState = !this.toggleState
|
||||
},
|
||||
toggleOn() {
|
||||
this.toggleState = true;
|
||||
},
|
||||
toggleOff() {
|
||||
this.toggleState = false;
|
||||
}
|
||||
}))
|
||||
|
||||
Alpine.data('checkboxGrid', () => ({
|
||||
columnHeader: {
|
||||
['x-on:click']() {
|
||||
let cellIndex = this.$el.cellIndex + 1;
|
||||
let cells = this.$root.querySelectorAll(
|
||||
`tbody tr td:nth-child(${cellIndex}) > input[type="checkbox"]`,
|
||||
);
|
||||
|
||||
if (Array.from(cells).some((el) => el.checked)) {
|
||||
cells.forEach((el) => (el.checked = false));
|
||||
} else {
|
||||
cells.forEach((el) => (el.checked = true));
|
||||
}
|
||||
},
|
||||
['x-bind:style']() {
|
||||
return {
|
||||
cursor: 'pointer',
|
||||
};
|
||||
},
|
||||
},
|
||||
rowHeader: {
|
||||
['x-on:click']() {
|
||||
let rowIndex = this.$el.parentElement.sectionRowIndex + 1;
|
||||
let cells = this.$root.querySelectorAll(
|
||||
`tbody tr:nth-child(${rowIndex}) td > input[type="checkbox"]`,
|
||||
);
|
||||
|
||||
if (Array.from(cells).some((el) => el.checked)) {
|
||||
cells.forEach((el) => (el.checked = false));
|
||||
} else {
|
||||
cells.forEach((el) => (el.checked = true));
|
||||
}
|
||||
},
|
||||
['x-bind:style']() {
|
||||
return {
|
||||
cursor: 'pointer',
|
||||
};
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
Livewire.start();
|
||||
116
resources/js/vendor/alpine.js
vendored
116
resources/js/vendor/alpine.js
vendored
@@ -1,116 +0,0 @@
|
||||
import Alpine from 'alpinejs';
|
||||
window.Alpine = Alpine;
|
||||
|
||||
Alpine.data('dialog', () => ({
|
||||
showDialog: {
|
||||
['x-on:click.stop']() {
|
||||
this.$refs.dialog.showModal();
|
||||
}
|
||||
},
|
||||
dialogElement: {
|
||||
['x-ref']: 'dialog',
|
||||
},
|
||||
dialogForm: {
|
||||
['x-on:click.outside']() {
|
||||
let closest = this.$event.target.closest('dialog');
|
||||
|
||||
if (closest === null || closest === this.$event.target) {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Alpine.data('dialogLivewire', () => ({
|
||||
showDialog: {
|
||||
['x-on:click.stop']() {
|
||||
this.$refs.dialog.showModal();
|
||||
}
|
||||
},
|
||||
dialogElement: {
|
||||
['x-ref']: 'dialog',
|
||||
},
|
||||
dialogForm: {
|
||||
['x-on:click.outside']() {
|
||||
let closest = this.$event.target.closest('dialog');
|
||||
|
||||
if (closest === null || closest === this.$event.target) {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
},
|
||||
['x-on:submit.prevent']() {
|
||||
let closest = this.$event.target.closest('dialog');
|
||||
|
||||
if (closest === null || closest === this.$event.target) {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
}
|
||||
},
|
||||
submitDialogForm: {
|
||||
['x-on:click']() {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Alpine.data('toggle', () => ({
|
||||
toggleState: false,
|
||||
isToggledOn() {
|
||||
return this.toggleState === true;
|
||||
},
|
||||
isToggledOff() {
|
||||
return this.toggleState === false;
|
||||
},
|
||||
toggle() {
|
||||
this.toggleState = !this.toggleState
|
||||
},
|
||||
toggleOn() {
|
||||
this.toggleState = true;
|
||||
},
|
||||
toggleOff() {
|
||||
this.toggleState = false;
|
||||
}
|
||||
}))
|
||||
|
||||
Alpine.data('checkboxGrid', () => ({
|
||||
columnHeader: {
|
||||
['x-on:click']() {
|
||||
let cellIndex = this.$el.cellIndex + 1;
|
||||
let cells = this.$root.querySelectorAll(
|
||||
`tbody tr td:nth-child(${cellIndex}) > input[type="checkbox"]`,
|
||||
);
|
||||
|
||||
if (Array.from(cells).some((el) => el.checked)) {
|
||||
cells.forEach((el) => (el.checked = false));
|
||||
} else {
|
||||
cells.forEach((el) => (el.checked = true));
|
||||
}
|
||||
},
|
||||
['x-bind:style']() {
|
||||
return {
|
||||
cursor: 'pointer',
|
||||
};
|
||||
},
|
||||
},
|
||||
rowHeader: {
|
||||
['x-on:click']() {
|
||||
let rowIndex = this.$el.parentElement.sectionRowIndex + 1;
|
||||
let cells = this.$root.querySelectorAll(
|
||||
`tbody tr:nth-child(${rowIndex}) td > input[type="checkbox"]`,
|
||||
);
|
||||
|
||||
if (Array.from(cells).some((el) => el.checked)) {
|
||||
cells.forEach((el) => (el.checked = false));
|
||||
} else {
|
||||
cells.forEach((el) => (el.checked = true));
|
||||
}
|
||||
},
|
||||
['x-bind:style']() {
|
||||
return {
|
||||
cursor: 'pointer',
|
||||
};
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
Alpine.start();
|
||||
@@ -169,7 +169,6 @@
|
||||
</section>
|
||||
</main>
|
||||
@vite('resources/js/app.js')
|
||||
@vite('resources/js/vendor/alpine.js')
|
||||
@livewireScripts(['nonce' => HDVinnie\SecureHeaders\SecureHeaders::nonce()])
|
||||
@livewireScriptConfig(['nonce' => HDVinnie\SecureHeaders\SecureHeaders::nonce()])
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -115,6 +115,6 @@
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
@vite('resources/js/vendor/alpine.js')
|
||||
@vite('resources/js/app.js')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
@include('partials.footer')
|
||||
|
||||
@vite('resources/js/app.js')
|
||||
@vite('resources/js/vendor/alpine.js')
|
||||
|
||||
@if (config('other.freeleech') == true || config('other.invite-only') == false || config('other.doubleup') == true)
|
||||
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
|
||||
@@ -211,16 +210,6 @@
|
||||
|
||||
@yield('javascripts')
|
||||
@yield('scripts')
|
||||
@livewireScripts(['nonce' => HDVinnie\SecureHeaders\SecureHeaders::nonce()])
|
||||
|
||||
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
|
||||
Livewire.on('paginationChanged', () => {
|
||||
window.scrollTo({
|
||||
top: 15,
|
||||
left: 15,
|
||||
behavior: 'smooth',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@livewireScriptConfig(['nonce' => HDVinnie\SecureHeaders\SecureHeaders::nonce()])
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="form__group">
|
||||
<input
|
||||
id="torrent"
|
||||
wire:model="torrentId"
|
||||
wire:model.live="torrentId"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
@@ -18,13 +18,23 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<input id="user" wire:model="userId" class="form__text" placeholder=" " />
|
||||
<input
|
||||
id="user"
|
||||
wire:model.live="userId"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="user">User ID</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select
|
||||
id="quantity"
|
||||
class="form__select"
|
||||
wire:model.live="perPage"
|
||||
required
|
||||
>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
id="apikey"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="apikey"
|
||||
wire:model.live="apikey"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="apikey">
|
||||
@@ -22,7 +22,7 @@
|
||||
id="username"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="username"
|
||||
wire:model.live="username"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="username">
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
id="attachment"
|
||||
class="form__file"
|
||||
type="file"
|
||||
wire:model="attachment"
|
||||
wire:model.live="attachment"
|
||||
wire:change="upload"
|
||||
style="display: none"
|
||||
/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
id="username"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="username"
|
||||
wire:model.live="username"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="username">Username</label>
|
||||
@@ -22,7 +22,7 @@
|
||||
x-model="selected"
|
||||
x-bind:class="selected === '' ? 'form__select--default' : ''"
|
||||
class="form__select"
|
||||
wire:model="modelName"
|
||||
wire:model.live="modelName"
|
||||
required
|
||||
>
|
||||
<option selected value="">All</option>
|
||||
@@ -39,7 +39,7 @@
|
||||
id="modelId"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="modelId"
|
||||
wire:model.live="modelId"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="modelId">Model Id</label>
|
||||
@@ -50,7 +50,7 @@
|
||||
<select
|
||||
id="action"
|
||||
class="form__select"
|
||||
wire:model="action"
|
||||
wire:model.live="action"
|
||||
required
|
||||
x-data="{ selected: '' }"
|
||||
x-model="selected"
|
||||
@@ -70,7 +70,7 @@
|
||||
id="record"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="record"
|
||||
wire:model.live="record"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="record">Record</label>
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
</div>
|
||||
</section>
|
||||
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
|
||||
document.addEventListener('livewire:load', function () {
|
||||
document.addEventListener('livewire:init', function () {
|
||||
const Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
type="radio"
|
||||
id="{{ $name }}-bbcode-preview-disabled"
|
||||
value="0"
|
||||
wire:model="isPreviewEnabled"
|
||||
wire:model.live="isPreviewEnabled"
|
||||
/>
|
||||
<label class="bbcode-input__tab-label" for="{{ $name }}-bbcode-preview-disabled">
|
||||
Write
|
||||
@@ -15,7 +15,7 @@
|
||||
type="radio"
|
||||
id="{{ $name }}-bbcode-preview-enabled"
|
||||
value="1"
|
||||
wire:model="isPreviewEnabled"
|
||||
wire:model.live="isPreviewEnabled"
|
||||
/>
|
||||
<label class="bbcode-input__tab-label" for="{{ $name }}-bbcode-preview-enabled">
|
||||
{{ __('common.preview') }}
|
||||
@@ -222,7 +222,7 @@
|
||||
class="form__textarea bbcode-input__input"
|
||||
placeholder=" "
|
||||
x-bind="textarea"
|
||||
wire:model.defer="contentBbcode"
|
||||
wire:model="contentBbcode"
|
||||
@required($isRequired)
|
||||
></textarea>
|
||||
<label class="form__label form__label--floating" for="bbcode-{{ $name }}">
|
||||
@@ -235,7 +235,7 @@
|
||||
Alpine.data('{{ $name }}BbcodeInput', () => ({
|
||||
showButtons: false,
|
||||
bbcodePreviewHeight: null,
|
||||
isPreviewEnabled: @entangle('isPreviewEnabled'),
|
||||
isPreviewEnabled: @entangle('isPreviewEnabled').live,
|
||||
isOverInput: false,
|
||||
previousActiveElement: document.activeElement,
|
||||
toggleButtonVisibility() {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class="form__text"
|
||||
name="ipAddress"
|
||||
placeholder=" "
|
||||
wire:model.defer="ipAddress"
|
||||
wire:model="ipAddress"
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="ipAddress">
|
||||
Ip Address
|
||||
@@ -27,7 +27,7 @@
|
||||
class="form__textarea"
|
||||
name="reason"
|
||||
placeholder=" "
|
||||
wire:model.defer="reason"
|
||||
wire:model="reason"
|
||||
></textarea>
|
||||
<label class="form__label form__label--floating" for="reason">
|
||||
Reason
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
wire:model.live.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
|
||||
@@ -77,14 +77,14 @@
|
||||
@endif
|
||||
</aside>
|
||||
@if ($isEditing)
|
||||
<form wire:submit.prevent="editComment" class="form edit-comment">
|
||||
<form wire:submit="editComment" class="form edit-comment">
|
||||
<p class="form__group">
|
||||
<textarea
|
||||
name="comment"
|
||||
id="edit-comment"
|
||||
class="form__textarea"
|
||||
aria-describedby="edit-comment__textarea-hint"
|
||||
wire:model.defer="editState.content"
|
||||
wire:model="editState.content"
|
||||
required
|
||||
></textarea>
|
||||
<label for="edit-comment" class="form__label form__label--floating">
|
||||
@@ -132,14 +132,14 @@
|
||||
@endif
|
||||
|
||||
@if ($isReplying || $comment->children()->exists())
|
||||
<form wire:submit.prevent="postReply" class="form reply-comment" x-data="toggle">
|
||||
<form wire:submit="postReply" class="form reply-comment" x-data="toggle">
|
||||
<p class="form__group">
|
||||
<textarea
|
||||
name="comment"
|
||||
id="reply-comment"
|
||||
class="form__textarea"
|
||||
aria-describedby="reply-comment__textarea-hint"
|
||||
wire:model.defer="replyState.content"
|
||||
wire:model="replyState.content"
|
||||
required
|
||||
x-on:focus="toggleOn"
|
||||
></textarea>
|
||||
@@ -161,7 +161,7 @@
|
||||
type="checkbox"
|
||||
id="reply-anon"
|
||||
class="form__checkbox"
|
||||
wire:model="anon"
|
||||
wire:model.live="anon"
|
||||
/>
|
||||
<label for="reply-anon" class="form__label">
|
||||
{{ __('common.anonymous') }}?
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
{{ __('common.comments') }}
|
||||
</h4>
|
||||
<div class="panel__body">
|
||||
<form wire:submit.prevent="postComment" class="form new-comment" x-data="toggle">
|
||||
<form wire:submit="postComment" class="form new-comment" x-data="toggle">
|
||||
<p class="form__group">
|
||||
<textarea
|
||||
name="comment"
|
||||
id="new-comment__textarea"
|
||||
class="form__textarea"
|
||||
aria-describedby="new-comment__textarea-hint"
|
||||
wire:model.defer="newCommentState.content"
|
||||
wire:model="newCommentState.content"
|
||||
required
|
||||
x-on:focus="toggleOn"
|
||||
></textarea>
|
||||
@@ -27,7 +27,7 @@
|
||||
@enderror
|
||||
</p>
|
||||
<p class="form__group" x-show="isToggledOn" x-cloak>
|
||||
<input type="checkbox" id="anon" class="form__checkbox" wire:model="anon" />
|
||||
<input type="checkbox" id="anon" class="form__checkbox" wire:model.live="anon" />
|
||||
<label for="anon" class="form__label">{{ __('common.anonymous') }}?</label>
|
||||
</p>
|
||||
<p class="form__group" x-show="isToggledOn" x-cloak>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
wire:model.live.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
id="username"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="username"
|
||||
wire:model.live="username"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="username">
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
id="username"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="username"
|
||||
wire:model.live="username"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="username">
|
||||
@@ -24,7 +24,7 @@
|
||||
type="text"
|
||||
inputmode="numeric"
|
||||
pattern="[0-9]*"
|
||||
wire:model="userId"
|
||||
wire:model.live="userId"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="userId">
|
||||
@@ -38,7 +38,7 @@
|
||||
id="ipAddress"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="ipAddress"
|
||||
wire:model.live="ipAddress"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="ipAddress">
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
wire:model.live="search"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
@@ -55,7 +55,7 @@
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select id="read" class="form__select" name="read" wire:model="read">
|
||||
<select id="read" class="form__select" name="read" wire:model.live="read">
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="some">With unread posts</option>
|
||||
<option value="none">Newly added</option>
|
||||
@@ -64,7 +64,12 @@
|
||||
<label class="form__label form__label--floating" for="read">Activity</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select id="sorting" class="form__select" name="sorting" wire:model="label">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
wire:mode.livel="label"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="approved">
|
||||
{{ __('forum.approved') }}
|
||||
@@ -98,7 +103,7 @@
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
required
|
||||
wire:model="sortField"
|
||||
wire:model.live="sortField"
|
||||
>
|
||||
<option value="last_post_created_at">
|
||||
{{ __('forum.updated-at') }}
|
||||
@@ -117,7 +122,7 @@
|
||||
class="form__select"
|
||||
name="direction"
|
||||
required
|
||||
wire:model="sortDirection"
|
||||
wire:model.live="sortDirection"
|
||||
>
|
||||
<option value="desc">
|
||||
{{ __('common.descending') }}
|
||||
@@ -135,7 +140,7 @@
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="state"
|
||||
wire:model.live="state"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="open">
|
||||
@@ -154,7 +159,7 @@
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="subscribed"
|
||||
wire:model.live="subscribed"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="include">
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
wire:model.live="search"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label for="search" class="form__label form__label--floating">
|
||||
@@ -97,7 +97,7 @@
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select id="read" class="form__select" name="read" wire:model="read">
|
||||
<select id="read" class="form__select" name="read" wire:model.live="read">
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="some">With unread posts</option>
|
||||
<option value="none">Newly added</option>
|
||||
@@ -106,7 +106,12 @@
|
||||
<label class="form__label form__label--floating" for="read">Activity</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select id="sorting" class="form__select" name="sorting" wire:model="label">
|
||||
<select
|
||||
id="sorting"
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
wire:model.live="label"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="approved">
|
||||
{{ __('forum.approved') }}
|
||||
@@ -140,7 +145,7 @@
|
||||
class="form__select"
|
||||
name="sorting"
|
||||
required
|
||||
wire:model="sortField"
|
||||
wire:model.live="sortField"
|
||||
>
|
||||
<option value="last_post_created_at">
|
||||
{{ __('forum.updated-at') }}
|
||||
@@ -159,7 +164,7 @@
|
||||
class="form__select"
|
||||
name="direction"
|
||||
required
|
||||
wire:model="sortDirection"
|
||||
wire:model.live="sortDirection"
|
||||
>
|
||||
<option value="desc">
|
||||
{{ __('common.descending') }}
|
||||
@@ -177,7 +182,7 @@
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="state"
|
||||
wire:model.live="state"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="open">
|
||||
@@ -196,7 +201,7 @@
|
||||
id="direction"
|
||||
class="form__select"
|
||||
name="direction"
|
||||
wire:model="subscribed"
|
||||
wire:model.live="subscribed"
|
||||
>
|
||||
<option value="" selected default>Any</option>
|
||||
<option value="include">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
id="sender"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="sender"
|
||||
wire:model.live="sender"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="sender">
|
||||
@@ -22,7 +22,7 @@
|
||||
id="receiver"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="receiver"
|
||||
wire:model.live="receiver"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="receiver">
|
||||
@@ -36,7 +36,7 @@
|
||||
id="comment"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="comment"
|
||||
wire:model.live="comment"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="comment">
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="torrent"
|
||||
wire:model="torrent"
|
||||
wire:model.live="torrent"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
@@ -18,17 +18,27 @@
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input id="user" wire:model="user" class="form__text" placeholder=" " />
|
||||
<input
|
||||
id="user"
|
||||
wire:model.live="user"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="user">Username</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input id="agent" wire:model="agent" class="form__text" placeholder=" " />
|
||||
<input
|
||||
id="agent"
|
||||
wire:model.live="agent"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="agent">Agent</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="seeder"
|
||||
wire:model="seeder"
|
||||
wire:model.live="seeder"
|
||||
class="form__select"
|
||||
placeholder=" "
|
||||
>
|
||||
@@ -43,7 +53,7 @@
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="active"
|
||||
wire:model="active"
|
||||
wire:model.live="active"
|
||||
class="form__select"
|
||||
placeholder=" "
|
||||
>
|
||||
@@ -56,7 +66,7 @@
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="groupBy"
|
||||
wire:model="groupBy"
|
||||
wire:model.live="groupBy"
|
||||
class="form__select"
|
||||
placeholder=" "
|
||||
>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
id="sender"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="sender"
|
||||
wire:model.live="sender"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="sender">
|
||||
@@ -23,7 +23,7 @@
|
||||
id="receiver"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="receiver"
|
||||
wire:model.live="receiver"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="receiver">
|
||||
@@ -35,7 +35,7 @@
|
||||
id="email"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="email"
|
||||
wire:model.live="email"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="email">
|
||||
@@ -50,7 +50,7 @@
|
||||
inputmode="numeric"
|
||||
pattern="[0-9]*"
|
||||
max="100"
|
||||
wire:model="threshold"
|
||||
wire:model.live="threshold"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="threshold">
|
||||
@@ -60,7 +60,7 @@
|
||||
<div class="form__group">
|
||||
<select
|
||||
id="groupBy"
|
||||
wire:model="groupBy"
|
||||
wire:model.live="groupBy"
|
||||
class="form__select"
|
||||
placeholder=" "
|
||||
>
|
||||
@@ -76,7 +76,7 @@
|
||||
id="code"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="code"
|
||||
wire:model.live="code"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="code">
|
||||
@@ -88,7 +88,7 @@
|
||||
id="custom"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="custom"
|
||||
wire:model.live="custom"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="custom">
|
||||
@@ -96,7 +96,12 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select
|
||||
id="quantity"
|
||||
class="form__select"
|
||||
wire:model.live="perPage"
|
||||
required
|
||||
>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
<h2 class="panel__heading">Entries</h2>
|
||||
<select
|
||||
multiple
|
||||
wire:model="logs"
|
||||
wire:model.live="logs"
|
||||
style="height: 320px; padding: 8px; border-radius: 4px; width: 100%"
|
||||
>
|
||||
@foreach ($files as $file)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="form__group">
|
||||
<input
|
||||
id="torrent"
|
||||
wire:model.debounce.1500ms="torrentIds"
|
||||
wire:model.live.debounce.1500ms="torrentIds"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="form__group">
|
||||
<input
|
||||
id="torrent"
|
||||
wire:model.debounce.500ms="minutesLeakedWithin"
|
||||
wire:model.live.debounce.500ms="minutesLeakedWithin"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
@@ -31,7 +31,12 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select
|
||||
id="quantity"
|
||||
class="form__select"
|
||||
wire:model.live="perPage"
|
||||
required
|
||||
>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
wire:model.live.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="panel__actions">
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
@@ -20,7 +20,7 @@
|
||||
id="search"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="search"
|
||||
wire:model.live="search"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="search">Message</label>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="bon_gifts"
|
||||
wire:model.live.prefetch="bon_gifts"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -109,7 +109,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="comment"
|
||||
wire:model.live.prefetch="comment"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -123,7 +123,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="comment_tags"
|
||||
wire:model.live.prefetch="comment_tags"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -137,7 +137,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="followers"
|
||||
wire:model.live.prefetch="followers"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -151,7 +151,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="posts"
|
||||
wire:model.live.prefetch="posts"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -165,7 +165,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="post_tags"
|
||||
wire:model.live.prefetch="post_tags"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -179,7 +179,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="post_tips"
|
||||
wire:model.live.prefetch="post_tips"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -193,7 +193,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="request_bounties"
|
||||
wire:model.live.prefetch="request_bounties"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -207,7 +207,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="request_claims"
|
||||
wire:model.live.prefetch="request_claims"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -221,7 +221,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="request_fills"
|
||||
wire:model.live.prefetch="request_fills"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -235,7 +235,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="request_approvals"
|
||||
wire:model.live.prefetch="request_approvals"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -249,7 +249,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="request_rejections"
|
||||
wire:model.live.prefetch="request_rejections"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -263,7 +263,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="request_unclaims"
|
||||
wire:model.live.prefetch="request_unclaims"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -277,7 +277,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="reseed_requests"
|
||||
wire:model.live.prefetch="reseed_requests"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -292,7 +292,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="thanks"
|
||||
wire:model.live.prefetch="thanks"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -308,7 +308,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="upload_tips"
|
||||
wire:model.live.prefetch="upload_tips"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -331,7 +331,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="unfollows"
|
||||
wire:model.live.prefetch="unfollows"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
@@ -345,7 +345,7 @@
|
||||
<input
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
wire:model.prefetch="uploads"
|
||||
wire:model.live.prefetch="uploads"
|
||||
value="1"
|
||||
/>
|
||||
<i
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
id="passkey"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="passkey"
|
||||
wire:model.live="passkey"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="passkey">
|
||||
@@ -22,7 +22,7 @@
|
||||
id="username"
|
||||
class="form__text"
|
||||
type="text"
|
||||
wire:model="username"
|
||||
wire:model.live="username"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="username">
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<div class="panel__action">
|
||||
<div class="form__group">
|
||||
<select id="quantity" class="form__select" wire:model="perPage" required>
|
||||
<select id="quantity" class="form__select" wire:model.live="perPage" required>
|
||||
<option>25</option>
|
||||
<option>50</option>
|
||||
<option>100</option>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
required
|
||||
type="password"
|
||||
value="{{ old('new_password') }}"
|
||||
wire:model="password"
|
||||
wire:model.live="password"
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="new_password">New Password</label>
|
||||
</p>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<p class="form__group">
|
||||
<input
|
||||
id="torrent"
|
||||
wire:model="torrent"
|
||||
wire:model.live="torrent"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
@@ -18,21 +18,31 @@
|
||||
</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input id="ip" wire:model="ip" class="form__text" placeholder=" " />
|
||||
<input id="ip" wire:model.live="ip" class="form__text" placeholder=" " />
|
||||
<label class="form__label form__label--floating" for="ip">IP Address</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input id="port" wire:model="port" class="form__text" placeholder=" " />
|
||||
<input
|
||||
id="port"
|
||||
wire:model.live="port"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="port">Port</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<input id="agent" wire:model="agent" class="form__text" placeholder=" " />
|
||||
<input
|
||||
id="agent"
|
||||
wire:model.live="agent"
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="agent">Agent</label>
|
||||
</p>
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="connectivity"
|
||||
wire:model="connectivity"
|
||||
wire:model.live="connectivity"
|
||||
class="form__select"
|
||||
placeholder=" "
|
||||
>
|
||||
@@ -47,7 +57,7 @@
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="active"
|
||||
wire:model="active"
|
||||
wire:model.live="active"
|
||||
class="form__select"
|
||||
placeholder=" "
|
||||
>
|
||||
@@ -60,7 +70,7 @@
|
||||
<p class="form__group">
|
||||
<select
|
||||
id="groupBy"
|
||||
wire:model="groupBy"
|
||||
wire:model.live="groupBy"
|
||||
class="form__select"
|
||||
placeholder=" "
|
||||
>
|
||||
@@ -76,7 +86,7 @@
|
||||
<p class="form__group">
|
||||
<label class="form__label">
|
||||
<input
|
||||
wire:model="duplicateIpsOnly"
|
||||
wire:model.live="duplicateIpsOnly"
|
||||
type="checkbox"
|
||||
class="form__checkbox"
|
||||
/>
|
||||
@@ -86,7 +96,7 @@
|
||||
<p class="form__group">
|
||||
<label class="form__label">
|
||||
<input
|
||||
wire:model="includeSeedsize"
|
||||
wire:model.live="includeSeedsize"
|
||||
type="checkbox"
|
||||
class="form__checkbox"
|
||||
/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<section class="panelV2" x-data="{ tab: @entangle('occupationId') }">
|
||||
<section class="panelV2" x-data="{ tab: @entangle('occupationId').live }">
|
||||
<h2 class="panel__heading">{{ __('torrent.torrents') }}</h2>
|
||||
<menu class="panel__tabs">
|
||||
<li
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
class="form__text"
|
||||
placeholder=" "
|
||||
type="text"
|
||||
wire:model.debounce.250ms="search"
|
||||
wire:model.live.debounce.250ms="search"
|
||||
/>
|
||||
<label class="form__label form__label--floating" for="name">
|
||||
{{ __('torrent.search-by-name') }}
|
||||
@@ -55,7 +55,7 @@
|
||||
<select
|
||||
id="firstCharacter"
|
||||
class="form__select"
|
||||
wire:model="firstCharacter"
|
||||
wire:model.live="firstCharacter"
|
||||
x-data="{ firstCharacter: '' }"
|
||||
x-model="firstCharacter"
|
||||
x-bind:class="firstCharacter === '' ? 'form__select--default' : ''"
|
||||
@@ -83,7 +83,7 @@
|
||||
class="form__checkbox"
|
||||
type="checkbox"
|
||||
value="{{ $occupation->id }}"
|
||||
wire:model="occupationIds"
|
||||
wire:model.live="occupationIds"
|
||||
/>
|
||||
{{ $occupation->name }}
|
||||
</label>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user