mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 12:10:34 +09:00
supported apps stuff
This commit is contained in:
15
app/Item.php
15
app/Item.php
@@ -45,4 +45,19 @@ class Item extends Model
|
||||
{
|
||||
return $query->where('pinned', 1);
|
||||
}
|
||||
|
||||
public function getConfigAttribute()
|
||||
{
|
||||
$output = null;
|
||||
if(isset($this->description) && !empty($this->description)){
|
||||
$output = json_decode($this->description);
|
||||
if(isset($output->type) && !empty($output->type)) {
|
||||
$class = $output->type;
|
||||
$sap = new $class();
|
||||
$view = $sap->configDetails();
|
||||
}
|
||||
$output->view = $view;
|
||||
}
|
||||
return (object)$output;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/css/app.css": "/css/app.css?id=c4fd68c39261024e61ed",
|
||||
"/js/app.js": "/js/app.js?id=906019381e165da0f941"
|
||||
"/css/app.css": "/css/app.css?id=8c034347751a0b8faeb2",
|
||||
"/js/app.js": "/js/app.js?id=559585a774e3f088503a"
|
||||
}
|
||||
@@ -52,9 +52,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if(isset($item) && $item->config)
|
||||
<div id="sapconfig" style="display: block;">
|
||||
@if(isset($item))
|
||||
@include('supportedapps.'.$item->config->view)
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div id="sapconfig"></div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<h2>Config (optional)</h2>
|
||||
<div class="items">
|
||||
<input type="hidden" name="config[type]" value="\App\SupportedApps\Nzbget" />
|
||||
<div class="input">
|
||||
<label>Username</label>
|
||||
{!! Form::text('config[username]', null, array('placeholder' => 'Username', 'class' => 'form-control')) !!}
|
||||
|
||||
Reference in New Issue
Block a user