mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +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) {
|
if ($this->record->two_step_secret) {
|
||||||
$actions[] = $this->buildDisableTwoStepAuthenticationAction();
|
$actions[] = $this->buildDisableTwoStepAuthenticationAction();
|
||||||
}
|
}
|
||||||
|
if ($this->record->status == User::STATUS_PENDING) {
|
||||||
|
$actions[] = $this->buildConfirmAction();
|
||||||
|
}
|
||||||
$actions[] = $this->buildResetPasswordAction();
|
$actions[] = $this->buildResetPasswordAction();
|
||||||
$actions[] = $this->buildAssignExamAction();
|
$actions[] = $this->buildAssignExamAction();
|
||||||
$actions[] = $this->buildGrantMedalAction();
|
$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 $currentStep;
|
||||||
|
|
||||||
protected $minimumPhpVersion = '8.0.2';
|
protected $minimumPhpVersion = '8.0.3';
|
||||||
|
|
||||||
protected $progressKeyPrefix = '__step';
|
protected $progressKeyPrefix = '__step';
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ class Install
|
|||||||
for ($i = 1; $i < $step; $i++) {
|
for ($i = 1; $i < $step; $i++) {
|
||||||
$progressKey = $this->getProgressKey($i);
|
$progressKey = $this->getProgressKey($i);
|
||||||
if (!isset($_SESSION[$progressKey])) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,8 @@ class TechnicalInformation
|
|||||||
$subtitles = $this->getSubtitles();
|
$subtitles = $this->getSubtitles();
|
||||||
// dd($videos, $audios, $subtitles);
|
// dd($videos, $audios, $subtitles);
|
||||||
if (empty($videos) && empty($audios) && empty($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>';
|
$result = '<table style="border: none;width: 100%"><tbody><tr>';
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ return [
|
|||||||
'grant_medal_medal_label' => 'Select medal',
|
'grant_medal_medal_label' => 'Select medal',
|
||||||
'grant_medal_duration_label' => 'Duration',
|
'grant_medal_duration_label' => 'Duration',
|
||||||
'grant_medal_duration_help' => 'Unit: days. If left blank, the user has permanent possession',
|
'grant_medal_duration_help' => 'Unit: days. If left blank, the user has permanent possession',
|
||||||
|
'confirm_btn' => 'Confirm',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'exam_user' => [
|
'exam_user' => [
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ return [
|
|||||||
'grant_medal_medal_label' => '选择勋章',
|
'grant_medal_medal_label' => '选择勋章',
|
||||||
'grant_medal_duration_label' => '有效时长',
|
'grant_medal_duration_label' => '有效时长',
|
||||||
'grant_medal_duration_help' => '单位:天。如果留空,用户永久拥有',
|
'grant_medal_duration_help' => '单位:天。如果留空,用户永久拥有',
|
||||||
|
'confirm_btn' => '确认',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'exam_user' => [
|
'exam_user' => [
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ return [
|
|||||||
'grant_medal_medal_label' => '選擇勛章',
|
'grant_medal_medal_label' => '選擇勛章',
|
||||||
'grant_medal_duration_label' => '有效時長',
|
'grant_medal_duration_label' => '有效時長',
|
||||||
'grant_medal_duration_help' => '單位:天。如果留空,用戶永久擁有',
|
'grant_medal_duration_help' => '單位:天。如果留空,用戶永久擁有',
|
||||||
|
'confirm_btn' => '確認',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'exam_user' => [
|
'exam_user' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user