From 3a3446151ecebbbb0a9e5d32a7219cd56adb73d5 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Tue, 6 Feb 2018 20:41:29 +0000 Subject: [PATCH] supported apps stuff --- app/Item.php | 15 +++++++++++++++ public/mix-manifest.json | 4 ++-- resources/views/items/form.blade.php | 10 ++++++++-- resources/views/supportedapps/nzbget.blade.php | 1 + 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/app/Item.php b/app/Item.php index 9abc4971..01033269 100644 --- a/app/Item.php +++ b/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; + } } diff --git a/public/mix-manifest.json b/public/mix-manifest.json index cd4201fa..3e3f7b37 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -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" } \ No newline at end of file diff --git a/resources/views/items/form.blade.php b/resources/views/items/form.blade.php index 95fdda2e..05164808 100644 --- a/resources/views/items/form.blade.php +++ b/resources/views/items/form.blade.php @@ -52,9 +52,15 @@ - + @if(isset($item) && $item->config) +
+ @if(isset($item)) + @include('supportedapps.'.$item->config->view) + @endif +
+ @else
- + @endif