Add search providers as an editable yaml file + allow searching tiles

This commit is contained in:
Kode
2022-03-13 19:30:24 +00:00
parent 96ec1e0b08
commit f73b78f292
37 changed files with 7013 additions and 63 deletions

View File

@@ -74,6 +74,9 @@ class Setting extends Model
case 'select':
if(!empty($this->value) && $this->value !== 'none') {
$options = (array)json_decode($this->options);
if($this->key === 'search_provider') {
$options = Search::providers()->pluck('name', 'id')->toArray();
}
$value = __($options[$this->value]);
} else {
$value = __('app.options.none');
@@ -122,6 +125,9 @@ class Setting extends Model
break;
case 'select':
$options = json_decode($this->options);
if($this->key === 'search_provider') {
$options = Search::providers()->pluck('name', 'id');
}
foreach($options as $key => $opt) {
$options->$key = __($opt);
}