Updating configuration and .env.example

This commit is contained in:
Chris Kankiewicz
2019-12-23 11:16:47 -07:00
parent 91081aa354
commit 8c83e603bf
4 changed files with 31 additions and 18 deletions

View File

@@ -1 +1,12 @@
DARK_MODE=false
SORT_ORDER=type
REVERSE_SORT=false
HIDDEN_FILES=""
HIDE_APP_FILES=true
HIDE_VCS_FILES=true
DATE_FORMAT="Y-m-d H:i:s"
MAX_HASH_SIZE=1000000000

View File

@@ -41,7 +41,7 @@ class FinderComposer
public function __invoke(): void
{
$finder = Finder::create()->depth(0)->followLinks();
$finder->ignoreVCS($this->config->get('app.ignore_vcs_files', false));
$finder->ignoreVCS($this->config->get('app.hide_vcs_files', false));
$finder->filter(function (SplFileInfo $file) {
return ! $this->hiddenFiles()->contains($file->getRealPath());
});

View File

@@ -1,51 +1,52 @@
<?php
use App\Support\Helpers;
return [
/**
* Sorting order of files and folders.
*
* Possible values: type, natural, name, accessed, changed, modified, <callable>
* Possible values: type, natural, name, accessed, changed, modified
* Default value: type
*/
'sort_order' => 'type',
'sort_order' => Helpers::env('SORT_ORDER', 'type'),
/**
* Reverse the sort order.
*
* Possible values: true, false
* Default value: false
*/
'reverse_sort' => false,
'reverse_sort' => Helpers::env('REVERSE_SORT', false),
/**
* Default date format.
*
* Default value: 'Y-m-d H:i:s'
*/
'date_format' => 'Y-m-d H:i:s',
/**
* Whether or not to hide application files/directories form the listing.
*
* Default value: true
*/
'hide_app_files' => true,
'date_format' => Helpers::env('DATE_FORMAT', 'Y-m-d H:i:s'),
/**
* Description here...
*
* Default value: []
*/
'hidden_files' => [
// ...
],
'hidden_files' => array_map(function (string $file) {
return trim($file);
}, explode(',', Helpers::env('HIDDEN_FILES'))),
/**
* Whether or not to hide application files/directories form the listing.
*
* Default value: true
*/
'hide_app_files' => Helpers::env('HIDE_APP_FILES', true),
/**
* Hide version control system files (e.g. .git directories) from listing.
*
* Default value: true
*/
'ignore_vcs_files' => true,
'hide_vcs_files' => Helpers::env('HIDE_VSC_FILES', true),
/**
* The maximum file size (in bytes) that can be hashed. This helps to
@@ -53,5 +54,5 @@ return [
*
* Defualt value: 1000000000
*/
'max_hash_size' => 1000000000
'max_hash_size' => Helpers::env('MAX_HASH_SIZE', 1000000000)
];

View File

@@ -12,6 +12,7 @@ return [
/**
* Path to the view cache directory.
* Set to 'false' to disable view caching entirely.
*
* Default value: 'app/cache/views'
*/