This commit is contained in:
Pig Fang 2019-08-16 17:09:40 +08:00
parent eedcfdf957
commit bf778e9405
2 changed files with 13 additions and 12 deletions

View File

@ -37,11 +37,22 @@ class UserController extends Controller
{
$user = Auth::user();
list($from, $to) = explode(',', option('sign_score'));
$scoreIntro = nl2br(trans('user.score-intro.introduction', [
'initial_score' => option('user_initial_score'),
'score-from' => $from,
'score-to' => $to,
'return-score' => option('return_score')
? trans('user.score-intro.will-return-score')
: trans('user.score-intro.no-return-score')
]));
return view('user.index')->with([
'statistics' => [
'players' => $this->calculatePercentageUsed($user->players->count(), option('score_per_player')),
'storage' => $this->calculatePercentageUsed($this->getStorageUsed($user), option('score_per_storage')),
],
'scoreIntro' => $scoreIntro,
'announcement' => app('parsedown')->text(option_localized('announcement')),
'extra' => ['unverified' => option('require_verification') && ! $user->verified],
]);

View File

@ -8,9 +8,7 @@
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
@lang('general.dashboard')
</h1>
<h1>@lang('general.dashboard')</h1>
</section>
<!-- Main content -->
@ -49,16 +47,8 @@
<h4 class="modal-title">@lang('user.score-intro.title')</h4>
</div>
<div class="modal-body">
<?php list($from, $to) = explode(',', Option::get('sign_score')); ?>
{!! nl2br(trans('user.score-intro.introduction', [
'initial_score' => option('user_initial_score'),
'score-from' => $from,
'score-to' => $to,
'return-score' => option('return_score') ? trans('user.score-intro.will-return-score') : trans('user.score-intro.no-return-score')
])) !!}
{!! $scoreIntro !!}
<hr />
<div class="row">
<div class="col-md-4">
<p class="text-center">@lang('user.score-intro.rates.storage', ['score' => option('score_per_storage')])</p>