From d0985fc57de9367cf072c8aba0f8cb4ecc1bcd09 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Wed, 18 Mar 2026 16:09:48 +0100 Subject: [PATCH] 85 - Simplify Articles page to read-only feed log --- app/Livewire/Articles.php | 22 +---- resources/views/livewire/articles.blade.php | 89 +++------------------ 2 files changed, 10 insertions(+), 101 deletions(-) diff --git a/app/Livewire/Articles.php b/app/Livewire/Articles.php index 8d2de63..a70dbf2 100644 --- a/app/Livewire/Articles.php +++ b/app/Livewire/Articles.php @@ -4,7 +4,6 @@ use App\Jobs\ArticleDiscoveryJob; use App\Models\Article; -use App\Models\Setting; use Livewire\Component; use Livewire\WithPagination; @@ -14,22 +13,6 @@ class Articles extends Component public bool $isRefreshing = false; - public function approve(int $articleId): void - { - $article = Article::findOrFail($articleId); - $article->approve(); - - $this->dispatch('article-updated'); - } - - public function reject(int $articleId): void - { - $article = Article::findOrFail($articleId); - $article->reject(); - - $this->dispatch('article-updated'); - } - public function refresh(): void { $this->isRefreshing = true; @@ -41,15 +24,12 @@ public function refresh(): void public function render(): \Illuminate\Contracts\View\View { - $articles = Article::with(['feed', 'articlePublication']) + $articles = Article::with('feed') ->orderBy('created_at', 'desc') ->paginate(15); - $approvalsEnabled = Setting::isPublishingApprovalsEnabled(); - return view('livewire.articles', [ 'articles' => $articles, - 'approvalsEnabled' => $approvalsEnabled, ])->layout('layouts.app'); } } diff --git a/resources/views/livewire/articles.blade.php b/resources/views/livewire/articles.blade.php index 3acec05..29a218f 100644 --- a/resources/views/livewire/articles.blade.php +++ b/resources/views/livewire/articles.blade.php @@ -3,17 +3,8 @@

Articles

- Manage and review articles from your feeds + Articles fetched from your feeds

- @if ($approvalsEnabled) -
- - - - - Approval system enabled -
- @endif
- - - @endif @empty