From fd5ca1914cef28baa4e209c908b88341f18a783b Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Feb 2018 15:27:02 +0000 Subject: [PATCH] Supported apps fixes --- app/Http/Controllers/ItemController.php | 9 +++ app/SupportedApps/Nzbget.php | 1 + config/app.php | 2 +- public/css/app.css | 68 ++++++++++++++++++- public/mix-manifest.json | 4 +- resources/assets/sass/_app.scss | 61 ++++++++++++++++- resources/views/items/form.blade.php | 41 +++++------ .../views/supportedapps/nzbget.blade.php | 12 +++- 8 files changed, 169 insertions(+), 29 deletions(-) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index c5342568..fe8dc8c7 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -138,6 +138,15 @@ class ItemController extends Controller 'icon' => $path ]); } + + $config = json_encode($request->input('config')); + if($config) { + $request->merge([ + 'description' => $config + ]); + } + + //die(print_r($request->input('config'))); Item::create($request->all()); diff --git a/app/SupportedApps/Nzbget.php b/app/SupportedApps/Nzbget.php index 0163384b..337c7869 100644 --- a/app/SupportedApps/Nzbget.php +++ b/app/SupportedApps/Nzbget.php @@ -1,6 +1,7 @@ env('APP_NAME', 'Heimdall'), - 'version' => '1.1.0', + 'version' => '1.2.0', /* |-------------------------------------------------------------------------- diff --git a/public/css/app.css b/public/css/app.css index 82c67c51..8013dcae 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -724,7 +724,7 @@ body { } div.create { - padding: 30px; + padding: 30px 15px; display: -webkit-box; display: -ms-flexbox; display: flex; @@ -733,7 +733,7 @@ div.create { } div.create .input { - width: 260px; + width: 280px; margin: 20px; } @@ -1012,6 +1012,70 @@ a.settinglink { width: 100%; } +#sapconfig h2 { + background: #f2f3f6; + padding: 18px 25px; + margin-left: -15px; + width: calc(100% + 30px); + /* margin-right: -30px; */ + border-top: 1px solid #dbdce3; + border-bottom: 1px solid #dbdce3; + font-size: 18px; + color: #5b5b5b; + font-weight: 500; +} + +#sapconfig .items { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} + +hr { + margin: 23px 0 18px; + height: 0; + border-style: none; + border-width: 0; + border-top: 1px solid #eaeaea; + border-bottom: 1px solid #fff; +} + +.upload-btn-wrapper { + position: relative; + overflow: hidden; + display: inline-block; +} + +.btn { + border: none; + color: white; + background-color: #d64d55; + padding: 8px 12px; + border-radius: 8px; + font-size: 16px; +} + +.upload-btn-wrapper input[type=file] { + font-size: 100px; + position: absolute; + left: 0; + top: 0; + opacity: 0; +} + +.icon-container { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.icon-container img { + margin-right: 15px; +} + /*! Huebee v2.0.0 http://huebee.buzz ---------------------------------------------- */ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 0e9bea16..cd4201fa 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=d32556b7ae5fe4651548", - "/js/app.js": "/js/app.js?id=559585a774e3f088503a" + "/css/app.css": "/css/app.css?id=c4fd68c39261024e61ed", + "/js/app.js": "/js/app.js?id=906019381e165da0f941" } \ No newline at end of file diff --git a/resources/assets/sass/_app.scss b/resources/assets/sass/_app.scss index 050a3ae0..7a91facb 100644 --- a/resources/assets/sass/_app.scss +++ b/resources/assets/sass/_app.scss @@ -393,11 +393,11 @@ body { } } div.create { - padding: 30px; + padding: 30px 15px; display: flex; flex-wrap: wrap; .input { - width: 260px; + width: 280px; margin: 20px; label:not(.switch) { width: 100%; @@ -651,4 +651,59 @@ div.create { #sapconfig { display: none; width: 100%; -} \ No newline at end of file + h2 { + background: #f2f3f6; + padding: 18px 25px; + margin-left: -15px; + width: calc(100% + 30px); + /* margin-right: -30px; */ + border-top: 1px solid #dbdce3; + border-bottom: 1px solid #dbdce3; + font-size: 18px; + color: #5b5b5b; + font-weight: 500; + } + .items { + display: flex; + } +} +hr { + margin: 23px 0 18px; + height: 0; + border-style: none; + border-width: 0; + border-top: 1px solid #eaeaea; + border-bottom: 1px solid #fff; + +} + +.upload-btn-wrapper { + position: relative; + overflow: hidden; + display: inline-block; + } + + .btn { + border: none; + color: white; + background-color: $app-red; + padding: 8px 12px; + border-radius: 8px; + font-size: 16px; + } + + .upload-btn-wrapper input[type=file] { + font-size: 100px; + position: absolute; + left: 0; + top: 0; + opacity: 0; + } + + .icon-container { + display: flex; + align-items: center; + img { + margin-right: 15px; + } + } \ No newline at end of file diff --git a/resources/views/items/form.blade.php b/resources/views/items/form.blade.php index d2c713f2..95fdda2e 100644 --- a/resources/views/items/form.blade.php +++ b/resources/views/items/form.blade.php @@ -16,29 +16,14 @@
{!! Form::text('title', null, array('placeholder' => 'Title', 'id' => 'appname', 'class' => 'form-control')) !!} +
+ + {!! Form::text('url', null, array('placeholder' => 'Url','class' => 'form-control')) !!}
{!! Form::text('colour', null, array('placeholder' => 'Hex Colour','class' => 'form-control color-picker')) !!} -
-
- - {!! Form::text('url', null, array('placeholder' => 'Url','class' => 'form-control')) !!} -
- -
- -
- @if(isset($item->icon) && !empty($item->icon)) - - {!! Form::hidden('icon', $item->icon, ['class' => 'form-control']) !!} - @endif -
- - -
- -
+
- +
+ +
+
+ @if(isset($item->icon) && !empty($item->icon)) + + {!! Form::hidden('icon', $item->icon, ['class' => 'form-control']) !!} + @endif +
+
+ + +
+
+
+ +
diff --git a/resources/views/supportedapps/nzbget.blade.php b/resources/views/supportedapps/nzbget.blade.php index 60aecbdb..c8a40664 100644 --- a/resources/views/supportedapps/nzbget.blade.php +++ b/resources/views/supportedapps/nzbget.blade.php @@ -1 +1,11 @@ -here \ No newline at end of file +

Config (optional)

+
+
+ + {!! Form::text('config[username]', null, array('placeholder' => 'Username', 'class' => 'form-control')) !!} +
+
+ + {!! Form::text('config[password]', null, array('placeholder' => 'Password', 'class' => 'form-control')) !!} +
+
\ No newline at end of file