update: livewire

This commit is contained in:
HDVinnie
2024-03-03 22:41:29 -05:00
parent 8d6e3631fe
commit bde593e48b
117 changed files with 1792 additions and 1735 deletions
+11 -15
View File
@@ -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,31 +28,24 @@ 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'],
];
#[Url]
public int $perPage = 50;
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingUserId(): void
@@ -66,7 +61,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))
+10 -12
View File
@@ -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,31 @@ 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');
$this->dispatch('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'),
+1 -1
View File
@@ -55,7 +55,7 @@ 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!');
}
/**
+16 -16
View File
@@ -14,6 +14,8 @@
namespace App\Http\Livewire;
use App\Models\Audit;
use Livewire\Attributes\Computed;
use Livewire\Attributes\Url;
use Livewire\Component;
use Livewire\WithPagination;
@@ -21,44 +23,40 @@ 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');
$this->dispatch('paginationChanged');
}
/**
* @return string[]
*/
final public function getModelNamesProperty()
#[Computed]
final public function modelNames(): array
{
$modelList = [];
$path = app_path()."/Models";
@@ -78,8 +76,10 @@ class AuditLogSearch extends Component
/**
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Audit>
* @throws \JsonException
*/
final public function getAuditsProperty(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
#[Computed]
final public function audits(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
{
$audits = Audit::with('user')
->whereRelation('user', 'username', '=', $this->username)
+3 -3
View File
@@ -110,7 +110,7 @@ class BackupPanel extends Component
->first(fn (Backup $backup) => $backup->path() === $deletingFile['path'])
->delete();
$this->emit('refreshBackups');
$this->dispatch('refreshBackups');
}
/**
@@ -178,7 +178,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 +201,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;
}
+12 -14
View File
@@ -14,6 +14,8 @@
namespace App\Http\Livewire;
use App\Models\BlockedIp;
use Livewire\Attributes\Computed;
use Livewire\Attributes\Url;
use Livewire\Component;
use Livewire\WithPagination;
@@ -21,21 +23,16 @@ class BlockIpAddress extends Component
{
use WithPagination;
#[Url]
public string $ipAddress = '';
#[Url]
public string $reason = '';
#[Url]
public int $perPage = 25;
/**
* @var array<mixed>
*/
protected $queryString = [
'page' => ['except' => 1],
'perPage' => ['except' => ''],
];
protected $rules = [
protected array $rules = [
'reason' => [
'required',
'filled',
@@ -44,7 +41,7 @@ class BlockIpAddress extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function store(): void
@@ -63,7 +60,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 +68,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()
+6 -3
View File
@@ -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
+6 -2
View File
@@ -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,11 +23,12 @@ class CollectionSearch extends Component
{
use WithPagination;
#[Url]
public string $search = '';
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -36,7 +39,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')
+4 -4
View File
@@ -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
+5 -3
View File
@@ -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()
+6 -2
View File
@@ -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,11 +23,12 @@ class CompanySearch extends Component
{
use WithPagination;
#[Url]
public string $search = '';
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -36,7 +39,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.'%'))
+3 -3
View File
@@ -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
+11 -22
View File
@@ -15,39 +15,39 @@ 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 WithPagination;
use LivewireSort;
#[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');
$this->dispatch('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 +63,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;
}
}
+13 -14
View File
@@ -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,34 @@ 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');
$this->dispatch('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 +69,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')
+25 -21
View File
@@ -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,27 +25,28 @@ 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
{
@@ -52,7 +55,7 @@ class ForumCategoryTopicSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -63,7 +66,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.*')
+27 -22
View File
@@ -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
{
@@ -54,7 +58,7 @@ class ForumTopicSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -65,7 +69,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.*')
+11 -12
View File
@@ -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,34 @@ 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');
$this->dispatch('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'),
+22 -17
View File
@@ -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,35 +29,37 @@ 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');
$this->dispatch('paginationChanged');
}
final public function updatingUser(): void
@@ -91,7 +95,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')
+15 -19
View File
@@ -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) {
@@ -71,7 +66,7 @@ class InviteLogSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingGroupBy($value): void
@@ -85,7 +80,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'])
+1 -1
View File
@@ -48,7 +48,7 @@ class LaravelLogViewer extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingLogs(): void
+13 -16
View File
@@ -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,34 @@ 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');
$this->dispatch('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 +82,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))));
}
+3 -3
View File
@@ -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
+11 -14
View File
@@ -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();
}
+6 -2
View File
@@ -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,11 +23,12 @@ class NetworkSearch extends Component
{
use WithPagination;
#[Url]
public string $search = '';
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -36,7 +39,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.'%'))
+8 -12
View File
@@ -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,22 +12,15 @@ 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');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -36,7 +31,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 +55,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!');
}
}
+28 -3
View File
@@ -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,84 @@ 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');
$this->dispatch('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 {
+10 -12
View File
@@ -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,31 @@ 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');
$this->dispatch('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'),
+38 -31
View File
@@ -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,41 +26,45 @@ class PeerSearch extends Component
use LivewireSort;
use WithPagination;
#[Url]
public bool $duplicateIpsOnly = false;
public bool $includeSeedsize = false;
public int $perPage = 25;
public string $ip = '';
public string $port = '';
public string $agent = '';
public string $torrent = '';
public string $connectivity = 'any';
public string $active = 'any';
public string $groupBy = 'none';
public string $sortField = 'created_at';
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'],
];
#[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';
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingIp(): void
@@ -91,7 +97,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(
+17 -9
View File
@@ -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 personallFreeleech(): bool
{
return cache()->get('personal_freeleech:'.auth()->user()->id) ?? false;
}
@@ -63,51 +60,61 @@ class PersonCredit extends Component
$value = Occupation::from($value);
}
#[Computed]
public function getDirectedCountProperty(): int
{
return $this->person->directedMovies()->count() + $this->person->directedTv()->count();
}
#[Computed]
public function getCreatedCountProperty(): int
{
return $this->person->createdTv()->count();
}
#[Computed]
public function getWrittenCountProperty(): int
{
return $this->person->writtenMovies()->count() + $this->person->writtenTv()->count();
}
#[Computed]
public function getProducedCountProperty(): int
{
return $this->person->producedMovies()->count() + $this->person->producedTv()->count();
}
#[Computed]
public function getComposedCountProperty(): int
{
return $this->person->composedMovies()->count() + $this->person->composedTv()->count();
}
#[Computed]
public function getCinematographedCountProperty(): int
{
return $this->person->cinematographedMovies()->count() + $this->person->cinematographedTv()->count();
}
#[Computed]
public function getEditedCountProperty(): int
{
return $this->person->editedMovies()->count() + $this->person->editedTv()->count();
}
#[Computed]
public function getProductionDesignedCountProperty(): int
{
return $this->person->productionDesignedMovies()->count() + $this->person->productionDesignedTv()->count();
}
#[Computed]
public function getArtDirectedCountProperty(): int
{
return $this->person->artDirectedMovies()->count() + $this->person->artDirectedTv()->count();
}
#[Computed]
public function getActedCountProperty(): 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();
+10 -3
View File
@@ -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,18 +23,21 @@ 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');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -43,7 +48,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 +63,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.'%'))
+6 -8
View File
@@ -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,17 +23,12 @@ 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');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -42,7 +39,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')
+7 -3
View File
@@ -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';
+10 -12
View File
@@ -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,31 @@ 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');
$this->dispatch('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'),
+27 -19
View File
@@ -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;
}
+5 -3
View File
@@ -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
+4 -2
View File
@@ -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
+4 -2
View File
@@ -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
+12 -2
View File
@@ -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,26 +27,33 @@ 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');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -55,7 +64,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')
+3 -3
View File
@@ -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
+11 -10
View File
@@ -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,26 +29,24 @@ 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();
@@ -54,7 +54,7 @@ class TicketSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -70,7 +70,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'])
+9 -11
View File
@@ -17,6 +17,8 @@ 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\Component;
/**
@@ -25,22 +27,16 @@ use Livewire\Component;
*/
class Top10 extends Component
{
#[Url]
public string $metaType = 'movie_meta';
#[Url]
public string $interval = 'day';
/**
* @var array<mixed>
*/
protected $queryString = [
'metaType' => ['except' => 'movie_meta'],
'interval' => ['except' => 'day'],
];
/**
* @var array<string, string>
*/
protected $rules = [
protected array $rules = [
'metaType' => 'in:movie_meta,tv_meta',
'interval' => 'in:day,week,month,year,all',
];
@@ -48,7 +44,8 @@ class Top10 extends Component
/**
* @return \Illuminate\Database\Eloquent\Collection<int, Torrent>
*/
final public function getWorksProperty(): Collection
#[Computed]
final public function works(): Collection
{
$this->validate();
@@ -86,7 +83,8 @@ class Top10 extends Component
/**
* @return array<string, string>
*/
final public function getMetaTypesProperty(): array
#[Computed]
final public function metaTypes(): array
{
$metaTypes = [];
+6 -9
View File
@@ -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,17 +26,11 @@ 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;
@@ -42,7 +38,7 @@ class TopicPostSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -53,7 +49,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')
+28 -23
View File
@@ -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,32 +24,33 @@ class TopicSearch 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 $forumId = '';
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' => ''],
];
#[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 = '';
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -58,7 +61,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 +76,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.*')
+16 -29
View File
@@ -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;
@@ -26,44 +29,38 @@ use Livewire\WithPagination;
class TorrentDownloadSearch extends Component
{
use WithPagination;
use LivewireSort;
#[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');
$this->dispatch('paginationChanged');
}
final public function updatingGroupBy(string $value): void
@@ -97,7 +94,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 +126,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', [
+31 -31
View File
@@ -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,89 +30,84 @@ 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);
@@ -118,7 +115,7 @@ class TorrentRequestSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function toggleShowFilters(): void
@@ -126,7 +123,8 @@ class TorrentRequestSearch extends Component
$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 +133,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 +146,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;
+62 -59
View File
@@ -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,186 +33,183 @@ 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);
@@ -218,7 +217,7 @@ class TorrentSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingName(): void
@@ -231,7 +230,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 +301,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 +390,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 +639,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, [
+6 -2
View File
@@ -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,11 +23,12 @@ class TvSearch extends Component
{
use WithPagination;
#[Url]
public string $search;
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -36,7 +39,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')
+6 -3
View File
@@ -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 -19
View File
@@ -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,45 +31,39 @@ 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);
@@ -75,7 +71,7 @@ class UserActive extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -86,7 +82,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')
+13 -5
View File
@@ -15,6 +15,8 @@ namespace App\Http\Livewire;
use App\Models\Note;
use App\Models\User;
use Livewire\Attributes\Computed;
use Livewire\Attributes\Url;
use Livewire\Component;
use Livewire\WithPagination;
@@ -24,23 +26,28 @@ class UserNotes extends Component
public User $user;
#[Url]
public string $message = '';
/**
* @var array<int, string>
*/
#[Url]
public array $messages = [];
#[Url]
public int $perPage = 25;
#[Url]
public string $sortField = 'created_at';
#[Url]
public string $sortDirection = 'desc';
/**
* @var array<mixed>
*/
protected $rules = [
protected array $rules = [
'message' => [
'required',
'filled',
@@ -62,7 +69,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')
@@ -91,7 +99,7 @@ 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
@@ -106,7 +114,7 @@ class UserNotes extends Component
'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 +123,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!');
}
}
+10 -13
View File
@@ -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,27 +28,21 @@ 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);
@@ -54,7 +50,7 @@ class UserResurrections extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -65,7 +61,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 -17
View File
@@ -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,43 +28,39 @@ 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');
$this->dispatch('paginationChanged');
}
final public function updatingShow(): void
@@ -80,7 +78,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 +97,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();
}
+19 -22
View File
@@ -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,57 +28,51 @@ 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);
@@ -84,7 +80,7 @@ class UserTorrents extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -95,7 +91,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(
+12 -14
View File
@@ -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,35 +29,30 @@ 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);
@@ -63,7 +60,7 @@ class UserUploads extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -74,7 +71,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')
+23 -19
View File
@@ -18,6 +18,8 @@ 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\Component;
use Livewire\WithPagination;
@@ -35,24 +37,22 @@ class UserWarnings extends Component
public User $user;
#[Url]
public string $warningTab = 'automated';
#[Url]
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 = [
protected array $rules = [
'message' => [
'required',
'filled',
@@ -63,7 +63,8 @@ class UserWarnings 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 $this->user
->userwarning()
@@ -83,17 +84,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 +129,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 +153,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 +168,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 +195,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 +222,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 +249,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 +261,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
+13 -15
View File
@@ -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,38 +25,33 @@ 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');
$this->dispatch('paginationChanged');
}
final public function toggleProperties($property): void
@@ -67,7 +64,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'])
+9 -2
View File
@@ -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
@@ -40,7 +46,7 @@ class WatchlistSearch extends Component
final public function updatedPage(): void
{
$this->emit('paginationChanged');
$this->dispatch('paginationChanged');
}
final public function updatingSearch(): void
@@ -51,7 +57,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'])
+14 -14
View File
@@ -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.1",
"gabrielelana/byte-units": "^0.5.0",
"guzzlehttp/guzzle": "^7.8.1",
"hdvinnie/laravel-html-purifier": "^2.0.0",
@@ -25,35 +25,35 @@
"intervention/image": "^2.7.2",
"joypixels/assets": "^v7.0.1",
"laravel/fortify": "1.20.0",
"laravel/framework": "^10.41.0",
"laravel/framework": "^10.43.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.5.1",
"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",
"symfony/dom-crawler": "^6.4.3",
"theodorejb/polycast": "dev-master",
"voku/anti-xss": "^4.1.42",
"vstelmakh/url-highlight": "^3.0.3"
},
"require-dev": {
"brianium/paratest": "7.2.2",
"brianium/paratest": "v7.4.0",
"diverently/phpstan-livewire": "^1.0.2",
"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",
"laravel/pint": "^1.13.10",
"laravel/sail": "^1.27.3",
"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",
"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.1"
},
"config": {
Generated
+542 -552
View File
File diff suppressed because it is too large Load Diff
+93 -104
View File
@@ -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,
];
+2 -2
View File
@@ -120,7 +120,7 @@ return [
*/
'hsts' => [
'enable' => true,
'enable' => false,
'max-age' => 31536000,
@@ -449,7 +449,7 @@ return [
*/
'csp' => [
'enable' => env('CSP_ENABLED', true),
'enable' => env('CSP_ENABLED', false),
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
'report-only' => env('CSP_REPORT_ONLY', false),
+118 -3
View File
@@ -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';
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
View File
@@ -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();
+1 -11
View File
@@ -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,7 @@
@yield('javascripts')
@yield('scripts')
@livewireScripts(['nonce' => HDVinnie\SecureHeaders\SecureHeaders::nonce()])
@livewireScriptConfig(['nonce' => HDVinnie\SecureHeaders\SecureHeaders::nonce()])
<script nonce="{{ HDVinnie\SecureHeaders\SecureHeaders::nonce('script') }}">
Livewire.on('paginationChanged', () => {
window.scrollTo({
top: 15,
left: 15,
behavior: 'smooth',
});
});
</script>
</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,13 @@
</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') }}
+5 -5
View File
@@ -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') }}?
+3 -3
View File
@@ -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,7 @@
<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 +98,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 +117,7 @@
class="form__select"
name="direction"
required
wire:model="sortDirection"
wire:model.live="sortDirection"
>
<option value="desc">
{{ __('common.descending') }}
@@ -135,7 +135,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 +154,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,7 @@
<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 +140,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 +159,7 @@
class="form__select"
name="direction"
required
wire:model="sortDirection"
wire:model.live="sortDirection"
>
<option value="desc">
{{ __('common.descending') }}
@@ -177,7 +177,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 +196,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,17 @@
</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 +43,7 @@
<p class="form__group">
<select
id="active"
wire:model="active"
wire:model.live="active"
class="form__select"
placeholder=" "
>
@@ -56,7 +56,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,7 @@
</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,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') }}
@@ -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,21 @@
</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 +47,7 @@
<p class="form__group">
<select
id="active"
wire:model="active"
wire:model.live="active"
class="form__select"
placeholder=" "
>
@@ -60,7 +60,7 @@
<p class="form__group">
<select
id="groupBy"
wire:model="groupBy"
wire:model.live="groupBy"
class="form__select"
placeholder=" "
>
@@ -76,7 +76,7 @@
<p class="form__group">
<label class="form__label">
<input
wire:model="duplicateIpsOnly"
wire:model.live="duplicateIpsOnly"
type="checkbox"
class="form__checkbox"
/>
@@ -86,7 +86,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>
@@ -8,7 +8,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">
@@ -15,7 +15,7 @@
class="quick-search__radio"
name="quicksearchRadio"
value="movies"
wire:model.debounce.0="quicksearchRadio"
wire:model.live.debounce.0="quicksearchRadio"
x-on:click="$nextTick(() => $refs.quickSearch.focus());"
/>
<i
@@ -29,7 +29,7 @@
class="quick-search__radio"
name="quicksearchRadio"
value="series"
wire:model.debounce.0="quicksearchRadio"
wire:model.live.debounce.0="quicksearchRadio"
x-on:click="$nextTick(() => $refs.quickSearch.focus());"
/>
<i
@@ -43,7 +43,7 @@
class="quick-search__radio"
name="quicksearchRadio"
value="persons"
wire:model.debounce.0="quicksearchRadio"
wire:model.live.debounce.0="quicksearchRadio"
x-on:click="$nextTick(() => $refs.quickSearch.focus());"
/>
<i
@@ -54,7 +54,7 @@
</div>
<input
class="quick-search__input"
wire:model.debounce.250ms="quicksearchText"
wire:model.live.debounce.250ms="quicksearchText"
type="text"
placeholder="{{ $quicksearchRadio }}"
x-ref="quickSearch"
@@ -8,7 +8,7 @@
id="rsskey"
class="form__text"
type="text"
wire:model="rsskey"
wire:model.live="rsskey"
placeholder=" "
/>
<label class="form__label form__label--floating" for="rsskey">
@@ -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>
@@ -1,3 +1,4 @@
<div>
<div style="display: flex; flex-direction: column; gap: 16px">
@if ($checked && $user->group->is_modo)
<menu style="list-style-type: none; padding: 0; margin: 0">
@@ -16,7 +17,7 @@
<th>
<input
type="checkbox"
wire:model="selectPage"
wire:model.live="selectPage"
style="vertical-align: middle"
/>
</th>
@@ -97,7 +98,7 @@
name="torrent_checkbox_{{ $torrent->id }}"
type="checkbox"
value="1"
wire:model="checked.{{ $torrent->id }}"
wire:model.live="checked.{{ $torrent->id }}"
/>
</td>
</tr>
@@ -194,6 +195,7 @@
</table>
</div>
</section>
</div>
@section('javascripts')
@if ($user->group->is_modo)
@@ -111,7 +111,7 @@
<p class="form__group">
<input
id="search"
wire:model="search"
wire:model.live="search"
type="search"
class="form__text"
placeholder=" "
@@ -124,7 +124,7 @@
<select
id="language_id"
class="form__select"
wire:model="language"
wire:model.live="language"
x-data="{ language: '' }"
x-model="language"
x-bind:class="language === '' ? 'form__select--default' : ''"
@@ -151,7 +151,7 @@
class="form__checkbox"
type="checkbox"
value="{{ $category->id }}"
wire:model="categories"
wire:model.live="categories"
/>
{{ $category->name }}
</label>
@@ -163,7 +163,7 @@
<p class="form__group">
<input
id="username"
wire:model="username"
wire:model.live="username"
type="search"
class="form__text"
placeholder=" "
@@ -173,7 +173,7 @@
</label>
</p>
<p 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>
@@ -1,10 +1,10 @@
<section class="panelV2" x-data="{ tab: @entangle('tab') }">
<section class="panelV2" x-data="{ tab: @entangle('tab').live }">
<header class="panel__header">
<h2 class="panel__heading">{{ __('ticket.helpdesk') }}</h2>
<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">
+2 -2
View File
@@ -9,7 +9,7 @@
class="form__select"
type="date"
name="interval"
wire:model="interval"
wire:model.live="interval"
>
<option value="day">Past Day</option>
<option value="week">Past Week</option>
@@ -27,7 +27,7 @@
class="form__select"
type="date"
name="metaType"
wire:model="metaType"
wire:model.live="metaType"
>
@foreach ($metaTypes as $name => $type)
<option value="{{ $type }}">{{ $name }}</option>
@@ -8,7 +8,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">

Some files were not shown because too many files have changed in this diff Show More