Browse Source

Supported apps fixes

pull/74/head
Chris 7 years ago
parent
commit
fd5ca1914c
  1. 9
      app/Http/Controllers/ItemController.php
  2. 1
      app/SupportedApps/Nzbget.php
  3. 2
      config/app.php
  4. 68
      public/css/app.css
  5. 4
      public/mix-manifest.json
  6. 61
      resources/assets/sass/_app.scss
  7. 41
      resources/views/items/form.blade.php
  8. 12
      resources/views/supportedapps/nzbget.blade.php

9
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());

1
app/SupportedApps/Nzbget.php

@ -1,6 +1,7 @@
<?php namespace App\SupportedApps;
class Nzbget implements Contracts\Applications {
public function defaultColour()
{
return '#124019';

2
config/app.php

@ -14,7 +14,7 @@ return [
*/
'name' => env('APP_NAME', 'Heimdall'),
'version' => '1.1.0',
'version' => '1.2.0',
/*
|--------------------------------------------------------------------------

68
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
---------------------------------------------- */

4
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"
}

61
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%;
}
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;
}
}

41
resources/views/items/form.blade.php

@ -16,29 +16,14 @@
<div class="input">
<label>Application name *</label>
{!! Form::text('title', null, array('placeholder' => 'Title', 'id' => 'appname', 'class' => 'form-control')) !!}
</div>
<div class="input">
<label>Colour *</label>
{!! Form::text('colour', null, array('placeholder' => 'Hex Colour','class' => 'form-control color-picker')) !!}
</div>
<div class="input">
<hr />
<label>URL</label>
{!! Form::text('url', null, array('placeholder' => 'Url','class' => 'form-control')) !!}
</div>
<div class="input">
<label>Icon</label>
<div id="appimage">
@if(isset($item->icon) && !empty($item->icon))
<img src="{{ asset('storage/'.$item->icon) }}" />
{!! Form::hidden('icon', $item->icon, ['class' => 'form-control']) !!}
@endif
</div>
<input name="file" type="file" class="form-control">
</div>
<div class="input">
<label>Colour *</label>
{!! Form::text('colour', null, array('placeholder' => 'Hex Colour','class' => 'form-control color-picker')) !!}
<hr />
<label>Pinned</label>
<label class="switch">
<?php
@ -51,7 +36,23 @@
<span class="slider round"></span>
</label>
</div>
<div class="input">
<label>Icon</label>
<div class="icon-container">
<div id="appimage">
@if(isset($item->icon) && !empty($item->icon))
<img src="{{ asset('storage/'.$item->icon) }}" />
{!! Form::hidden('icon', $item->icon, ['class' => 'form-control']) !!}
@endif
</div>
<div class="upload-btn-wrapper">
<button class="btn">Upload a file</button>
<input type="file" name="myfile" />
</div>
</div>
</div>
<div id="sapconfig"></div>

12
resources/views/supportedapps/nzbget.blade.php

@ -1 +1,11 @@
here
<h2>Config (optional)</h2>
<div class="items">
<div class="input">
<label>Username</label>
{!! Form::text('config[username]', null, array('placeholder' => 'Username', 'class' => 'form-control')) !!}
</div>
<div class="input">
<label>Password</label>
{!! Form::text('config[password]', null, array('placeholder' => 'Password', 'class' => 'form-control')) !!}
</div>
</div>
Loading…
Cancel
Save