pixelfed/resources/views/admin/settings/system.blade.php

127 lines
4.2 KiB
PHP
Raw Normal View History

@extends('admin.partial.template-full')
2019-02-11 00:25:37 +00:00
2018-08-24 01:06:15 +00:00
@section('section')
<div class="title">
<h3 class="font-weight-bold">System</h3>
2019-02-11 00:25:37 +00:00
<p class="lead">System information</p>
2018-08-24 01:06:15 +00:00
</div>
<hr>
{{-- <div class="card shadow-none border mb-4">
<div class="card-body text-center">
<p class="lead">Update Available</p>
<p class="text-lighter">
<span class="font-weight-bold">v0.10.6</span>
<i class="fas fa-arrow-right mx-2"></i>
<span class="font-weight-bold text-primary">v0.10.7</span>
</p>
<a class="btn btn-primary font-weight-bold btn-block" href="#">Update</a>
</div>
</div>
<hr> --}}
2019-02-11 00:25:37 +00:00
<p class="h6 text-uppercase text-center">STACK</p>
2018-08-24 01:06:15 +00:00
<div class="row">
2019-02-11 00:25:37 +00:00
<div class="col-12 col-md-3">
<div class="card shadow-none border mb-3 border-left-blue">
2018-08-24 01:06:15 +00:00
<div class="card-body text-center">
2019-04-03 00:31:46 +00:00
<p class="font-weight-ultralight h2 mb-0 text-truncate" title="{{$sys['pixelfed']}}" data-toggle="tooltip">{{$sys['pixelfed']}}</p>
2018-08-24 01:06:15 +00:00
</div>
2019-02-11 00:25:37 +00:00
<div class="card-footer font-weight-bold py-0 text-center bg-white">Pixelfed</div>
</div>
2018-08-24 01:06:15 +00:00
</div>
2019-02-11 00:25:37 +00:00
<div class="col-12 col-md-3">
<div class="card shadow-none border mb-3 border-left-blue">
2019-02-11 00:25:37 +00:00
<div class="card-body text-center">
2019-04-03 00:31:46 +00:00
<p class="font-weight-ultralight h2 mb-0 text-truncate" title="{{$sys['database']['version']}}" data-toggle="tooltip">{{$sys['database']['version']}}</p>
2019-02-11 00:25:37 +00:00
</div>
2019-02-13 02:48:28 +00:00
<div class="card-footer font-weight-bold py-0 text-center bg-white">{{$sys['database']['name']}}</div>
2019-02-11 00:25:37 +00:00
</div>
</div>
<div class="col-12 col-md-3">
<div class="card shadow-none border mb-3 border-left-blue">
2019-02-11 00:25:37 +00:00
<div class="card-body text-center">
2019-04-03 00:31:46 +00:00
<p class="font-weight-ultralight h2 mb-0 text-truncate" title="{{$sys['php']}}" data-toggle="tooltip">{{$sys['php']}}</p>
2019-02-11 00:25:37 +00:00
</div>
<div class="card-footer font-weight-bold py-0 text-center bg-white">PHP</div>
</div>
</div>
2019-02-11 00:25:37 +00:00
<div class="col-12 col-md-3">
<div class="card shadow-none border mb-3 border-left-blue">
2018-08-24 01:06:15 +00:00
<div class="card-body text-center">
2019-04-03 00:31:46 +00:00
<p class="font-weight-ultralight h2 mb-0 text-truncate" title="{{$sys['laravel']}}" data-toggle="tooltip">{{$sys['laravel']}}</p>
2018-08-24 01:06:15 +00:00
</div>
2019-03-01 07:16:11 +00:00
<div class="card-footer font-weight-bold py-0 text-center bg-white">Laravel</div>
2018-11-04 04:18:11 +00:00
</div>
2018-08-24 01:06:15 +00:00
</div>
</div>
2019-02-11 00:25:37 +00:00
<hr>
<p class="h6 text-uppercase text-center">LATEST RELEASE</p>
<div>
<div class="card-loading text-center">
<div class="spinner-border" role="status">
<span class="sr-only">Loading…</span>
2019-02-11 00:25:37 +00:00
</div>
</div>
<div class="card shadow-none border card-release d-none" style="max-height: 500px;overflow-y: auto;">
2019-02-11 00:25:37 +00:00
<div class="card-body">
<div class="">
2019-02-11 00:25:37 +00:00
<div>
<p class="h1 latest-version mb-0 mr-4">0.0.0</p>
<hr>
2019-02-11 00:25:37 +00:00
</div>
<div class="text-left px-3">
<p class="mb-0 latest-name h2 font-weight-bold"></p>
<p class="mb-0 latest-branch badge badge-primary"></p>
<p class="mb-0 latest-body"></p>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('styles')
<style type="text/css">
.latest-body h1 {
font-size: 1.3rem;
}
.latest-body h2 {
font-size: 1.2rem;
}
.latest-body h3 {
font-size: 1.0rem;
}
.latest-branch {
font-size: 0.8rem;
}
</style>
@endpush
@push('scripts')
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.6.0/marked.min.js" integrity="sha256-Z0oIr+NZFYgsP19IS8I9OHioGTr34whIUMpSNMaKj8o=" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function() {
function latestRelease() {
let api = 'https://api.github.com/repos/pixelfed/pixelfed/releases';
delete window.axios.defaults.headers.common['X-CSRF-TOKEN'];
axios.get(api)
.then(res => {
let latest = res.data[0];
$('.latest-version').text(latest.tag_name);
$('.latest-name').text(latest.name);
$('.latest-branch').text(latest.target_commitish);
$('.latest-body').html(marked(latest.body));
$('.card-loading').hide();
$('.card-release').removeClass('d-none');
});
}
latestRelease();
});
</script>
@endpush