mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-24 05:30:33 +09:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b2bbe0614 | ||
|
|
9adfa14e62 | ||
|
|
067f82b632 | ||
|
|
e24e7979be | ||
|
|
c7c2b6e6f2 | ||
|
|
96798963d6 | ||
|
|
75508a81ef | ||
|
|
f7f4efadb7 | ||
|
|
4cc80b98db |
@@ -40,22 +40,40 @@ class RegisterApp extends Command
|
||||
public function handle()
|
||||
{
|
||||
$folder = $this->argument('folder');
|
||||
if($folder == 'all') {
|
||||
$apps = scandir(app_path('SupportedApps'));
|
||||
foreach($apps as $folder) {
|
||||
if($folder == '.' || $folder == '..') continue;
|
||||
$this->addApp($folder);
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->addApp($folder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function addApp($folder)
|
||||
{
|
||||
$json = app_path('SupportedApps/'.$folder.'/app.json');
|
||||
if(file_exists($json)) {
|
||||
$app = json_decode(file_get_contents($json));
|
||||
$exists = Application::find($app->appid);
|
||||
if($exists) {
|
||||
$this->error('This app is already registered');
|
||||
exit;
|
||||
if(isset($app->appid)) {
|
||||
$exists = Application::find($app->appid);
|
||||
if($exists) {
|
||||
$this->error('Application already registered - '.$exists->name." - ".$exists->appid);
|
||||
} else {
|
||||
// Doesn't exist so add it
|
||||
SupportedApps::saveApp($app, new Application);
|
||||
$this->info("Application Added - ".$app->name." - ".$app->appid);
|
||||
}
|
||||
} else {
|
||||
$this->error('No App ID for - '.$folder);
|
||||
}
|
||||
// Doesn't exist so add it
|
||||
SupportedApps::saveApp($app, new Application);
|
||||
$this->info("Application Added - ".$app->name." - ".$app->appid);
|
||||
|
||||
} else {
|
||||
$this->error('Could not find '.$json);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,15 +129,19 @@ abstract class SupportedApps
|
||||
|
||||
public static function saveApp($details, $app)
|
||||
{
|
||||
if(!file_exists(public_path('storage/icons'))) {
|
||||
mkdir(public_path('storage/icons'), 0777, true);
|
||||
}
|
||||
|
||||
$img_src = app_path('SupportedApps/'.className($details->name).'/'.$details->icon);
|
||||
$img_dest = public_path('storage/supportedapps/'.$details->icon);
|
||||
$img_dest = public_path('storage/icons/'.$details->icon);
|
||||
//die("i: ".$img_src);
|
||||
copy($img_src, $img_dest);
|
||||
|
||||
$app->appid = $details->appid;
|
||||
$app->name = $details->name;
|
||||
$app->sha = $details->sha ?? null;
|
||||
$app->icon = 'supportedapps/'.$details->icon;
|
||||
$app->icon = 'icons/'.$details->icon;
|
||||
$app->website = $details->website;
|
||||
$app->license = $details->license;
|
||||
$app->description = $details->description;
|
||||
|
||||
@@ -14,7 +14,7 @@ return [
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Heimdall'),
|
||||
'version' => '2.1.0',
|
||||
'version' => '2.1.6',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
4
public/css/app.css
vendored
4
public/css/app.css
vendored
@@ -1318,6 +1318,10 @@ hr {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.livestats-container.black .livestats strong {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:hover,
|
||||
input:-webkit-autofill:focus
|
||||
|
||||
2
public/mix-manifest.json
generated
2
public/mix-manifest.json
generated
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/css/app.css": "/css/app.css?id=fb2cfb67b5f04db8beee",
|
||||
"/css/app.css": "/css/app.css?id=476a34b0b53427a036fd",
|
||||
"/js/app.js": "/js/app.js?id=8dc4a6ea723d0df7469d"
|
||||
}
|
||||
@@ -898,6 +898,13 @@ hr {
|
||||
}
|
||||
|
||||
}
|
||||
&.black {
|
||||
.livestats {
|
||||
strong {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input:-webkit-autofill,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="details">
|
||||
<div class="title{{ title_color($app->colour) }}">{{ $app->title }}</div>
|
||||
@if($app->enabled())
|
||||
<div data-id="{{ $app->id }}" data-dataonly="{{ $app->getconfig()->dataonly ?? '0' }}" class="livestats-container"></div>
|
||||
<div data-id="{{ $app->id }}" data-dataonly="{{ $app->getconfig()->dataonly ?? '0' }}" class="livestats-container{{ title_color($app->colour) }}"></div>
|
||||
@endif
|
||||
</div>
|
||||
<a class="link{{ title_color($app->colour) }}"{!! $app->link_target !!} href="{{ $app->link }}"><i class="fas {{ $app->link_icon }}"></i></a>
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
</header>
|
||||
<div class="create">
|
||||
{!! csrf_field() !!}
|
||||
<!--<div class="input">
|
||||
<?php /*<div class="input">
|
||||
<label>Application name</label>
|
||||
{!! Form::select('supported', \App\Item::supportedOptions(), array('placeholder' => 'Title','class' => 'form-control')) !!}
|
||||
</div>-->
|
||||
</div>*/ ?>
|
||||
|
||||
<div class="input">
|
||||
{!! $setting->edit_value !!}
|
||||
|
||||
Reference in New Issue
Block a user