mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
117 lines
6.8 KiB
PHP
117 lines
6.8 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">
|
|
@csrf
|
|
<div class="row ml-2">
|
|
<h3 class="col-12">Google Drive</h3>
|
|
<div class="col-6">
|
|
<div class="alert alert-info" role="alert">
|
|
Vous pouvez suivre un <a class="alert-link" target="_blank" href="https://github.com/ivanvermeyen/laravel-google-drive-demo/blob/master/README/1-getting-your-dlient-id-and-secret.md">tutoriel (Anglais) <i class="fas fa-external-link-square-alt text-white"></i></a> pour trouver c'est information.
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
@if($error == [])
|
|
<div class="alert alert-primary" role="alert">
|
|
Google Drive est initialisé correctement
|
|
<div id="loaderDot" class="float-right d-none" style="margin-top: -30px;">
|
|
@loaderDot
|
|
</div>
|
|
<div class="float-right" id="btn-sync">
|
|
<button type="button" class="btn btn-round btn-fab" style="margin-top: -0.55rem" onclick="checkFileSystem()">
|
|
<i class="fas fa-sync"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="alert alert-danger" role="alert">
|
|
Problème détecté avec votre installation ...
|
|
<ul>
|
|
@foreach($error as $e)
|
|
<li>{{$e}}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
<div class="col-md-8 p-2">
|
|
<div class="togglebutton">
|
|
<label>
|
|
<input type="checkbox" checked="">
|
|
<span class="toggle"></span>
|
|
Activer Google Drive
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
</div>
|
|
<div class="col-md-6 p-2">
|
|
<div class="form-group">
|
|
<label for="exampleInputEmail1">GOOGLE_DRIVE_CLIENT_ID</label>
|
|
<input type="text" class="form-control" id="GOOGLE_DRIVE_CLIENT_ID" name="GOOGLE_DRIVE_CLIENT_ID" aria-describedby="emailHelp" value="{{Crypt::decryptString(\App\Config::getData('GOOGLE_DRIVE_CLIENT_ID')) }}">
|
|
<small id="emailHelp" class="form-text text-muted">ID de client Google Drive</small>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 p-2">
|
|
<div class="form-group">
|
|
<label for="exampleInputEmail1">GOOGLE_DRIVE_CLIENT_SECRET</label>
|
|
<input type="text" class="form-control" id="GOOGLE_DRIVE_CLIENT_SECRET" name="GOOGLE_DRIVE_CLIENT_SECRET" aria-describedby="emailHelp" value="{{Crypt::decryptString(\App\Config::getData('GOOGLE_DRIVE_CLIENT_SECRET'))}}">
|
|
<small id="emailHelp" class="form-text text-muted">ID secret du disque Google Drive</small>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 p-2">
|
|
<div class="form-group">
|
|
<label for="exampleInputEmail1">GOOGLE_DRIVE_REFRESH_TOKEN</label>
|
|
<input type="text" class="form-control" id="GOOGLE_DRIVE_REFRESH_TOKEN" name="GOOGLE_DRIVE_REFRESH_TOKEN" aria-describedby="emailHelp" value="{{Crypt::decryptString(\App\Config::getData('GOOGLE_DRIVE_REFRESH_TOKEN'))}}">
|
|
<small id="emailHelp" class="form-text text-muted">Token de rafraichissement du disque Google Drive</small>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 p-2">
|
|
<div class="form-group">
|
|
<label for="exampleInputEmail1">GOOGLE_DRIVE_FOLDER_ID</label>
|
|
<input type="text" class="form-control" id="GOOGLE_DRIVE_FOLDER_ID" name="GOOGLE_DRIVE_FOLDER_ID" aria-describedby="emailHelp" value="{{Crypt::decryptString(\App\Config::getData('GOOGLE_DRIVE_FOLDER_ID'))}}">
|
|
<small id="emailHelp" class="form-text text-muted">ID du dossier Google Drive, "null" pour la racine</small>
|
|
</div>
|
|
</div>
|
|
<h3 class="col-12">Configuration de la liste nominale</h3>
|
|
<div class="col-md-6 p-2">
|
|
<div class="form-group">
|
|
<label for="exampleInputEmail1">Liste nominative des cadets</label>
|
|
<input type="text" class="form-control" id="cadet_list" name="cadet_list" aria-describedby="emailHelp" value="{{\App\Config::getData('cadet_list')}}">
|
|
<small id="emailHelp" class="form-text text-muted">Url vers la liste nominative des cadets</small>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12 p-2">
|
|
<button type="submit" class="btn btn-primary">Sauvegarder</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('breadcrumb')
|
|
Configuration du système de fichier
|
|
@endsection
|
|
|
|
@section('custom_scripts')
|
|
<script>
|
|
function checkFileSystem() {
|
|
$('#loaderDot').removeClass('d-none');
|
|
$('#btn-sync').addClass('d-none');
|
|
$.get('/api/drive/checkfilestructure',{api_token: api_token}, function (data) {
|
|
console.log('data');
|
|
$('#loaderDot').addClass('d-none');
|
|
$('#btn-sync').removeClass('d-none');
|
|
})
|
|
}
|
|
</script>
|
|
@endsection
|