Compare commits

...

16 Commits

Author SHA1 Message Date
Chris 5f524563cf Merge branch 'master' of https://github.com/linuxserver/Heimdall 2019-06-18 13:41:06 +01:00
Chris 3d181623c3 fix small issue 2019-06-18 13:41:02 +01:00
KodeStar 1919dbfd96 Update readme.md 2019-06-18 13:22:14 +01:00
Chris 8e1615ac5f fix search tab behaviour and tag link in subfolder 2019-06-18 12:25:05 +01:00
Chris 7966f07fdb update scripts + add home dash as default tag 2019-06-18 11:51:07 +01:00
Chris ac8fe7012b remove false from routes 2019-06-18 10:51:51 +01:00
Chris 51d89dae82 Possible fix for folder based RP 2019-06-18 08:46:57 +01:00
KodeStar ef21ac0fe7 Merge pull request #359 from pahakalle/patch-1
Fix typo in Finnish translation
2019-06-13 19:10:04 +01:00
KodeStar 02697687cc Merge pull request #364 from linuxserver/hometags
Allow apps to be tagged to the homepage
2019-06-13 19:09:19 +01:00
Kode fd2f7f27a6 Make home tag translatable 2019-06-13 19:07:38 +01:00
Kode 21b1ef5e4b fix pin toggle and get homepage dash working 2019-06-13 18:59:01 +01:00
Chris e452d3b5f6 add seed 2019-06-13 15:57:54 +01:00
Chris 1419882455 initial 2019-06-13 15:40:26 +01:00
KodeStar d79202ed87 Update readme.md 2019-06-12 11:02:19 +01:00
KodeStar aa05c947a9 Remove url validation 2019-06-11 14:11:13 +01:00
Kalle Laine dd4b94ba71 Fix typo in Finnish translation 2019-06-11 14:18:08 +03:00
37 changed files with 6600 additions and 92 deletions
+12
View File
@@ -35,6 +35,18 @@ function title_color($hex)
}
}
function getLinkTargetAttribute()
{
$target = \App\Setting::fetch('window_target');
if($target === 'current') {
return '';
} else {
return ' target="' . $target . '"';
}
}
function className($name)
{
+34 -17
View File
@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Storage;
use App\SupportedApps;
use App\Jobs\ProcessApps;
use App\Search;
use Illuminate\Support\Facades\Route;
class ItemController extends Controller
{
@@ -27,8 +28,16 @@ class ItemController extends Controller
*/
public function dash()
{
$data['apps'] = Item::doesntHave('parents')->pinned()->orderBy('order', 'asc')->get();
$data['all_apps'] = Item::doesntHave('parents')->get();
$data['apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->pinned()->orderBy('order', 'asc')->get();
$data['all_apps'] = Item::whereHas('parents', function ($query) {
$query->where('id', 0);
})->orderBy('order', 'asc')->get();
//$data['all_apps'] = Item::doesntHave('parents')->get();
//die(print_r($data['apps']));
return view('welcome', $data);
}
@@ -57,7 +66,7 @@ class ItemController extends Controller
$item = Item::findOrFail($id);
$item->pinned = true;
$item->save();
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route);
}
@@ -71,7 +80,7 @@ class ItemController extends Controller
$item = Item::findOrFail($id);
$item->pinned = false;
$item->save();
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route);
}
@@ -80,20 +89,25 @@ class ItemController extends Controller
*
* @return \Illuminate\Http\Response
*/
public function pinToggle($id, $ajax=false)
public function pinToggle($id, $ajax=false, $tag=false)
{
$item = Item::findOrFail($id);
$new = ((bool)$item->pinned === true) ? false : true;
$item->pinned = $new;
$item->save();
if($ajax) {
$data['apps'] = Item::pinned()->get();
if(is_numeric($tag) && $tag > 0) {
$item = Item::whereId($tag)->first();
$data['apps'] = $item->children()->pinned()->orderBy('order', 'asc')->get();
} else {
$data['apps'] = Item::pinned()->orderBy('order', 'asc')->get();
}
$data['ajax'] = true;
return view('sortable', $data);
} else {
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route);
}
}
}
@@ -125,7 +139,8 @@ class ItemController extends Controller
{
//
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['current_tags'] = [];
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = collect([0 => __('app.dashboard')]);
return view('items.create', $data);
}
@@ -141,7 +156,7 @@ class ItemController extends Controller
//
$validatedData = $request->validate([
'title' => 'required|max:255',
'url' => 'required|url',
'url' => 'required',
]);
if($request->hasFile('file')) {
@@ -173,7 +188,7 @@ class ItemController extends Controller
$item->parents()->sync($request->tags);
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route)
->with('success', __('app.alert.success.item_created'));
}
@@ -200,8 +215,10 @@ class ItemController extends Controller
// Get the item
$data['item'] = Item::find($id);
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['current_tags'] = $data['item']->parents;
$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);
}
@@ -217,7 +234,7 @@ class ItemController extends Controller
{
$validatedData = $request->validate([
'title' => 'required|max:255',
'url' => 'required|url',
'url' => 'required',
]);
//die(print_r($request->all()));
if($request->hasFile('file')) {
@@ -248,7 +265,7 @@ class ItemController extends Controller
$item->parents()->sync($request->tags);
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route)
->with('success',__('app.alert.success.item_updated'));
}
@@ -271,7 +288,7 @@ class ItemController extends Controller
Item::find($id)->delete();
}
$route = route('items.index', [], false);
$route = route('items.index', []);
return redirect($route)
->with('success',__('app.alert.success.item_deleted'));
}
@@ -289,7 +306,7 @@ class ItemController extends Controller
->where('id', $id)
->restore();
$route = route('items.inded', [], false);
$route = route('items.inded', []);
return redirect($route)
->with('success',__('app.alert.success.item_restored'));
}
+4 -4
View File
@@ -47,7 +47,7 @@ class SettingsController extends Controller
'setting' => $setting,
]);
} else {
$route = route('settings.list', [], false);
$route = route('settings.list', []);
return redirect($route)
->with([
'error' => __('app.alert.error.not_exist'),
@@ -85,13 +85,13 @@ class SettingsController extends Controller
$user->settings()->detach($setting->id);
$user->settings()->save($setting, ['uservalue' => $setting_value]);
$route = route('settings.index', [], false);
$route = route('settings.index', []);
return redirect($route)
->with([
'success' => __('app.alert.success.setting_updated'),
]);
} else {
$route = route('settings.index', [], false);
$route = route('settings.index', []);
return redirect($route)
->with([
'error' => __('app.alert.error.not_exist'),
@@ -111,7 +111,7 @@ class SettingsController extends Controller
$user->settings()->detach($setting->id);
$user->settings()->save($setting, ['uservalue' => '']);
}
$route = route('settings.index', [], false);
$route = route('settings.index', []);
return redirect($route)
->with([
'success' => __('app.alert.success.setting_updated'),
+7 -6
View File
@@ -22,8 +22,8 @@ class TagController extends Controller
{
$trash = (bool)$request->input('trash');
$data['apps'] = Item::ofType('tag')->orderBy('title', 'asc')->get();
$data['trash'] = Item::ofType('tag')->onlyTrashed()->get();
$data['apps'] = Item::ofType('tag')->where('id', '>', 0)->orderBy('title', 'asc')->get();
$data['trash'] = Item::ofType('tag')->where('id', '>', 0)->onlyTrashed()->get();
if($trash) {
return view('tags.trash', $data);
} else {
@@ -74,7 +74,7 @@ class TagController extends Controller
//die(print_r($request->all()));
Item::create($request->all());
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route)
->with('success', __('app.alert.success.tag_created'));
}
@@ -90,6 +90,7 @@ class TagController extends Controller
$item = Item::whereUrl($slug)->first();
//print_r($item);
$data['apps'] = $item->children()->pinned()->orderBy('order', 'asc')->get();
$data['tag'] = $item->id;
$data['all_apps'] = $item->children;
return view('welcome', $data);
}
@@ -138,7 +139,7 @@ class TagController extends Controller
Item::find($id)->update($request->all());
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route)
->with('success',__('app.alert.success.tag_updated'));
}
@@ -161,7 +162,7 @@ class TagController extends Controller
Item::find($id)->delete();
}
$route = route('tags.index', [], false);
$route = route('tags.index', []);
return redirect($route)
->with('success',__('app.alert.success.item_deleted'));
}
@@ -178,7 +179,7 @@ class TagController extends Controller
Item::withTrashed()
->where('id', $id)
->restore();
$route = route('tags.index', [], false);
$route = route('tags.index', []);
return redirect($route)
->with('success',__('app.alert.success.item_restored'));
}
+3 -3
View File
@@ -80,7 +80,7 @@ class UserController extends Controller
$user->save();
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route)
->with('success',__('app.alert.success.user_updated'));
}
@@ -150,7 +150,7 @@ class UserController extends Controller
$user->save();
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route)
->with('success',__('app.alert.success.user_updated'));
@@ -166,7 +166,7 @@ class UserController extends Controller
{
if($user->id !== 1) {
$user->delete();
$route = route('dash', [], false);
$route = route('dash', []);
return redirect($route)
->with('success',__('app.alert.success.user_deleted'));
+1 -1
View File
@@ -12,7 +12,7 @@ class TrustProxies extends Middleware
*
* @var array
*/
protected $proxies = ['192.168.0.0/16', '172.16.0.0/12','10.0.0.0/8'];
protected $proxies = ['192.168.0.0/16', '172.16.0.0/12','10.0.0.0/8', '127.0.0.1'];
/**
* The current proxy header mappings.
+25 -1
View File
@@ -7,6 +7,7 @@ use Symfony\Component\ClassLoader\ClassMapGenerator;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Builder;
use App\User;
use App\ItemTag;
use App\Application;
class Item extends Model
@@ -19,7 +20,11 @@ class Item extends Model
static::addGlobalScope('user_id', function (Builder $builder) {
$current_user = User::currentUser();
$builder->where('user_id', $current_user->id);
if($current_user) {
$builder->where('user_id', $current_user->id)->orWhere('user_id', 0);
} else {
$builder->where('user_id', 0);
}
});
}
@@ -70,6 +75,25 @@ class Item extends Model
}
public function tags()
{
$id = $this->id;
$tags = ItemTag::select('tag_id')->where('item_id', $id)->pluck('tag_id')->toArray();
$tagdetails = Item::select('id', 'title', 'url', 'pinned')->whereIn('id', $tags)->get();
//print_r($tags);
if(in_array(0, $tags)) {
$details = new Item([
"id" => 0,
"title" => __('app.dashboard'),
"url" => '',
"pinned" => 0
]);
$tagdetails->prepend($details);
}
return $tagdetails;
}
public function parents()
{
return $this->belongsToMany('App\Item', 'item_tag', 'item_id', 'tag_id');
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Relations\Pivot;
class ItemTag extends Pivot
{
}
+2 -2
View File
@@ -125,7 +125,7 @@ abstract class Search
$provider = self::providerDetails($user_search_provider);
$output .= '<div class="searchform">';
$output .= Form::open(['url' => 'search', 'method' => 'get']);
$output .= '<form action="'.url('search').'"'.getLinkTargetAttribute().' method="get">';
$output .= '<div id="search-container" class="input-container">';
$output .= '<select name="provider">';
foreach(self::providers() as $key => $searchprovider) {
@@ -136,7 +136,7 @@ abstract class Search
$output .= Form::text('q', null, ['class' => 'homesearch', 'autofocus' => 'autofocus', 'placeholder' => __('app.settings.search').'...']);
$output .= '<button type="submit">'.ucwords(__('app.settings.search')).'</button>';
$output .= '</div>';
$output .= Form::close();
$output .= '</form>';
$output .= '</div>';
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ return [
*/
'name' => env('APP_NAME', 'Heimdall'),
'version' => '2.2.0',
'version' => '2.2.1',
/*
|--------------------------------------------------------------------------
+17
View File
@@ -194,5 +194,22 @@ class SettingsSeeder extends Seeder
$setting->save();
}
if(!$home_tag = \App\Item::find(0)) {
$home_tag = new \App\Item;
$home_tag->id = 0;
$home_tag->title = 'app.dashboard';
$home_tag->pinned = 0;
$home_tag->url = '';
$home_tag->type = 1;
$home_tag->user_id = 0;
$home_tag->save();
$homeapps = \App\Item::withoutGlobalScope('user_id')->doesntHave('parents')->get();
foreach($homeapps as $app) {
if($app->id === 0) continue;
$app->parents()->attach(0);
}
}
}
}
+3 -1
View File
@@ -13,7 +13,9 @@
"bootstrap-sass": "^3.4.1",
"cross-env": "^5.2.0",
"jquery": "^3.4.1",
"laravel-mix": "^4.0.16"
"laravel-mix": "^4.0.16",
"sass": "^1.21.0",
"sass-loader": "7.*"
},
"dependencies": {
"select2": "^4.0.7"
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=c067b0b68e4516e903e1",
"/js/app.js": "/js/app.js?id=8dc4a6ea723d0df7469d"
"/css/app.css": "/css/app.css?id=e4ac968c3a08d246c3b0",
"/js/app.js": "/js/app.js?id=f5edf362209887248205"
}
+11 -2
View File
@@ -34,11 +34,19 @@ Supported applications are recognized by the title of the application as entered
[![foundationapps](https://img.shields.io/badge/dynamic/json.svg?label=Foundation%20Apps&url=https%3A%2F%2Fapps.heimdall.site%2Fstats&query=foundation_apps&colorB=3f8483&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAjCAMAAACw/5reAAAAnFBMVEUAAADu7u7u7u7u7u7u7u7x8fHu7u7u7u7u7u7u7u7u7u7u7u7r6+vu7u7v7+/u7u7t7e3v7+/v7+/u7u7u7u7u7u7u7u7u7u7u7u7u7u7v7+/u7u7p6ent7e3v7+/v7+/v7+/u7u7u7u7u7u7u7u7t7e3////u7u7u7u7u7u7u7u7w8PDw8PDt7e3u7u7t7e3s7Ozu7u7t7e3u7u4TnCP6AAAAM3RSTlMA+9n3phHw3czC088M5Y5zG6mflWdJFumyfj4sB2NeTi7hiWlDOQPGt5lsMiG9hFQntpFqxQJtAAABnElEQVQoz2WRh3KrQAxFtYWO6ZhucItrynv6/3/LFnA24c6wurpnYBkJZvXduNix6+GXTo8qWnxUPU4m2w0O1ktTozPsftiZpejGlm7C2MWUnRcWOohIo36+PaKyDZdLUOgDXvqQfaT9kwkfvP3AN18E7Kl8hkJHMHSXSSadxaTtTNjJhMkfjFHKMqGlolg4T7mtCbcq8gBCotxkwklFLIQSlQoTHnVWQqzNxYQuzpfmqGVMc5ijHK5yAuIhxbZ5p/S92RZkjv5BKs6aosSIr0JrcXBo1FtICVINKRKK6u0GnraoN84O5KbhjRwYzxCJnQCMtotkdNxjq2F7dJ2RoGuXIBTvc3ROthdmat6hZ7cOyfcxKGV+wTxBkxQxTQTzWOFny/7qS2nzx37T7nbtZj9xu7zUr/323nVy0sQnhwMJktSZrl5v7CjgSQmWi+haUCY8sH4tyc/FGSKGouS+WqBJm8U2NIE/+nLu2tzpF/xVNGy02QzRClafC/ysVpDzQJuA8xXsKl8bv+pgpXz57H9Yy3J1lQNY62wUrW+mdzrylWS0QwAAAABJRU5ErkJggg==)](https://apps.heimdall.site/applications/foundation)
## Installing
Apart from the Laravel dependencies, namely PHP >= 7.1.3, OpenSSL PHP Extension, PDO PHP Extension, Mbstring PHP Extension, Tokenizer PHP Extension, XML PHP Extension, Ctype PHP Extension and JSON PHP Extension, the only other thing Heimdall needs is sqlite support and zip support (php-zip).
Apart from the Laravel dependencies, namely PHP >= 7.1.3, OpenSSL PHP Extension, PDO PHP Extension, Filter PHP Extension, Mbstring PHP Extension, Tokenizer PHP Extension, XML PHP Extension, Ctype PHP Extension and JSON PHP Extension, the only other thing Heimdall needs is sqlite support and zip support (php-zip).
If you find you can't change the background make sure `php_fileinfo` is enabled in your php.ini. I believe it should be by default, but one user came across the issue on a windows system.
Installation is as simple as cloning the repository somewhere, or downloading and extracting the zip/tar and pointing your httpd document root to the `/public` folder. For simple testing you could just go to the folder and type `php artisan serve`
Installation is as simple as cloning the repository somewhere, or downloading and extracting the zip/tar and pointing your httpd document root to the `/public` folder.
```
cd /path/to/heimdall
cp .env.example .env
php artisan key:generate
```
For simple testing you could just go to the folder and type `php artisan serve`
There is also a multi-arch Docker which supports x86-64, armhf and arm64, instructions on how to use them at
@@ -76,6 +84,7 @@ Currently added languages are
### Apache
A `.htaccess` file ships with the app, however, a lot of apache installations disallow `.htaccess` files by default.
You will notice this due to some links not working like `/settings`.
In addition mod-rewrite needs to be enabled if it isn't already.
#### Fixes & work around options
##### - Apache global allow .htaccess
+7 -4
View File
@@ -1,5 +1,7 @@
$.when( $.ready ).then(function() {
var base = (document.querySelector('base') || {}).href;
if($('.message-container').length) {
setTimeout(
function()
@@ -58,7 +60,7 @@ $.when( $.ready ).then(function() {
var timer = 5000;
var fun = function worker() {
$.ajax({
url: '/get_stats/'+id,
url: base+'/get_stats/'+id,
dataType: 'json',
success: function(data) {
container.html(data.html);
@@ -118,7 +120,7 @@ $.when( $.ready ).then(function() {
attribute: 'data-id'
});
$.post(
'/order',
base+'/order',
{ order:idsInOrder }
);
}
@@ -173,7 +175,7 @@ $.when( $.ready ).then(function() {
data[config] = $(this).val();
});
$.post('/test_config', { data: data }, function(data) {
$.post(base+'/test_config', { data: data }, function(data) {
alert(data);
});
@@ -182,7 +184,8 @@ $.when( $.ready ).then(function() {
e.preventDefault();
var current = $(this);
var id = current.data('id');
$.get('items/pintoggle/'+id+'/true', function(data) {
var tag = current.data('tag');
$.get(base+'/items/pintoggle/'+id+'/true/'+tag, function(data) {
var inner = $(data).filter('#sortable').html();
$('#sortable').html(inner);
current.toggleClass('active');
+2
View File
@@ -79,6 +79,8 @@ return [
'apps.preview' => 'Preview',
'apps.apptype' => 'Application Type',
'dashboard' => 'Home dashboard',
'user.user_list' => 'Users',
'user.add_user' => 'Add user',
'user.username' => 'Username',
+1 -1
View File
@@ -74,7 +74,7 @@ return array (
'apps.preview' => 'Esikatsele',
'user.user_list' => 'KÄyttäjät',
'user.user_list' => 'Käyttäjät',
'user.add_user' => 'Lisää käyttäjä',
'user.username' => 'Käyttäjänimi',
'user.avatar' => 'Avatar',
+2 -2
View File
@@ -11,8 +11,8 @@
<div data-id="{{ $app->id }}" data-dataonly="{{ $app->getconfig()->dataonly ?? '0' }}" class="livestats-container{{ title_color($app->colour) }}"></div>
@endif
</div>
<a title="{{ App\Item::getApplicationDescription($app->class) }}" class="link{{ title_color($app->colour) }}"{!! $app->link_target !!} href="{{ $app->link }}"><i class="fas {{ $app->link_icon }}"></i></a>
<a title="{{ App\Item::getApplicationDescription($app->class) }}" class="link{{ title_color($app->colour) }}"{!! $app->link_target !!} href="{{ url($app->link) }}"><i class="fas {{ $app->link_icon }}"></i></a>
</div>
<a class="item-edit" href="{{ route($app->link_type.'.edit', [ $app->id ], false) }}"><i class="fas fa-pencil"></i></a>
<a class="item-edit" href="{{ route($app->link_type.'.edit', [ $app->id ]) }}"><i class="fas fa-pencil"></i></a>
</section>
+3 -3
View File
@@ -16,7 +16,7 @@
</label>
</div>
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('items.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('items.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
<div id="create" class="create">
@@ -56,7 +56,7 @@
<img src="{{ asset('storage/'.$icon) }}" />
{!! Form::hidden('icon', $icon, ['class' => 'form-control']) !!}
@else
<img src="/img/heimdall-icon-small.png" />
<img src="{{ asset('/img/heimdall-icon-small.png') }}" />
@endif
</div>
<div class="upload-btn-wrapper">
@@ -105,7 +105,7 @@
<div class="section-title">&nbsp;</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('items.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('items.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</footer>
+5 -5
View File
@@ -6,14 +6,14 @@
<div class="section-title">
{{ __('app.apps.app_list') }}
@if( isset($trash) && $trash->count() > 0 )
<a class="trashed" href="{{ route('items.index', ['trash' => true], false) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
<a class="trashed" href="{{ route('items.index', ['trash' => true]) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
@endif
</div>
<div class="module-actions">
<a href="{{ route('applist', [], false) }}" class="button"><i class="fa fa-cloud-download"></i><span>{{ __('app.buttons.downloadapps') }}</span></a>
<a href="{{ route('items.create', [], false) }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('applist', []) }}" class="button"><i class="fa fa-cloud-download"></i><span>{{ __('app.buttons.downloadapps') }}</span></a>
<a href="{{ route('items.create', []) }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
@@ -32,7 +32,7 @@
<tr>
<td>{{ $app->title }}</td>
<td><a href="{{ $app->url }}">{{ $app->link }}</a></td>
<td class="text-center"><a{{ $app->target }} href="{!! route('items.edit', [$app->id], false) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center"><a{{ $app->target }} href="{!! route('items.edit', [$app->id]) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
<button class="link" type="submit"><i class="fa fa-trash-alt"></i></button>
+1 -1
View File
@@ -16,6 +16,6 @@
</div>
<a class="link{{ title_color($item->colour) }}"{!! $item->link_target !!} href="{{ $item->link }}"><i class="fas {{ $item->link_icon }}"></i></a>
</div>
<a class="item-edit" href="{{ route($item->link_type.'.edit', [ $item->id ], false) }}"><i class="fas fa-pencil"></i></a>
<a class="item-edit" href="{{ route($item->link_type.'.edit', [ $item->id ]) }}"><i class="fas fa-pencil"></i></a>
</section>
+3 -1
View File
@@ -2,6 +2,8 @@
<script>
$( function() {
var base = (document.querySelector('base') || {}).href;
var elem = $('.color-picker')[0];
var hueb = new Huebee( elem, {
// options
@@ -59,7 +61,7 @@
$('#tile-preview .app-icon').attr('src', data.iconview);
$('#tile-preview .title').html(data.name);
if(data.config != null) {
$.get('/view/'+data.config, function(getdata) {
$.get(base+'/view/'+data.config, function(getdata) {
$('#sapconfig').html(getdata).show();
});
} else {
+2 -2
View File
@@ -7,7 +7,7 @@
Showing Deleted Applications
</div>
<div class="module-actions">
<a href="{{ route('items.index', [], false) }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('items.index', []) }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
@@ -26,7 +26,7 @@
<tr>
<td>{{ $app->title }}</td>
<td>{{ __('app.url') }}</td>
<td class="text-center"><a href="{!! route('items.restore', [$app->id], false) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center"><a href="{!! route('items.restore', [$app->id]) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
<input type="hidden" name="force" value="1" />
+15 -10
View File
@@ -26,8 +26,13 @@
<meta name="theme-color" content="#ffffff">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="{{ asset('css/app.css') }}" type="text/css" />
<link rel="stylesheet" href="{{ asset('css/app.css?v=2') }}" type="text/css" />
<script src="{{ asset('js/fontawesome.js') }}"></script>
@if(config('app.url') !== 'http://localhost')
<base href="{{ config('app.url') }}">
@else
<base href="{{ url('') }}">
@endif
</head>
<body>
<div id="app"{!! $alt_bg !!}>
@@ -40,7 +45,7 @@
<?php
$active = ((bool)$app->pinned === true) ? 'active' : '';
?>
<li>{{ $app->title }}<a class="{{ $active }}" data-id="{{ $app->id }}" href="{{ route('items.pintoggle', [$app->id], false) }}"><i class="fas fa-thumbtack"></i></a></li>
<li>{{ $app->title }}<a class="{{ $active }}" data-tag="{{ $tag ?? 0 }}" data-id="{{ $app->id }}" href="{{ route('items.pintoggle', [$app->id]) }}"><i class="fas fa-thumbtack"></i></a></li>
@endforeach
</ul>
@@ -49,8 +54,8 @@
<div class="content">
<header class="appheader">
<ul>
<li><a href="{{ route('dash', [], false) }}">Dash</a></li><li>
<a href="{{ route('items.index', [], false) }}">Items</a></li>
<li><a href="{{ route('dash', []) }}">Dash</a></li><li>
<a href="{{ route('items.index', []) }}">Items</a></li>
</ul>
</header>
<main>
@@ -91,13 +96,13 @@
<a id="config-button" class="config" href=""><i class="fas fa-exchange"></i></a>
@endif
<a id="dash" class="config" href="{{ route('dash', [], false) }}"><i class="fas fa-th"></i></a>
<a id="dash" class="config" href="{{ route('dash', []) }}"><i class="fas fa-th"></i></a>
@if($current_user->id === 1)
<a id="users" class="config" href="{{ route('users.index', [], false) }}"><i class="fas fa-user"></i></a>
<a id="users" class="config" href="{{ route('users.index', []) }}"><i class="fas fa-user"></i></a>
@endif
<a id="items" class="config" href="{{ route('items.index', [], false) }}"><i class="fas fa-list"></i></a>
<a id="folder" class="config" href="{{ route('tags.index', [], false) }}"><i class="fas fa-tag"></i></a>
<a id="settings" class="config" href="{{ route('settings.index', [], false) }}"><i class="fas fa-cogs"></i></a>
<a id="items" class="config" href="{{ route('items.index', []) }}"><i class="fas fa-list"></i></a>
<a id="folder" class="config" href="{{ route('tags.index', []) }}"><i class="fas fa-tag"></i></a>
<a id="settings" class="config" href="{{ route('settings.index', []) }}"><i class="fas fa-cogs"></i></a>
</div>
</main>
@@ -105,7 +110,7 @@
</div>
<script src="{{ asset('js/jquery-3.3.1.min.js') }}"></script>
<script src="{{ asset('js/jquery-ui.min.js') }}"></script>
<script src="{{ asset('js/app.js?v=2') }}"></script>
<script src="{{ asset('js/app.js?v=4') }}"></script>
@yield('scripts')
</body>
+2 -2
View File
@@ -3,7 +3,7 @@
<div class="section-title">{{ __($setting->label) }}</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('settings.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('settings.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
<div class="create">
@@ -23,7 +23,7 @@
<div class="section-title">&nbsp;</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('settings.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('settings.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</footer>
+1 -1
View File
@@ -29,7 +29,7 @@
</td>
<td class="text-center">
@if((bool)$setting->system !== true)
<a href="{!! route('settings.edit', ['id' => $setting->id], false) !!}" title="{{ __('app.settings.edit') }} {!! $setting->label !!}" class="secondary"><i class="fa fa-pencil"></i></a>
<a href="{!! route('settings.edit', ['id' => $setting->id]) !!}" title="{{ __('app.settings.edit') }} {!! $setting->label !!}" class="secondary"><i class="fa fa-pencil"></i></a>
@endif
</td>
</tr>
+2 -2
View File
@@ -3,7 +3,7 @@
<div class="section-title">{{ __('app.apps.add_tag') }}</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('tags.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('tags.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
<div id="create" class="create">
@@ -59,7 +59,7 @@
<div class="section-title">&nbsp;</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('tags.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('tags.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</footer>
+4 -4
View File
@@ -6,13 +6,13 @@
<div class="section-title">
{{ __('app.apps.tag_list') }}
@if( isset($trash) && $trash->count() > 0 )
<a class="trashed" href="{{ route('tags.index', ['trash' => true], false) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
<a class="trashed" href="{{ route('tags.index', ['trash' => true]) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
@endif
</div>
<div class="module-actions">
<a href="{{ route('tags.create', [], false) }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('tags.create', []) }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
@@ -31,7 +31,7 @@
<tr>
<td>{{ $app->title }}</td>
<td><a{{ $app->target }} href="/tag/{{ $app->url }}">{{ $app->link }}</a></td>
<td class="text-center"><a href="{!! route('tags.edit', [$app->id], false) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center"><a href="{!! route('tags.edit', [$app->id]) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['tags.destroy', $app->id],'style'=>'display:inline']) !!}
<button class="link" type="submit"><i class="fa fa-trash-alt"></i></button>
+2 -2
View File
@@ -7,7 +7,7 @@
Showing Deleted Applications
</div>
<div class="module-actions">
<a href="{{ route('tags.index', [], false) }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('tags.index', []) }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
@@ -26,7 +26,7 @@
<tr>
<td>{{ $app->title }}</td>
<td>{{ __('app.url') }}</td>
<td class="text-center"><a href="{!! route('tags.restore', [ $app->id ], false) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center"><a href="{!! route('tags.restore', [ $app->id ]) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['tags.destroy', $app->id],'style'=>'display:inline']) !!}
<input type="hidden" name="force" value="1" />
+2 -2
View File
@@ -3,7 +3,7 @@
<div class="section-title">{{ __('app.user.add_user') }}</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('users.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('users.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
<div id="create" class="create">
@@ -88,7 +88,7 @@
<div class="section-title">&nbsp;</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('users.index', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('users.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</footer>
+4 -4
View File
@@ -6,13 +6,13 @@
<div class="section-title">
{{ __('app.user.user_list') }}
@if( isset($trash) && $trash->count() > 0 )
<a class="trashed" href="{{ route('users.index', ['trash' => true], false) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
<a class="trashed" href="{{ route('users.index', ['trash' => true]) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
@endif
</div>
<div class="module-actions">
<a href="{{ route('users.create', [], false) }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash', [], false) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('users.create', []) }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
@@ -39,7 +39,7 @@
<a href="{{ route('user.autologin', $user->autologin) }}">{{ route('user.autologin', $user->autologin) }}</a>
@endif
</td>
<td class="text-center"><a{{ $user->target }} href="{!! route('users.edit', [$user->id], false) !!}" title="{{ __('user.settings.edit') }} {!! $user->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center"><a{{ $user->target }} href="{!! route('users.edit', [$user->id]) !!}" title="{{ __('user.settings.edit') }} {!! $user->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center">
@if($user->id !== 1)
{!! Form::open(['method' => 'DELETE','route' => ['users.destroy', $user->id],'style'=>'display:inline']) !!}
+2 -2
View File
@@ -7,7 +7,7 @@
Showing Deleted Applications
</div>
<div class="module-actions">
<a href="{{ route('items.index', [], false) }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
<a href="{{ route('items.index', []) }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
@@ -26,7 +26,7 @@
<tr>
<td>{{ $app->title }}</td>
<td>{{ __('app.url') }}</td>
<td class="text-center"><a href="{!! route('items.restore', [$app->id], false) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center"><a href="{!! route('items.restore', [$app->id]) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
<input type="hidden" name="force" value="1" />
+1 -1
View File
@@ -10,7 +10,7 @@
<div class="alert alert-danger">
<p>{!! __('app.dash.no_apps',
[
'link1' => '<a href="'.route('items.create', [], false).'">'.__('app.dash.link1').'</a>',
'link1' => '<a href="'.route('items.create', []).'">'.__('app.dash.link1').'</a>',
'link2' => '<a id="pin-item" href="">'.__('app.dash.link2').'</a>'
]) !!}</p>
</div>
+5 -1
View File
@@ -13,6 +13,10 @@ use Illuminate\Http\Request;
|
*/
if(\Config::get('app.url') !== 'http://localhost') {
URL::forceRootUrl(\Config::get('app.url'));
}
Route::get('/userselect/{user}', 'Auth\LoginController@setUser')->name('user.set');
Route::get('/userselect', 'UserController@selectUser')->name('user.select');
Route::get('/autologin/{uuid}', 'Auth\LoginController@autologin')->name('user.autologin');
@@ -35,7 +39,7 @@ Route::get('tag/restore/{id}', 'TagController@restore')->name('tags.restore');
Route::get('items/pin/{id}', 'ItemController@pin')->name('items.pin');
Route::get('items/restore/{id}', 'ItemController@restore')->name('items.restore');
Route::get('items/unpin/{id}', 'ItemController@unpin')->name('items.unpin');
Route::get('items/pintoggle/{id}/{ajax?}', 'ItemController@pinToggle')->name('items.pintoggle');
Route::get('items/pintoggle/{id}/{ajax?}/{tag?}', 'ItemController@pinToggle')->name('items.pintoggle');
Route::post('order', 'ItemController@setOrder')->name('items.order');
Route::post('appload', 'ItemController@appload')->name('appload');
+1 -1
View File
@@ -11,7 +11,7 @@ let mix = require('laravel-mix');
|
*/
mix.scripts([
mix.babel([
//'resources/assets/js/jquery-ui.min.js',
'resources/assets/js/huebee.js',
'resources/assets/js/app.js'
+6400
View File
File diff suppressed because it is too large Load Diff