mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-04 14:10:00 +09:00
supported apps stuff
This commit is contained in:
@@ -252,6 +252,7 @@ class ItemController extends Controller
|
|||||||
}
|
}
|
||||||
$output['icon'] = $app_details->icon();
|
$output['icon'] = $app_details->icon();
|
||||||
$output['colour'] = $app_details->defaultColour();
|
$output['colour'] = $app_details->defaultColour();
|
||||||
|
$output['config'] = $app_details->configDetails();
|
||||||
return json_encode($output);
|
return json_encode($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,4 +6,6 @@ interface Applications {
|
|||||||
|
|
||||||
public function icon();
|
public function icon();
|
||||||
|
|
||||||
|
public function configDetails();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,11 +3,15 @@
|
|||||||
class Nzbget implements Contracts\Applications {
|
class Nzbget implements Contracts\Applications {
|
||||||
public function defaultColour()
|
public function defaultColour()
|
||||||
{
|
{
|
||||||
return '#ccc';
|
return '#124019';
|
||||||
}
|
}
|
||||||
public function icon()
|
public function icon()
|
||||||
{
|
{
|
||||||
return 'supportedapps/nzbget.png';
|
return 'supportedapps/nzbget.png';
|
||||||
}
|
}
|
||||||
|
public function configDetails()
|
||||||
|
{
|
||||||
|
return 'nzbget';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,8 @@ class Plex implements Contracts\Applications {
|
|||||||
{
|
{
|
||||||
return 'supportedapps/plex.png';
|
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;
|
max-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sapconfig {
|
||||||
|
display: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/*! Huebee v2.0.0
|
/*! Huebee v2.0.0
|
||||||
http://huebee.buzz
|
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");
|
$("#sortable").sortable("disable");
|
||||||
|
|
||||||
|
|
||||||
$('.color-picker').each( function( i, elem ) {
|
|
||||||
var hueb = new Huebee( elem, {
|
|
||||||
// options
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$('#app').on('click', '#config-button', function(e) {
|
$('#app').on('click', '#config-button', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var app = $('#app');
|
var app = $('#app');
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"/css/app.css": "/css/app.css?id=69336a09561650860b52",
|
"/css/app.css": "/css/app.css?id=d32556b7ae5fe4651548",
|
||||||
"/js/app.js": "/js/app.js?id=2dffa24cf7255229e085"
|
"/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");
|
$("#sortable").sortable("disable");
|
||||||
|
|
||||||
|
|
||||||
$('.color-picker').each( function( i, elem ) {
|
|
||||||
var hueb = new Huebee( elem, {
|
|
||||||
// options
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$('#app').on('click', '#config-button', function(e) {
|
$('#app').on('click', '#config-button', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var app = $('#app');
|
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;
|
max-width: 150px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sapconfig {
|
||||||
|
display: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
@@ -52,6 +52,8 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="sapconfig"></div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
$( function() {
|
$( function() {
|
||||||
|
|
||||||
|
var elem = $('.color-picker')[0];
|
||||||
|
var hueb = new Huebee( elem, {
|
||||||
|
// options
|
||||||
|
});
|
||||||
|
|
||||||
var availableTags = [
|
var availableTags = [
|
||||||
<?php
|
<?php
|
||||||
$supported = App\Item::supportedOptions();
|
$supported = App\Item::supportedOptions();
|
||||||
@@ -14,6 +20,13 @@
|
|||||||
$.post('/appload', { app: ui.item.value }, function(data) {
|
$.post('/appload', { app: ui.item.value }, function(data) {
|
||||||
$('#appimage').html("<img src='/storage/"+data.icon+"' /><input type='hidden' name='icon' value='"+data.icon+"' />");
|
$('#appimage').html("<img src='/storage/"+data.icon+"' /><input type='hidden' name='icon' value='"+data.icon+"' />");
|
||||||
$('input[name=colour]').val(data.colour);
|
$('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");
|
}, "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::post('appload', 'ItemController@appload')->name('appload');
|
||||||
|
|
||||||
|
Route::get('view/{name_view}', function ($name_view) {
|
||||||
|
return view('supportedapps.'.$name_view);
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings.
|
* 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 |
Reference in New Issue
Block a user