mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-19 00:01:00 +08:00
admin add confirm user + show original media info when not meet the standard
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,8 @@ class TechnicalInformation
|
||||
$subtitles = $this->getSubtitles();
|
||||
// dd($videos, $audios, $subtitles);
|
||||
if (empty($videos) && empty($audios) && empty($subtitles)) {
|
||||
return '';
|
||||
// return '';
|
||||
return sprintf('<div style="padding: 0 0.5rem"><pre>%s</pre></div>', $this->mediaInfo);
|
||||
}
|
||||
|
||||
$result = '<table style="border: none;width: 100%"><tbody><tr>';
|
||||
|
||||
@@ -50,6 +50,7 @@ return [
|
||||
'grant_medal_medal_label' => 'Select medal',
|
||||
'grant_medal_duration_label' => 'Duration',
|
||||
'grant_medal_duration_help' => 'Unit: days. If left blank, the user has permanent possession',
|
||||
'confirm_btn' => 'Confirm',
|
||||
]
|
||||
],
|
||||
'exam_user' => [
|
||||
|
||||
@@ -50,6 +50,7 @@ return [
|
||||
'grant_medal_medal_label' => '选择勋章',
|
||||
'grant_medal_duration_label' => '有效时长',
|
||||
'grant_medal_duration_help' => '单位:天。如果留空,用户永久拥有',
|
||||
'confirm_btn' => '确认',
|
||||
]
|
||||
],
|
||||
'exam_user' => [
|
||||
|
||||
@@ -50,6 +50,7 @@ return [
|
||||
'grant_medal_medal_label' => '選擇勛章',
|
||||
'grant_medal_duration_label' => '有效時長',
|
||||
'grant_medal_duration_help' => '單位:天。如果留空,用戶永久擁有',
|
||||
'confirm_btn' => '確認',
|
||||
]
|
||||
],
|
||||
'exam_user' => [
|
||||
|
||||
Reference in New Issue
Block a user