supported apps stuff
This commit is contained in:
parent
983cf98b9e
commit
ade028767a
|
@ -252,6 +252,7 @@ class ItemController extends Controller
|
|||
}
|
||||
$output['icon'] = $app_details->icon();
|
||||
$output['colour'] = $app_details->defaultColour();
|
||||
$output['config'] = $app_details->configDetails();
|
||||
return json_encode($output);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,4 +6,6 @@ interface Applications {
|
|||
|
||||
public function icon();
|
||||
|
||||
public function configDetails();
|
||||
|
||||
}
|
|
@ -3,11 +3,15 @@
|
|||
class Nzbget implements Contracts\Applications {
|
||||
public function defaultColour()
|
||||
{
|
||||
return '#ccc';
|
||||
return '#124019';
|
||||
}
|
||||
public function icon()
|
||||
{
|
||||
return 'supportedapps/nzbget.png';
|
||||
}
|
||||
public function configDetails()
|
||||
{
|
||||
return 'nzbget';
|
||||
}
|
||||
|
||||
}
|
|
@ -9,4 +9,8 @@ class Plex implements Contracts\Applications {
|
|||
{
|
||||
return 'supportedapps/plex.png';
|
||||
}
|
||||
public function configDetails()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
5
public/css/app.css
vendored
5
public/css/app.css
vendored
|
@ -1007,6 +1007,11 @@ a.settinglink {
|
|||
max-width: 150px;
|
||||
}
|
||||
|
||||
#sapconfig {
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*! Huebee v2.0.0
|
||||
http://huebee.buzz
|
||||
---------------------------------------------- */
|
||||
|
|
5
public/js/app.js
vendored
5
public/js/app.js
vendored
|
@ -34,11 +34,6 @@ $.when( $.ready ).then(function() {
|
|||
$("#sortable").sortable("disable");
|
||||
|
||||
|
||||
$('.color-picker').each( function( i, elem ) {
|
||||
var hueb = new Huebee( elem, {
|
||||
// options
|
||||
});
|
||||
});
|
||||
$('#app').on('click', '#config-button', function(e) {
|
||||
e.preventDefault();
|
||||
var app = $('#app');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/css/app.css": "/css/app.css?id=69336a09561650860b52",
|
||||
"/js/app.js": "/js/app.js?id=2dffa24cf7255229e085"
|
||||
"/css/app.css": "/css/app.css?id=d32556b7ae5fe4651548",
|
||||
"/js/app.js": "/js/app.js?id=559585a774e3f088503a"
|
||||
}
|
5
resources/assets/js/app.js
vendored
5
resources/assets/js/app.js
vendored
|
@ -25,11 +25,6 @@ $.when( $.ready ).then(function() {
|
|||
$("#sortable").sortable("disable");
|
||||
|
||||
|
||||
$('.color-picker').each( function( i, elem ) {
|
||||
var hueb = new Huebee( elem, {
|
||||
// options
|
||||
});
|
||||
});
|
||||
$('#app').on('click', '#config-button', function(e) {
|
||||
e.preventDefault();
|
||||
var app = $('#app');
|
||||
|
|
5
resources/assets/sass/_app.scss
vendored
5
resources/assets/sass/_app.scss
vendored
|
@ -647,3 +647,8 @@ div.create {
|
|||
max-width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
#sapconfig {
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
|
@ -52,6 +52,8 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div id="sapconfig"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<script>
|
||||
$( function() {
|
||||
|
||||
var elem = $('.color-picker')[0];
|
||||
var hueb = new Huebee( elem, {
|
||||
// options
|
||||
});
|
||||
|
||||
var availableTags = [
|
||||
<?php
|
||||
$supported = App\Item::supportedOptions();
|
||||
|
@ -14,6 +20,13 @@
|
|||
$.post('/appload', { app: ui.item.value }, function(data) {
|
||||
$('#appimage').html("<img src='/storage/"+data.icon+"' /><input type='hidden' name='icon' value='"+data.icon+"' />");
|
||||
$('input[name=colour]').val(data.colour);
|
||||
hueb.setColor( data.colour );
|
||||
$('input[name=pinned]').prop('checked', true);
|
||||
if(data.config != null) {
|
||||
$.get('/view/'+data.config, function(getdata) {
|
||||
$('#sapconfig').html(getdata).show();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
|
|
1
resources/views/supportedapps/nzbget.blade.php
Normal file
1
resources/views/supportedapps/nzbget.blade.php
Normal file
|
@ -0,0 +1 @@
|
|||
here
|
|
@ -24,6 +24,10 @@ Route::post('order', 'ItemController@setOrder')->name('items.order');
|
|||
|
||||
Route::post('appload', 'ItemController@appload')->name('appload');
|
||||
|
||||
Route::get('view/{name_view}', function ($name_view) {
|
||||
return view('supportedapps.'.$name_view);
|
||||
});
|
||||
|
||||
/**
|
||||
* Settings.
|
||||
*/
|
||||
|
|
BIN
storage/app/public/supportedapps/nzbget.png
Normal file
BIN
storage/app/public/supportedapps/nzbget.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
Loading…
Reference in a new issue