Compare commits

...

9 Commits
2.1.2 ... 2.1.6

Author SHA1 Message Date
Kode
4b2bbe0614 update version 2018-11-05 19:03:26 +00:00
Kode
9adfa14e62 fix light colour livestats 2018-11-05 19:02:19 +00:00
Kode
067f82b632 fix copy failing 2018-11-05 18:47:56 +00:00
Chris
e24e7979be update version number 2018-11-05 15:28:17 +00:00
Chris
c7c2b6e6f2 change location of icons so it's persistant 2018-11-05 15:27:29 +00:00
Chris
96798963d6 Update register app to allow all 2018-11-05 12:31:43 +00:00
Chris
75508a81ef Update version 2018-11-05 09:44:11 +00:00
Chris
f7f4efadb7 Change html comment to php comment 2018-11-05 09:40:44 +00:00
Kode
4cc80b98db inconsequential update to try and fix broken build 2018-11-04 22:33:44 +00:00
8 changed files with 49 additions and 16 deletions

View File

@@ -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);
}
}
}

View File

@@ -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;

View File

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

4
public/css/app.css vendored
View File

@@ -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

View File

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

View File

@@ -898,6 +898,13 @@ hr {
}
}
&.black {
.livestats {
strong {
color: #000;
}
}
}
}
input:-webkit-autofill,

View File

@@ -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>

View File

@@ -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 !!}