mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-28 06:57:22 +08:00
announce log menu only show when enabled
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Filament\Resources\Torrent;
|
||||
use App\Filament\Resources\Torrent\AnnounceLogResource\Pages;
|
||||
use App\Filament\Resources\Torrent\AnnounceLogResource\RelationManagers;
|
||||
use App\Models\AnnounceLog;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Torrent;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
@@ -39,6 +40,14 @@ class AnnounceLogResource extends Resource
|
||||
return self::getNavigationLabel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public static function shouldRegisterNavigation(): bool
|
||||
{
|
||||
return Setting::getIsRecordAnnounceLog() && config('clickhouse.connection.host') != '';
|
||||
}
|
||||
|
||||
public static function infolist(Infolist $infolist): Infolist
|
||||
{
|
||||
return $infolist
|
||||
|
||||
Reference in New Issue
Block a user