2016-08-28 10:05:21 +08:00
|
|
|
@extends('user.master')
|
|
|
|
|
2016-09-15 23:03:58 +08:00
|
|
|
@section('title', trans('general.dashboard'))
|
2016-08-28 10:05:21 +08:00
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<!-- Content Wrapper. Contains page content -->
|
|
|
|
<div class="content-wrapper">
|
|
|
|
<!-- Content Header (Page header) -->
|
|
|
|
<section class="content-header">
|
|
|
|
<h1>
|
2016-09-15 23:03:58 +08:00
|
|
|
{{ trans('general.dashboard') }}
|
2016-08-28 10:05:21 +08:00
|
|
|
<small>Dashboard</small>
|
|
|
|
</h1>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<!-- Main content -->
|
|
|
|
<section class="content">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
</div><!-- /.row -->
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border">
|
2016-09-15 23:03:58 +08:00
|
|
|
<h3 class="box-title">{{ trans('user.used.title') }}</h3>
|
2016-08-28 10:05:21 +08:00
|
|
|
</div><!-- /.box-header -->
|
|
|
|
<div class="box-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="progress-group">
|
2016-09-15 23:03:58 +08:00
|
|
|
<span class="progress-text">{{ trans('user.used.players') }}</span>
|
2016-08-28 10:05:21 +08:00
|
|
|
<?php
|
2016-10-23 11:41:52 +08:00
|
|
|
$players_available = $user->players->count() + floor($user->getScore() / option('score_per_player'));
|
|
|
|
$percent = ($players_available == 0) ? 0 : $user->players->count() / $players_available * 100
|
2016-08-28 10:05:21 +08:00
|
|
|
?>
|
2016-10-23 11:41:52 +08:00
|
|
|
<span class="progress-number"><b>{{ $user->players->count() }}</b>/{{ $players_available }}</span>
|
2016-08-28 10:05:21 +08:00
|
|
|
<div class="progress sm">
|
|
|
|
<div class="progress-bar progress-bar-aqua" style="width: {{ $percent }}%"></div>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.progress-group -->
|
|
|
|
<div class="progress-group">
|
2016-09-15 23:03:58 +08:00
|
|
|
<span class="progress-text">{{ trans('user.used.storage') }}</span>
|
|
|
|
<?php $rate = option('score_per_storage'); ?>
|
2016-08-28 10:05:21 +08:00
|
|
|
@if ($user->getStorageUsed() > 1024)
|
|
|
|
<span class="progress-number">
|
|
|
|
<b>{{ round($user->getStorageUsed() / 1024, 1) }}</b>/
|
|
|
|
{{ round(($user->getStorageUsed() + $user->getScore() / $rate) / 1024, 1) }} MB
|
|
|
|
</span>
|
|
|
|
@else
|
|
|
|
<span class="progress-number">
|
|
|
|
<b>{{ $user->getStorageUsed() }}</b>/
|
|
|
|
{{ $user->getStorageUsed() + $user->getScore() / $rate }} KB
|
|
|
|
</span>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div class="progress sm">
|
|
|
|
<div class="progress-bar progress-bar-yellow" style="width: {{ $user->getStorageUsed() / ($user->getStorageUsed() + $user->getScore() / $rate) * 100 }}%"></div>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.progress-group -->
|
|
|
|
</div><!-- /.col -->
|
|
|
|
<div class="col-md-4">
|
|
|
|
<p class="text-center">
|
2016-09-15 23:03:58 +08:00
|
|
|
<strong>{{ trans('user.cur-score') }}</strong>
|
2016-08-28 10:05:21 +08:00
|
|
|
</p>
|
|
|
|
<p id="score" data-toggle="modal" data-target="#modal-score-instruction">
|
|
|
|
{{ $user->getScore() }}
|
|
|
|
</p>
|
2016-09-15 23:03:58 +08:00
|
|
|
<p class="text-center" style="font-size: smaller; margin-top: 20px;">{{ trans('user.score-notice') }}</p>
|
2016-08-28 10:05:21 +08:00
|
|
|
</div><!-- /.col -->
|
|
|
|
</div><!-- /.row -->
|
|
|
|
</div><!-- ./box-body -->
|
|
|
|
<div class="box-footer">
|
2016-09-24 22:49:20 +08:00
|
|
|
@if ($user->canCheckIn())
|
|
|
|
<button id="checkin-button" class="btn btn-primary pull-left" onclick="checkin()">
|
|
|
|
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> {{ trans('user.checkin') }}
|
2016-08-28 10:05:21 +08:00
|
|
|
</button>
|
|
|
|
@else
|
2016-09-24 22:49:20 +08:00
|
|
|
<button class="btn btn-primary pull-left" title="{{ trans('user.last-checkin', ['time' => $user->getLastSignTime()]) }}" disabled="disabled">
|
|
|
|
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> {{ trans('user.checkin-remain-time', ['time' => $user->canCheckIn(true)]) }}
|
2016-08-28 10:05:21 +08:00
|
|
|
</button>
|
|
|
|
@endif
|
|
|
|
</div><!-- /.box-footer -->
|
|
|
|
</div><!-- /.box -->
|
|
|
|
</div><!-- /.col -->
|
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-header with-border">
|
2016-09-15 23:03:58 +08:00
|
|
|
<h3 class="box-title">{{ trans('user.announcement') }}</h3>
|
2016-08-28 10:05:21 +08:00
|
|
|
</div><!-- /.box-header -->
|
|
|
|
<div class="box-body">
|
2016-09-15 23:03:58 +08:00
|
|
|
{!! nl2br(option('announcement')) !!}
|
2016-08-28 10:05:21 +08:00
|
|
|
</div><!-- /.box-body -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section><!-- /.content -->
|
|
|
|
</div><!-- /.content-wrapper -->
|
|
|
|
|
|
|
|
<div id="modal-score-instruction" class="modal fade" tabindex="-1" role="dialog">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
2016-09-15 23:03:58 +08:00
|
|
|
<h4 class="modal-title">{{ trans('user.score-intro.title') }}</h4>
|
2016-08-28 10:05:21 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2016-09-15 23:03:58 +08:00
|
|
|
<?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
|
|
|
|
])) !!}
|
2016-08-28 10:05:21 +08:00
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
2016-09-15 23:03:58 +08:00
|
|
|
<p class="text-center">{{ trans('user.score-intro.rates.storage', ['score' => option('score_per_storage')]) }}</p>
|
2016-08-28 10:05:21 +08:00
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
2016-09-15 23:03:58 +08:00
|
|
|
<p class="text-center">{{ trans('user.score-intro.rates.player', ['score' => option('score_per_player')]) }}</p>
|
2016-08-28 10:05:21 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2016-09-15 23:03:58 +08:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.close') }}</button>
|
2016-08-28 10:05:21 +08:00
|
|
|
</div>
|
|
|
|
</div><!-- /.modal-content -->
|
|
|
|
</div><!-- /.modal-dialog -->
|
|
|
|
</div><!-- /.modal -->
|
|
|
|
|
|
|
|
@endsection
|