Compare commits

...

11 Commits

Author SHA1 Message Date
KodeStar
0fe6565346 Update app.php 2022-03-19 07:06:02 +00:00
KodeStar
85c68c1f46 Merge pull request #783 from xavier-GitHub76/2.x
Update app.php (French translations Fix) + version app (2.4.4)
2022-03-18 16:40:10 +00:00
Kode
fc2191b8db Fix preview image 2022-03-18 16:36:05 +00:00
xavier-GitHub76
ee36a0cfae Update app.php
Update version app to 2.4.4
2022-03-18 14:32:15 +01:00
Kode
a868a6cac1 Fix for creating tags not setting home dashboard as default 2022-03-18 10:10:00 +00:00
xavier-GitHub76
574756b236 Update app.php
French translate fix
2022-03-17 22:43:05 +01:00
Kode
f9599079e5 Update app.php 2022-03-17 19:04:39 +00:00
Kode
10afffb71d Fix test button 2022-03-17 19:03:06 +00:00
KodeStar
79d53af339 Update app.php 2022-03-17 13:42:07 +00:00
KodeStar
8cc6a9cc63 Pull missing apps on update apps list 2022-03-17 13:41:50 +00:00
KodeStar
18001fbdd0 Get app regardless of if it's enhanced (might be a search provider) 2022-03-17 12:56:51 +00:00
9 changed files with 58 additions and 42 deletions

View File

@@ -145,11 +145,38 @@ class ItemController extends Controller
//
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = collect([0 => __('app.dashboard')]);
$data['current_tags'] = '0';
return view('items.create', $data);
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
// Get the item
$item = Item::find($id);
if($item->appid === null && $item->class !== null) { // old apps wont have an app id so set it
$app = Application::where('class', $item->class)->first();
if($app) {
$item->appid = $app->appid;
}
}
$data['item'] = $item;
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = $data['item']->tags();
//$data['current_tags'] = $data['item']->parent;
//die(print_r($data['current_tags']));
// show the edit form and pass the nerd
return view('items.edit', $data);
}
public function storelogic($request, $id = null)
{
$application = Application::single($request->input('appid'));
@@ -238,31 +265,6 @@ class ItemController extends Controller
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
// Get the item
$item = Item::find($id);
if($item->appid === null && $item->class !== null) { // old apps wont have an app id so set it
$app = Application::where('class', $item->class)->first();
if($app) {
$item->appid = $app->appid;
}
}
$data['item'] = $item;
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = $data['item']->tags();
//$data['current_tags'] = $data['item']->parent;
//die(print_r($data['current_tags']));
// show the edit form and pass the nerd
return view('items.edit', $data);
}
/**
* Update the specified resource in storage.
@@ -358,9 +360,10 @@ class ItemController extends Controller
$app = Application::single($appid);
$output = (array)$app;
$appdetails = Application::getApp($appid);
if((boolean)$app->enhanced === true) {
// if(!isset($app->config)) { // class based config
$appdetails = Application::getApp($appid);
$output['custom'] = className($appdetails->name).'.config';
// }
}
@@ -378,8 +381,8 @@ class ItemController extends Controller
{
$data = $request->input('data');
//$url = $data[array_search('url', array_column($data, 'name'))]['value'];
$app = $data['type'];
$single = Application::single($data['type']);
$app = $single->class;
$app_details = new $app();
$app_details->config = (object)$data;

View File

@@ -10,6 +10,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Support\Facades\Storage;
use App\Application;
use App\SupportedApps;
use App\Item;
class ProcessApps implements ShouldQueue
{
@@ -42,5 +43,13 @@ class ProcessApps implements ShouldQueue
$app->save();
}
$items = Item::whereNotNull('class')->get();
foreach($items as $item) {
if(!file_exists(app_path('SupportedApps/'.Item::nameFromClass($item->class)))) {
$app = Application::where('class', $item->class)->first();
Application::getApp($app->appid);
}
}
}
}

View File

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

1
public/css/app.css vendored
View File

@@ -1,4 +1,3 @@
@charset "UTF-8";
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;

6
public/js/app.js vendored
View File

@@ -620,14 +620,14 @@ $.when($.ready).then(function () {
drop: function( event, ui ) {
var tag = $( this ).data('id');
var item = $( ui.draggable ).data('id');
$.get('tag/add/'+tag+'/'+item, function(data) {
$.get('tag/add/'+tag+'/'+item, function(data) {
if(data == 1) {
$( ui.draggable ).remove();
} else {
alert('not added');
}
});
}
}
});*/
$('#sortable').sortable({
@@ -716,7 +716,7 @@ $.when($.ready).then(function () {
}).on('click', '#test_config', function (e) {
e.preventDefault();
var apiurl = $('#create input[name=url]').val();
var override_url = $('#create input[name="config[override_url]"]').val();
var override_url = $('#sapconfig input[name="config[override_url]"]').val();
if (override_url.length && override_url != '') {
apiurl = override_url;

View File

@@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=bc18c3a0e8475fe00a5a",
"/js/app.js": "/js/app.js?id=c95edea425171c6ce8f6"
"/css/app.css": "/css/app.css?id=ad45b1705b7f7906db0b",
"/js/app.js": "/js/app.js?id=5446aeb4aa754e641c77"
}

View File

@@ -205,7 +205,7 @@ $.when( $.ready ).then(function() {
e.preventDefault();
var apiurl = $('#create input[name=url]').val();
var override_url = $('#create input[name="config[override_url]"]').val();
var override_url = $('#sapconfig input[name="config[override_url]"]').val();
if(override_url.length && override_url != '') {
apiurl = override_url;
}

View File

@@ -6,6 +6,7 @@ return array (
'settings.miscellaneous' => 'Divers',
'settings.support' => 'Support',
'settings.donate' => 'Contribuer',
'settings.advanced' => 'Options avancées',
'settings.version' => 'Version',
'settings.background_image' => 'Image d\'arrière-plan',
@@ -71,6 +72,8 @@ return array (
'apps.preview' => 'Aperçu',
'apps.apptype' => 'Type d\'application ',
'apps.only_admin_account' => 'Seulement si vous avez un compte administrateur!',
'apps.autologin_url' => 'URL de connexion automatique',
'apps.show_deleted' => 'Afficher les applications supprimées',
'dashboard' => 'Tableau de bord',

View File

@@ -3,11 +3,13 @@
?>
<section class="item-container" data-id="">
<div class="item set-bg-elem" style="background-color: {{ $item->colour ?? '#222' }}">
@if(isset($item->icon) && !empty($item->icon))
<img class="app-icon" src="{{ asset('/storage/'.$item->icon) }}" />
@else
<img class="app-icon" src="{{ asset('/img/heimdall-icon-small.png') }}" />
@endif
<div class="app-icon-container">
@if(isset($item->icon) && !empty($item->icon))
<img class="app-icon" src="{{ asset('/storage/'.$item->icon) }}" />
@else
<img class="app-icon" src="{{ asset('/img/heimdall-icon-small.png') }}" />
@endif
</div>
<div class="details">
<div class="title{{ title_color($item->colour) ?? 'white' }}">{{ $item->title ?? '' }}</div>
@if($item->enhanced())