diff --git a/app/Filament/Resources/User/UserResource/Pages/UserProfile.php b/app/Filament/Resources/User/UserResource/Pages/UserProfile.php index 58ae14b4..b371a1ac 100644 --- a/app/Filament/Resources/User/UserResource/Pages/UserProfile.php +++ b/app/Filament/Resources/User/UserResource/Pages/UserProfile.php @@ -45,6 +45,9 @@ class UserProfile extends Page if ($this->record->two_step_secret) { $actions[] = $this->buildDisableTwoStepAuthenticationAction(); } + if ($this->record->status == User::STATUS_PENDING) { + $actions[] = $this->buildConfirmAction(); + } $actions[] = $this->buildResetPasswordAction(); $actions[] = $this->buildAssignExamAction(); $actions[] = $this->buildGrantMedalAction(); @@ -204,6 +207,20 @@ class UserProfile extends Page }); } + private function buildConfirmAction() + { + return Actions\Action::make(__('admin.resources.user.actions.confirm_btn')) + ->modalHeading(__('admin.resources.user.actions.confirm_btn')) + ->requiresConfirmation() + ->action(function () { + $this->record->status = User::STATUS_CONFIRMED; + $this->record->info= null; + $this->record->save(); + $this->notify('success', 'Success!'); + $this->emitSelf(self::EVENT_RECORD_UPDATED, $this->record->id); + }); + } + diff --git a/nexus/Install/Install.php b/nexus/Install/Install.php index 7db375b6..52759ace 100644 --- a/nexus/Install/Install.php +++ b/nexus/Install/Install.php @@ -12,7 +12,7 @@ class Install { protected $currentStep; - protected $minimumPhpVersion = '8.0.2'; + protected $minimumPhpVersion = '8.0.3'; protected $progressKeyPrefix = '__step'; @@ -71,7 +71,7 @@ class Install for ($i = 1; $i < $step; $i++) { $progressKey = $this->getProgressKey($i); if (!isset($_SESSION[$progressKey])) { - $this->doLog("check step: $i, session doesn't have" ); + $this->doLog("check step: $i, session doesn't have: " . json_encode($_SESSION)); return false; } } diff --git a/nexus/Torrent/TechnicalInformation.php b/nexus/Torrent/TechnicalInformation.php index ad8c35cb..34cab405 100644 --- a/nexus/Torrent/TechnicalInformation.php +++ b/nexus/Torrent/TechnicalInformation.php @@ -151,7 +151,8 @@ class TechnicalInformation $subtitles = $this->getSubtitles(); // dd($videos, $audios, $subtitles); if (empty($videos) && empty($audios) && empty($subtitles)) { - return ''; +// return ''; + return sprintf('
%s