blessing-skin-server/resources/views/admin/update.tpl

134 lines
6.3 KiB
PHP
Raw Normal View History

2016-08-09 13:18:27 +08:00
@extends('admin.master')
2016-09-25 10:02:40 +08:00
@section('title', trans('general.check-update'))
2016-08-09 13:18:27 +08:00
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
2018-07-17 11:06:55 +08:00
@lang('general.check-update')
2016-08-09 13:18:27 +08:00
</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
2018-07-17 11:06:55 +08:00
<h3 class="box-title">@lang('admin.update.info.title')</h3>
2016-08-09 13:18:27 +08:00
</div><!-- /.box-header -->
<div class="box-body">
@if ($info['new_version_available'])
2018-07-17 11:06:55 +08:00
<div class="callout callout-info">@lang('admin.update.info.available')</div>
2016-08-09 13:18:27 +08:00
<table class="table">
<tbody>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('admin.update.info.versions.latest')</td>
2016-08-09 13:18:27 +08:00
<td class="value">
v{{ $info['latest_version'] }}
2016-08-09 13:18:27 +08:00
</td>
</tr>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('admin.update.info.versions.current')</td>
2016-08-09 13:18:27 +08:00
<td class="value">
v{{ $info['current_version'] }}
2016-08-09 13:18:27 +08:00
</td>
</tr>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('admin.update.info.release-time')</td>
2016-08-09 13:18:27 +08:00
<td class="value">
2018-08-17 22:54:26 +08:00
{{ get_datetime_string($info['release_time']) }}
2016-08-09 13:18:27 +08:00
</td>
</tr>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('admin.update.info.change-log.text')</td>
2016-08-09 13:18:27 +08:00
<td class="value">
2016-12-30 20:37:27 +08:00
{!! nl2br($info['release_note']) ?: trans('admin.update.info.change-log.empty') !!}
2016-08-09 13:18:27 +08:00
</td>
</tr>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('admin.update.info.downloads.text')</td>
2016-08-09 13:18:27 +08:00
<td class="value">
2018-07-17 11:06:55 +08:00
<a href="{!! $info['release_url'] !!}">@lang('admin.update.info.downloads.link')</a>
2016-08-09 13:18:27 +08:00
</td>
</tr>
@if($info['pre_release'])
2018-07-17 11:06:55 +08:00
<div class="callout callout-warning">@lang('admin.update.info.pre-release-warning')</div>
@endif
2016-08-09 13:18:27 +08:00
</tbody>
</table>
@else
2018-07-17 11:06:55 +08:00
<div class="callout callout-success">@lang('admin.update.info.up-to-date')</div>
2016-08-09 13:18:27 +08:00
<table class="table">
<tbody>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('admin.update.info.versions.current')</td>
2016-08-09 13:18:27 +08:00
<td class="value">
v{{ $info['current_version'] }}
2016-08-09 13:18:27 +08:00
</td>
</tr>
<tr>
2018-07-17 11:06:55 +08:00
<td class="key">@lang('admin.update.info.release-time')</td>
2016-08-09 13:18:27 +08:00
<td class="value">
2016-12-30 20:37:27 +08:00
@if ($info['release_time'])
2018-08-17 22:54:26 +08:00
{{ get_datetime_string($info['release_time']) }}
@else
2018-07-17 11:06:55 +08:00
@lang('admin.update.info.pre-release')
@endif
2016-08-09 13:18:27 +08:00
</td>
</tr>
</tbody>
</table>
@endif
</div><!-- /.box-body -->
<div class="box-footer">
2018-07-17 11:06:55 +08:00
<a class="btn btn-primary" id="update-button" {!! !$info['new_version_available'] ? 'disabled="disabled"' : 'onclick="downloadUpdates();"' !!}>@lang('admin.update.info.button')</a>
2016-12-30 20:37:27 +08:00
{!! trans('admin.update.info.check-github', ['url' => 'https://github.com/printempw/blessing-skin-server/releases']) !!}
2016-08-09 13:18:27 +08:00
</div>
</div>
<div class="box box-default">
<div class="box-header with-border">
2018-07-17 11:06:55 +08:00
<h3 class="box-title">@lang('admin.update.cautions.title')</h3>
2016-08-09 13:18:27 +08:00
</div><!-- /.box-header -->
<div class="box-body">
2016-12-30 20:37:27 +08:00
<p>{!! nl2br(trans('admin.update.cautions.text')) !!}</p>
2016-08-09 13:18:27 +08:00
</div><!-- /.box-body -->
</div>
</div>
<div class="col-md-6">
2016-12-30 20:37:27 +08:00
{!! $update->render() !!}
2016-08-09 13:18:27 +08:00
</div>
</div>
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<div id="modal-start-download" 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">&times;</span></button>
2018-07-17 11:06:55 +08:00
<h4 class="modal-title">@lang('admin.update.download.downloading')</h4>
</div>
<div class="modal-body">
2018-07-17 11:06:55 +08:00
<p>@lang('admin.update.download.size')<span id="file-size">0</span> Bytes</p>
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
2018-08-17 23:24:08 +08:00
<span id="download-progress">0</span>%
</div>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
2016-08-27 16:29:20 +08:00
@endsection