mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
72 lines
2.4 KiB
PHP
72 lines
2.4 KiB
PHP
@extends('layouts.admin.main')
|
|
|
|
@section('content')
|
|
<div class="col-md-12">
|
|
<div class="card">
|
|
<div class="card-header card-header-primary">
|
|
<h4>Configuration du système de fichier</h4>
|
|
</div>
|
|
<div class="card-body mt-5">
|
|
<form action="/admin/config/files" method="post" enctype="multipart/form-data">
|
|
@csrf
|
|
<div class="row ml-2">
|
|
<p class="col-12">Il n'y a rien ici pour le moment</h3>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('breadcrumb')
|
|
Configuration du système de fichier
|
|
@endsection
|
|
|
|
@section('custom_scripts')
|
|
<script>
|
|
if({{\App\Config::getData('is_Google_Drive_enabled')}})
|
|
{
|
|
$('#is_active').prop( "checked", true );
|
|
}
|
|
else
|
|
{
|
|
$('#is_active').prop( "checked", false );
|
|
}
|
|
checkFileSystem();
|
|
|
|
function checkFileSystem() {
|
|
$('#loaderDot').removeClass('d-none');
|
|
$('#btn-sync').addClass('d-none');
|
|
let text = $('#google-drive-status-text');
|
|
let div = $('#google-drive-status');
|
|
div.removeClass('alert-primary');
|
|
div.addClass('alert-info');
|
|
text.html("Vérification du système de fichier ...");
|
|
$.get('/api/drive/checkfilestructure',{api_token: api_token}, function (data) {
|
|
if(data.length != 0)
|
|
{
|
|
div.removeClass('alert-primary');
|
|
div.removeClass('alert-info');
|
|
div.removeClass('alert-danger');
|
|
div.addClass('alert-danger');
|
|
text.html("");
|
|
data.forEach(d => {
|
|
text.append(d);
|
|
console.log(d);
|
|
});
|
|
}
|
|
else
|
|
{
|
|
div.removeClass('alert-primary');
|
|
div.removeClass('alert-info');
|
|
div.removeClass('alert-danger');
|
|
div.addClass('alert-primary');
|
|
text.html("Google Drive est initialisé correctement");
|
|
}
|
|
$('#loaderDot').addClass('d-none');
|
|
$('#btn-sync').removeClass('d-none');
|
|
})
|
|
}
|
|
</script>
|
|
@endsection
|