Compare commits

...

10 Commits

Author SHA1 Message Date
Kode
ac7446ffe6 update version 2018-11-14 18:14:23 +00:00
Kode
e45d3ca6ec remove apps 2018-11-14 18:10:55 +00:00
Chris
603550a453 autofocus password 2018-11-13 12:38:19 +00:00
Kode
4463ef4a9a add right to livestats 2018-11-10 21:37:21 +00:00
Kode
49b8dc0079 Update version number 2018-11-10 18:05:19 +00:00
Kode
ab83c3a551 Small changes
Copy icon if missing on new app add.
Change order of create symlink and load apps
2018-11-09 23:07:01 +00:00
Chris
98c6093674 Check url isn't missing when testing 2018-11-07 11:24:26 +00:00
Chris
e1f51521bf Update version 2018-11-07 08:57:18 +00:00
Chris
e85bc98dcc Fix ProcessJobs not working if folder is empty but table isn't 2018-11-07 08:54:00 +00:00
Chris
4ba52baa5c Remove old code from tags form 2018-11-06 15:44:09 +00:00
10 changed files with 60 additions and 33 deletions

View File

@@ -13,6 +13,14 @@ class Application extends Model
//
public function icon()
{
if(!file_exists(storage_path('app/public/'.$this->icon))) {
$img_src = app_path('SupportedApps/'.$this->name.'/'.str_replace('icons/', '', $this->icon));
$img_dest = storage_path('app/public/'.$this->icon);
//die("i: ".$img_src);
@copy($img_src, $img_dest);
}
return $this->icon;
}

View File

@@ -34,11 +34,15 @@ class ProcessApps implements ShouldQueue
$localapps = Application::all();
$list = json_decode(SupportedApps::getList()->getBody());
$validapps = [];
foreach($list->apps as $app) {
$validapps[] = $app->appid;
$localapp = $localapps->where('appid', $app->appid)->first();
$application = ($localapp) ? $localapp : new Application;
if(!file_exists(app_path('SupportedApps/'.className($app->name)))) {
SupportedApps::getFiles($app);
$application = new Application;
SupportedApps::saveApp($app, $application);
} else {
// check if there has been an update for this app
@@ -46,11 +50,10 @@ class ProcessApps implements ShouldQueue
if($localapp) {
if($localapp->sha !== $app->sha) {
SupportedApps::getFiles($app);
SupportedApps::saveApp($app, $localapp);
SupportedApps::saveApp($app, $application);
}
} else {
SupportedApps::getFiles($app);
$application = new Application;
SupportedApps::saveApp($app, $application);
}

View File

@@ -47,6 +47,11 @@ class AppServiceProvider extends ServiceProvider
}
}
if(!is_file(public_path('storage'))) {
Artisan::call('storage:link');
\Session::put('current_user', null);
}
$applications = Application::all();
if($applications->count() <= 0) {
@@ -58,11 +63,6 @@ class AppServiceProvider extends ServiceProvider
}
if(!is_file(public_path('storage'))) {
Artisan::call('storage:link');
\Session::put('current_user', null);
}
// User specific settings need to go here as session isn't available at this point in the app
view()->composer('*', function ($view)
{

View File

@@ -13,6 +13,13 @@ abstract class SupportedApps
public function appTest($url, $attrs = [], $overridevars=false)
{
if(empty($this->config->url)) {
return (object)[
'code' => 404,
'status' => 'No URL has been specified',
'response' => 'No URL has been specified',
];
}
$res = $this->execute($url, $attrs);
if($res == null) {
return (object)[
@@ -136,8 +143,8 @@ abstract class SupportedApps
public static function saveApp($details, $app)
{
if(!file_exists(public_path('storage/icons'))) {
mkdir(public_path('storage/icons'), 0777, true);
if(!file_exists(storage_path('app/public/icons'))) {
mkdir(storage_path('app/public/icons'), 0777, true);
}
$img_src = app_path('SupportedApps/'.className($details->name).'/'.$details->icon);

View File

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

22
public/css/app.css vendored
View File

@@ -1274,12 +1274,6 @@ hr {
width: 100%;
}
.livestats-container .livestats li {
text-align: center;
margin: 0;
line-height: 1;
}
.livestats-container .livestats span {
display: block;
text-transform: uppercase;
@@ -1311,6 +1305,22 @@ hr {
margin-left: 4px;
}
.livestats-container .livestats li {
text-align: center;
margin: 0;
line-height: 1;
}
.livestats-container .livestats li.right {
text-align: right;
}
.livestats-container .livestats li.right span {
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
}
.livestats-container .livestats.flexcolumn {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;

View File

@@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=476a34b0b53427a036fd",
"/css/app.css": "/css/app.css?id=fc4d028f7cc679d5b7bf",
"/js/app.js": "/js/app.js?id=8dc4a6ea723d0df7469d"
}
}

View File

@@ -866,11 +866,6 @@ hr {
justify-content: space-between;
width: 100%;
li {
text-align: center;
margin: 0;
line-height: 1;
}
span {
display: block;
text-transform: uppercase;
@@ -893,6 +888,18 @@ hr {
margin-left: 4px;
}
}
li {
text-align: center;
margin: 0;
line-height: 1;
&.right {
text-align: right;
span {
justify-content: flex-end;
}
}
}
&.flexcolumn {
flex-direction: column;
}

View File

@@ -15,7 +15,7 @@ $user = \App\User::currentUser();
<img class="user-img" src="{{ asset('/img/heimdall-icon-small.png') }}" />
@endif
{{ $user->username }}
<input id="password" type="password" class="form-control" name="password" required>
<input id="password" type="password" class="form-control" name="password" autofocus required>
<button type="submit" class="btn btn-primary">Login</button>
</div>
</div>

View File

@@ -52,15 +52,7 @@
</div>
</div>
@if(isset($item) && isset($item->config->view))
<div id="sapconfig" style="display: block;">
@if(isset($item))
@include('supportedapps.'.$item->config->view)
@endif
</div>
@else
<div id="sapconfig"></div>
@endif
</div>
<footer>