Merge pull request #18 from linuxserver/v1.2

V1.2
This commit is contained in:
KodeStar 2018-02-07 22:27:34 +00:00 committed by GitHub
commit 7b5bc24a6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 1095 additions and 159 deletions

2
.gitignore vendored
View file

@ -8,3 +8,5 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
storage/app/public/.DS_Store

View file

@ -1,5 +1,19 @@
# Release Notes
## v1.1.2 (2018-02-05)
### Added
- Translation support
- Initial "Supported" application support
### Changed
- button layout and behaviour
### Fixed
- Bottom of button too short in some browsers
- Icon not loading back in when required fields not filled in
## v1.1.0 (2018-02-05)
### Added

View file

@ -138,11 +138,20 @@ class ItemController extends Controller
'icon' => $path
]);
}
$config = json_encode($request->input('config'));
if($config) {
$request->merge([
'description' => $config
]);
}
//die(print_r($request->input('config')));
Item::create($request->all());
return redirect()->route('dash')
->with('success','Item created successfully');
->with('success', __('alert.success.item_created'));
}
/**
@ -197,7 +206,7 @@ class ItemController extends Controller
Item::find($id)->update($request->all());
return redirect()->route('dash')
->with('success','Item updated successfully');
->with('success',__('alert.success.item_updated'));
}
/**
@ -219,7 +228,7 @@ class ItemController extends Controller
}
return redirect()->route('items.index')
->with('success','Item deleted successfully');
->with('success',__('alert.success.item_deleted'));
}
/**
@ -235,6 +244,26 @@ class ItemController extends Controller
->where('id', $id)
->restore();
return redirect()->route('items.index')
->with('success','Item restored successfully');
->with('success',__('alert.success.item_restored'));
}
/**
* Return details for supported apps
*
* @return Json
*/
public function appload(Request $request)
{
$app = $request->input('app');
if($app) {
$all_supported = Item::supportedList();
$app_details = new $all_supported[$app];
}
$output['icon'] = $app_details->icon();
$output['colour'] = $app_details->defaultColour();
$output['config'] = $app_details->configDetails();
return json_encode($output);
}
}

View file

@ -40,7 +40,7 @@ class SettingsController extends Controller
]);
} else {
return redirect()->route('settings.list')->with([
'error' => 'This Setting does not exist.',
'error' => __('app.alert.error.not_exist'),
]);
}
}
@ -74,11 +74,11 @@ class SettingsController extends Controller
$setting->save();
return redirect()->route('settings.index')->with([
'success' => 'You have successfully edited this Setting!',
'success' => __('app.alert.success.setting_updated'),
]);
} else {
return redirect()->route('settings.index')->with([
'error' => 'This Setting does not exist.',
'error' => __('app.alert.error.not_exist'),
]);
}
}
@ -95,7 +95,7 @@ class SettingsController extends Controller
$setting->save();
}
return redirect()->route('settings.index')->with([
'success' => 'You have successfully edited this Setting!',
'success' => __('app.alert.success.setting_updated'),
]);
}

View file

@ -13,6 +13,7 @@ class VerifyCsrfToken extends Middleware
*/
protected $except = [
//
'order'
'order',
'appload'
];
}

View file

@ -26,8 +26,14 @@ class Item extends Model
public static function supportedList()
{
return [
'NZBGet' => App\SupportedApps\Nzbget::class,
'Plex' => App\SupportedApps\Plex::class,
'Duplicati' => \App\SupportedApps\Duplicati::class,
'Emby' => \App\SupportedApps\Emby::class,
'NZBGet' => \App\SupportedApps\Nzbget::class,
'pFsense' => \App\SupportedApps\Pfsense::class,
'Pihole' => \App\SupportedApps\Pihole::class,
'Plex' => \App\SupportedApps\Plex::class,
'UniFi' => \App\SupportedApps\Unifi::class,
'Portainer' => \App\SupportedApps\Portainer::class,
];
}
public static function supportedOptions()
@ -45,4 +51,19 @@ class Item extends Model
{
return $query->where('pinned', 1);
}
public function getConfigAttribute()
{
$output = null;
if(isset($this->description) && !empty($this->description)){
$output = json_decode($this->description);
if(isset($output->type) && !empty($output->type)) {
$class = $output->type;
$sap = new $class();
$view = $sap->configDetails();
}
$output->view = $view;
}
return (object)$output;
}
}

View file

@ -46,6 +46,9 @@ class AppServiceProvider extends ServiceProvider
} else {
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true));
}
$lang = Setting::fetch('language');
\App::setLocale($lang);
}
view()->share('alt_bg', $alt_bg);

View file

@ -15,6 +15,10 @@ class Setting extends Model
*/
protected $table = 'settings';
protected $fillable = [
'id', 'group_id', 'key', 'type', 'options', 'label', 'value', 'order', 'system'
];
/**
* Tell the Model this Table doesn't support timestamps.
*
@ -45,28 +49,28 @@ class Setting extends Model
switch($this->type) {
case 'image':
if(!empty($this->value)) {
$value = '<a href="'.asset('storage/'.$this->value).'" title="View" target="_blank">View</a>';
$value = '<a href="'.asset('storage/'.$this->value).'" title="'.__('app.settings.view').'" target="_blank">'.__('app.settings.view').'</a>';
} else {
$value = '- not set -';
$value = __('app.options.none');
}
break;
case 'boolean':
if((bool)$this->value === true) {
$value = 'Yes';
$value = __('app.options.yes');
} else {
$value = 'No';
$value = __('app.options.no');
}
break;
case 'select':
if(!empty($this->value) && $this->value !== 'none') {
$options = (array)json_decode($this->options);
$value = $options[$this->value];
$value = __($options[$this->value]);
} else {
$value = '- not set -';
$value = __('app.options.none');
}
break;
default:
$value = $this->value;
$value = __($this->value);
break;
}
@ -80,11 +84,11 @@ class Setting extends Model
case 'image':
$value = '';
if(isset($this->value) && !empty($this->value)) {
$value .= '<a class="setting-view-image" href="'.asset('storage/'.$this->value).'" title="View" target="_blank"><img src="'.asset('storage/'.$this->value).'" /></a>';
$value .= '<a class="setting-view-image" href="'.asset('storage/'.$this->value).'" title="'.__('app.settings.view').'" target="_blank"><img src="'.asset('storage/'.$this->value).'" /></a>';
}
$value .= Form::file('value', ['class' => 'form-control']);
if(isset($this->value) && !empty($this->value)) {
$value .= '<a class="settinglink" href="'.route('settings.clear', $this->id).'" title="Remove">Reset back to default</a>';
$value .= '<a class="settinglink" href="'.route('settings.clear', $this->id).'" title="'.__('app.settings.remove').'">'.__('app.settings.reset').'</a>';
}
break;
@ -102,6 +106,9 @@ class Setting extends Model
break;
case 'select':
$options = json_decode($this->options);
foreach($options as $key => $opt) {
$options->$key = __($opt);
}
$value = Form::select('value', $options, null, ['class' => 'form-control']);
break;
default:
@ -199,8 +206,8 @@ class Setting extends Model
$output .= '<div class="searchform">';
$output .= Form::open(['url' => $url, 'method' => 'get']);
$output .= '<div class="input-container">';
$output .= Form::text($var, null, ['class' => 'homesearch', 'placeholder' => $name.' search...']);
$output .= '<button type="submit">Search</button>';
$output .= Form::text($var, null, ['class' => 'homesearch', 'placeholder' => __($name).' '.__('app.settings.search').'...']);
$output .= '<button type="submit">'.ucwords(__('app.settings.search')).'</button>';
$output .= '</div>';
$output .= Form::close();
$output .= '</div>';

View file

@ -3,5 +3,9 @@
interface Applications {
public function defaultColour();
public function icon();
public function configDetails();
}

View file

@ -0,0 +1,16 @@
<?php namespace App\SupportedApps;
class Duplicati implements Contracts\Applications {
public function defaultColour()
{
return '#222';
}
public function icon()
{
return 'supportedapps/duplicati.png';
}
public function configDetails()
{
return null;
}
}

View file

@ -0,0 +1,16 @@
<?php namespace App\SupportedApps;
class Emby implements Contracts\Applications {
public function defaultColour()
{
return '#222';
}
public function icon()
{
return 'supportedapps/emby.png';
}
public function configDetails()
{
return null;
}
}

View file

@ -1,8 +1,19 @@
<?php namespace App\SupportedApps;
class Nzbget implements Contracts\Applications {
public function defaultColour()
{
return '#ccc';
return '#124019';
}
public function icon()
{
return 'supportedapps/nzbget.png';
}
public function configDetails()
{
//return 'nzbget';
return null;
}
}

View file

@ -0,0 +1,16 @@
<?php namespace App\SupportedApps;
class Pfsense implements Contracts\Applications {
public function defaultColour()
{
return '#222';
}
public function icon()
{
return 'supportedapps/pfsense.png';
}
public function configDetails()
{
return null;
}
}

View file

@ -0,0 +1,16 @@
<?php namespace App\SupportedApps;
class Pihole implements Contracts\Applications {
public function defaultColour()
{
return '#222';
}
public function icon()
{
return 'supportedapps/pihole.png';
}
public function configDetails()
{
return null;
}
}

View file

@ -3,6 +3,14 @@
class Plex implements Contracts\Applications {
public function defaultColour()
{
return '#ccc';
return '#222';
}
public function icon()
{
return 'supportedapps/plex.png';
}
public function configDetails()
{
return null;
}
}

View file

@ -0,0 +1,16 @@
<?php namespace App\SupportedApps;
class Portainer implements Contracts\Applications {
public function defaultColour()
{
return '#222';
}
public function icon()
{
return 'supportedapps/portainer.png';
}
public function configDetails()
{
return null;
}
}

View file

@ -0,0 +1,16 @@
<?php namespace App\SupportedApps;
class Unifi implements Contracts\Applications {
public function defaultColour()
{
return '#222';
}
public function icon()
{
return 'supportedapps/unifi.png';
}
public function configDetails()
{
return null;
}
}

View file

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

View file

@ -14,29 +14,39 @@ class SettingsSeeder extends Seeder
public function run()
{
// Groups
if(!SettingGroup::find(1)) {
if(!$setting_group = SettingGroup::find(1)) {
$setting_group = new SettingGroup;
$setting_group->id = 1;
$setting_group->title = 'System';
$setting_group->title = 'app.settings.system';
$setting_group->order = 0;
$setting_group->save();
}
if(!SettingGroup::find(2)) {
$setting_group = new SettingGroup;
$setting_group->id = 2;
$setting_group->title = 'Appearance';
$setting_group->order = 1;
} else {
$setting_group->title = 'app.settings.system';
$setting_group->save();
}
if(!SettingGroup::find(3)) {
if(!$setting_group = SettingGroup::find(2)) {
$setting_group = new SettingGroup;
$setting_group->id = 2;
$setting_group->title = 'app.settings.appearance';
$setting_group->order = 1;
$setting_group->save();
} else {
$setting_group->title = 'app.settings.appearance';
$setting_group->save();
}
if(!$setting_group = SettingGroup::find(3)) {
$setting_group = new SettingGroup;
$setting_group->id = 3;
$setting_group->title = 'Miscellaneous';
$setting_group->title = 'app.settings.miscellaneous';
$setting_group->order = 2;
$setting_group->save();
} else {
$setting_group->title = 'app.settings.miscellaneous';
$setting_group->save();
}
if($version = Setting::find(1)) {
$version->label = 'app.settings.version';
$version->value = config('app.version');
$version->save();
} else {
@ -45,37 +55,45 @@ class SettingsSeeder extends Seeder
$setting->group_id = 1;
$setting->key = 'version';
$setting->type = 'text';
$setting->label = 'Version';
$setting->label = 'app.settings.version';
$setting->value = config('app.version');
$setting->system = true;
$setting->save();
}
if(!Setting::find(2)) {
if(!$setting = Setting::find(2)) {
$setting = new Setting;
$setting->id = 2;
$setting->group_id = 2;
$setting->key = 'background_image';
$setting->type = 'image';
$setting->label = 'Background Image';
$setting->label = 'app.settings.background_image';
$setting->save();
} else {
$setting->label = 'app.settings.background_image';
$setting->save();
}
if(!Setting::find(3)) {
if(!$setting = Setting::find(3)) {
$setting = new Setting;
$setting->id = 3;
$setting->group_id = 3;
$setting->key = 'homepage_search';
$setting->type = 'boolean';
$setting->label = 'Homepage Search';
$setting->label = 'app.settings.homepage_search';
$setting->save();
} else {
$setting->label = 'app.settings.homepage_search';
$setting->save();
}
if(!Setting::find(4)) {
$options = json_encode([
'none' => '- not set -',
'google' => 'Google',
'ddg' => 'DuckDuckGo',
'bing' => 'Bing'
]);
$options = json_encode([
'none' => 'app.options.none',
'google' => 'app.options.google',
'ddg' => 'app.options.ddg',
'bing' => 'app.options.bing'
]);
if(!$setting = Setting::find(4)) {
$setting = new Setting;
$setting->id = 4;
@ -83,9 +101,38 @@ class SettingsSeeder extends Seeder
$setting->key = 'search_provider';
$setting->type = 'select';
$setting->options = $options;
$setting->label = 'Search Provider';
$setting->label = 'app.settings.search_provider';
$setting->save();
} else {
$setting->options = $options;
$setting->label = 'app.settings.search_provider';
$setting->save();
}
$language_options = json_encode([
'de' => 'Deutsch (German)',
'en' => 'English',
'fi' => 'Suomi (Finnish)',
'fr' => 'Français (French)',
'sv' => 'Svenska (Swedish)',
'es' => 'Español (Spanish)',
]);
if($languages = Setting::find(5)) {
$languages->options = $language_options;
$languages->save();
} else {
$setting = new Setting;
$setting->id = 5;
$setting->group_id = 1;
$setting->key = 'language';
$setting->type = 'select';
$setting->label = 'app.settings.language';
$setting->options = $language_options;
$setting->value = 'en';
$setting->save();
}
}
}

138
public/css/app.css vendored
View file

@ -724,7 +724,7 @@ body {
}
div.create {
padding: 30px;
padding: 30px 15px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
@ -733,7 +733,7 @@ div.create {
}
div.create .input {
width: 260px;
width: 280px;
margin: 20px;
}
@ -877,11 +877,25 @@ input:checked + .slider:before {
}
}
@keyframes autofill {
to {
background: #f5f5f5;
color: #fff;
}
}
input:-webkit-autofill {
-webkit-animation-name: autofill;
-webkit-animation-fill-mode: both;
}
input:autofill {
-webkit-animation-name: autofill;
animation-name: autofill;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
button.link {
border: none;
-webkit-appearance: none;
@ -937,6 +951,7 @@ a.settinglink {
-webkit-box-shadow: 0px 0px 5px 0 rgba(0, 0, 0, 0.4);
box-shadow: 0px 0px 5px 0 rgba(0, 0, 0, 0.4);
overflow: hidden;
position: relative;
}
.searchform input {
@ -949,12 +964,12 @@ a.settinglink {
.searchform button {
position: absolute;
right: 14px;
top: 14px;
right: 0px;
top: 0px;
border: none;
font-size: 16px;
padding: 7px 15px;
line-height: 37px;
line-height: 38px;
font-weight: 500;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
@ -963,6 +978,119 @@ a.settinglink {
background: #d64d55;
}
.ui-autocomplete {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
padding: 4px 0;
margin: 0 0 10px 25px;
list-style: none;
background-color: #ffffff;
border-color: #ccc;
border-color: rgba(0, 0, 0, 0.2);
border-style: solid;
border-width: 1px;
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
}
.ui-menu-item {
display: block;
padding: 3px 15px;
clear: both;
font-weight: normal;
line-height: 18px;
color: #555555;
white-space: nowrap;
text-decoration: none;
}
.ui-state-hover,
.ui-state-active {
font-weight: 700;
}
#appimage img {
max-width: 150px;
}
#sapconfig {
display: none;
width: 100%;
}
#sapconfig h2 {
background: #f2f3f6;
padding: 18px 25px;
margin-left: -15px;
width: calc(100% + 30px);
/* margin-right: -30px; */
border-top: 1px solid #dbdce3;
border-bottom: 1px solid #dbdce3;
font-size: 18px;
color: #5b5b5b;
font-weight: 500;
}
#sapconfig .items {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
hr {
margin: 23px 0 18px;
height: 0;
border-style: none;
border-width: 0;
border-top: 1px solid #eaeaea;
border-bottom: 1px solid #fff;
}
.upload-btn-wrapper {
position: relative;
overflow: hidden;
display: inline-block;
}
.btn {
border: none;
color: white;
background-color: #d64d55;
padding: 8px 12px;
border-radius: 8px;
font-size: 16px;
}
.upload-btn-wrapper input[type=file] {
font-size: 100px;
position: absolute;
left: 0;
top: 0;
opacity: 0;
}
.icon-container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.icon-container img {
margin-right: 15px;
}
/*! Huebee v2.0.0
http://huebee.buzz
---------------------------------------------- */

5
public/js/app.js vendored
View file

@ -34,11 +34,6 @@ $.when( $.ready ).then(function() {
$("#sortable").sortable("disable");
$('.color-picker').each( function( i, elem ) {
var hueb = new Huebee( elem, {
// options
});
});
$('#app').on('click', '#config-button', function(e) {
e.preventDefault();
var app = $('#app');

View file

@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=2102f4e7317cba78bff5",
"/js/app.js": "/js/app.js?id=2dffa24cf7255229e085"
"/css/app.css": "/css/app.css?id=4f5b9f5ba0f1f57405c8",
"/js/app.js": "/js/app.js?id=559585a774e3f088503a"
}

View file

@ -1,7 +1,6 @@
![alt text](https://i.imgur.com/aUpMns5.jpg)
## About
Heimdall is a way to organise all those links to your most used web sites and web applications in a simple way.
Simplicity is the key to Heimdall.
@ -12,11 +11,26 @@ Why not use it as your browser start page? It even has the ability to include a
If you want to see a quick video of it in use, go to https://drive.google.com/file/d/1cijXgmjem_q2OfKMp36qVuXRiyOzvhWC/view
## Installing
Apart from the Laravel dependencies, namely PHP >= 7.0.0, OpenSSL PHP Extension, PDO PHP Extension, Mbstring PHP Extension, Tokenizer PHP Extension and XML PHP Extension, the only other thing Heimdall needs is sqlite support.
Installation is as simple as cloning the repository somewhere, or downloading and extracting the zip/tar and pointing your httpd document root to it. For simple testing you could just go to the folder and type `php artisan serve`
## Languages
The app has been translated into several languages, however the quality of the translations could do with work, if you would like to improve them or help with other translations they are stored in /resources/lang/
To create a new one, create a new folder with the ISO 3166-1 alpha-2 code as the name, copy app.php from /resources/lang/en/app.php into your new folder and replace the english strings.
When you are finished create a pull request.
Currently added languages are
- English
- German
- Finnish
- French
- Swedish
- Spanish
## Web Server Configuration
### Apache

View file

@ -25,11 +25,6 @@ $.when( $.ready ).then(function() {
$("#sortable").sortable("disable");
$('.color-picker').each( function( i, elem ) {
var hueb = new Huebee( elem, {
// options
});
});
$('#app').on('click', '#config-button', function(e) {
e.preventDefault();
var app = $('#app');

View file

@ -393,11 +393,11 @@ body {
}
}
div.create {
padding: 30px;
padding: 30px 15px;
display: flex;
flex-wrap: wrap;
.input {
width: 260px;
width: 280px;
margin: 20px;
label:not(.switch) {
width: 100%;
@ -517,17 +517,27 @@ div.create {
}
@-webkit-keyframes autofill {
to {
background:#f5f5f5;
color:#fff;
}
}
input:-webkit-autofill {
-webkit-animation-name: autofill;
-webkit-animation-fill-mode: both;
}
to {
background:#f5f5f5;
color:#fff;
}
}
@keyframes autofill {
to {
background:#f5f5f5;
color:#fff;
}
}
input:-webkit-autofill {
-webkit-animation-name: autofill;
-webkit-animation-fill-mode: both;
}
input:autofill {
animation-name: autofill;
animation-fill-mode: both;
}
button.link {
border: none;
appearance: none;
@ -570,7 +580,8 @@ div.create {
background: white;
border-radius: 5px;
box-shadow: 0px 0px 5px 0 rgba(0,0,0,0.4);
overflow: hidden;
overflow: hidden;
position: relative;
}
input {
padding: 17px 15px;
@ -581,12 +592,12 @@ div.create {
}
button {
position: absolute;
right: 14px;
top: 14px;
right: 0px;
top: 0px;
border: none;
font-size: 16px;
padding: 7px 15px;
line-height: 37px;
line-height: 38px;
font-weight: 500;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
@ -594,4 +605,116 @@ div.create {
text-transform: uppercase;
background: $app-red;
}
}
.ui-autocomplete {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
padding: 4px 0;
margin: 0 0 10px 25px;
list-style: none;
background-color: #ffffff;
border-color: #ccc;
border-color: rgba(0, 0, 0, 0.2);
border-style: solid;
border-width: 1px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
}
.ui-menu-item {
display: block;
padding: 3px 15px;
clear: both;
font-weight: normal;
line-height: 18px;
color: #555555;
white-space: nowrap;
text-decoration: none;
}
.ui-state-hover, .ui-state-active {
font-weight: 700;
}
#appimage {
img {
max-width: 150px;
}
}
#sapconfig {
display: none;
width: 100%;
h2 {
background: #f2f3f6;
padding: 18px 25px;
margin-left: -15px;
width: calc(100% + 30px);
/* margin-right: -30px; */
border-top: 1px solid #dbdce3;
border-bottom: 1px solid #dbdce3;
font-size: 18px;
color: #5b5b5b;
font-weight: 500;
}
.items {
display: flex;
}
}
hr {
margin: 23px 0 18px;
height: 0;
border-style: none;
border-width: 0;
border-top: 1px solid #eaeaea;
border-bottom: 1px solid #fff;
}
.upload-btn-wrapper {
position: relative;
overflow: hidden;
display: inline-block;
}
.btn {
border: none;
color: white;
background-color: $app-red;
padding: 8px 12px;
border-radius: 8px;
font-size: 16px;
}
.upload-btn-wrapper input[type=file] {
font-size: 100px;
position: absolute;
left: 0;
top: 0;
opacity: 0;
}
.icon-container {
display: flex;
align-items: center;
img {
margin-right: 15px;
}
}

58
resources/lang/de/app.php Normal file
View file

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'System',
'settings.appearance' => 'Aussehen',
'settings.miscellaneous' => 'Sonstiges',
'settings.version' => 'Ausführung',
'settings.background_image' => 'Hintergrundbild',
'settings.homepage_search' => 'Homepage Suchen',
'settings.search_provider' => 'Suchanbieter',
'settings.language' => 'Sprache',
'settings.reset' => 'Zurücksetzen auf Standard zurück',
'settings.remove' => 'Entfernen',
'settings.search' => 'suche',
'settings.no_items' => 'Keine Elemente gefunden',
'settings.label' => 'Etikett',
'settings.value' => 'Wert',
'settings.edit' => 'Bearbeiten',
'settings.view' => 'Ansicht',
'options.none' => '- nicht festgelegt -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Ja',
'options.no' => 'Nein',
'buttons.save' => 'Speichern',
'buttons.cancel' => 'Abbrechen',
'buttons.add' => 'Hinzufügen',
'buttons.upload' => 'Hochladen einer Datei',
'dash.pin_item' => 'Element auf dem Dashboard anheften',
'dash.no_apps' => 'Derzeit gibt es keine angeheftete Anwendungen :link1 oder :link2',
'dash.link1' => 'Hinzufügen einer Anwendung hier',
'dash.link2' => 'Heften Sie ein Element auf dem Armaturenbrett',
'dash.pinned_items' => 'Angeheftete Elemente',
'apps.app_list' => 'Anwendungsliste',
'apps.view_trash' => 'Ansicht Papierkorb',
'apps.add_application' => 'Anwendung hinzufügen',
'apps.application_name' => 'Anwendungsname',
'apps.colour' => 'Farbe',
'apps.icon' => 'Symbol',
'apps.pinned' => 'Festgesteckt',
'apps.title' => 'Titel',
'apps.hex' => 'Hex-Farbe',
'apps.username' => 'Benutzername',
'apps.password' => 'Passwort',
'apps.config' => 'Konfig',
'url' => 'Url',
'title' => 'Titel',
'delete' => 'Löschen',
'optional' => 'Wahlweise',
'restore' => 'Wiederherstellen',
'alert.success.item_created' => 'Element erfolgreich erstellt',
'alert.success.item_updated' => 'Artikel erfolgreich aktualisiert',
'alert.success.item_deleted' => 'Element erfolgreich gelöscht',
'alert.success.item_restored' => 'Element erfolgreich wiederhergestellt',
'alert.success.setting_updated' => 'Sie haben diese Einstellung erfolgreich bearbeitet',
'alert.error.not_exist' => 'Diese Einstellung existiert nicht.',
);

78
resources/lang/en/app.php Normal file
View file

@ -0,0 +1,78 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| App Language Lines
|--------------------------------------------------------------------------
|
*/
'settings.system' => 'System',
'settings.appearance' => 'Appearance',
'settings.miscellaneous' => 'Miscellaneous',
'settings.version' => 'Version',
'settings.background_image' => 'Background Image',
'settings.homepage_search' => 'Homepage Search',
'settings.search_provider' => 'Search Provider',
'settings.language' => 'Language',
'settings.reset' => 'Reset back to default',
'settings.remove' => 'Remove',
'settings.search' => 'search',
'settings.no_items' => 'No items found',
'settings.label' => 'Label',
'settings.value' => 'Value',
'settings.edit' => 'Edit',
'settings.view' => 'View',
'options.none' => '- not set -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Yes',
'options.no' => 'No',
'buttons.save' => 'Save',
'buttons.cancel' => 'Cancel',
'buttons.add' => 'Add',
'buttons.upload' => 'Upload a file',
'dash.pin_item' => 'Pin item to dashboard',
'dash.no_apps' => 'There are currently no pinned applications, :link1 or :link2',
'dash.link1' => 'Add an application here',
'dash.link2' => 'Pin an item to the dash',
'dash.pinned_items' => 'Pinned Items',
'apps.app_list' => 'Application list',
'apps.view_trash' => 'View trash',
'apps.add_application' => 'Add application',
'apps.application_name' => 'Application name',
'apps.colour' => 'Colour',
'apps.icon' => 'Icon',
'apps.pinned' => 'Pinned',
'apps.title' => 'Title',
'apps.hex' => 'Hex colour',
'apps.username' => 'Username',
'apps.password' => 'Password',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Title',
'delete' => 'Delete',
'optional' => 'Optional',
'restore' => 'Restore',
'alert.success.item_created' => 'Item created successfully',
'alert.success.item_updated' => 'Item updated successfully',
'alert.success.item_deleted' => 'Item deleted successfully',
'alert.success.item_restored' => 'Item restored successfully',
'alert.success.setting_updated' => 'You have successfully edited this Setting',
'alert.error.not_exist' => 'This Setting does not exist.',
];

58
resources/lang/es/app.php Normal file
View file

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Sistema',
'settings.appearance' => 'Apariencia',
'settings.miscellaneous' => 'Miscelánea',
'settings.version' => 'Versión',
'settings.background_image' => 'Imagen De Fondo',
'settings.homepage_search' => 'Página De Inicio De Búsqueda',
'settings.search_provider' => 'Proveedor de búsqueda',
'settings.language' => 'Idioma',
'settings.reset' => 'Restablecer a predeterminado',
'settings.remove' => 'Quitar',
'settings.search' => 'búsqueda',
'settings.no_items' => 'No se encontraron elementos',
'settings.label' => 'Etiqueta',
'settings.value' => 'Valor',
'settings.edit' => 'Editar',
'settings.view' => 'Ver',
'options.none' => '- no establecido -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Sí',
'options.no' => 'No',
'buttons.save' => 'Guardar',
'buttons.cancel' => 'Cancelar',
'buttons.add' => 'Añadir',
'buttons.upload' => 'Cargar un archivo',
'dash.pin_item' => 'Pin elemento al tablero',
'dash.no_apps' => 'Actualmente no hay anclados aplicaciones :link1 o :link2',
'dash.link1' => 'Agregue una aplicación aquí',
'dash.link2' => 'Pin de un elemento en el tablero',
'dash.pinned_items' => 'Elementos Anclados',
'apps.app_list' => 'Lista de aplicaciones',
'apps.view_trash' => 'Vista de la basura',
'apps.add_application' => 'Agregar aplicación',
'apps.application_name' => 'Nombre de la aplicación',
'apps.colour' => 'Color',
'apps.icon' => 'Icono',
'apps.pinned' => 'Fijado',
'apps.title' => 'Título',
'apps.hex' => 'Hexagonal de color',
'apps.username' => 'Nombre de usuario',
'apps.password' => 'Contraseña',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Título',
'delete' => 'Borrar',
'optional' => 'Opcional',
'restore' => 'Restaurar',
'alert.success.item_created' => 'Elemento creado con éxito',
'alert.success.item_updated' => 'Artículo actualizado con éxito',
'alert.success.item_deleted' => 'Elemento eliminado correctamente',
'alert.success.item_restored' => 'Elemento restaurado con éxito',
'alert.success.setting_updated' => 'Ha editado con éxito esta configuración',
'alert.error.not_exist' => 'Esta configuración no existe.',
);

58
resources/lang/fi/app.php Normal file
View file

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Järjestelmä',
'settings.appearance' => 'Ulkonäkö',
'settings.miscellaneous' => 'Sekalainen',
'settings.version' => 'Versio',
'settings.background_image' => 'Tausta Kuva',
'settings.homepage_search' => 'Kotisivu Haku',
'settings.search_provider' => 'Hakupalvelu',
'settings.language' => 'Kieli',
'settings.reset' => 'Palauta takaisin default',
'settings.remove' => 'Poista',
'settings.search' => 'haku',
'settings.no_items' => 'Kohteita ei löytynyt',
'settings.label' => 'Etiketti',
'settings.value' => 'Arvo',
'settings.edit' => 'Muokkaa',
'settings.view' => 'Näkymä',
'options.none' => '- ole asetettu -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Kyllä',
'options.no' => 'Ei',
'buttons.save' => 'Tallenna',
'buttons.cancel' => 'Peruuta',
'buttons.add' => 'Lisää',
'buttons.upload' => 'Lataa tiedosto',
'dash.pin_item' => 'Kiinnitä kohde kojelautaan',
'dash.no_apps' => 'Tällä hetkellä ei ole kiinnitettyjä sovelluksia :link1 tai :link2',
'dash.link1' => 'Lisää sovellus tähän',
'dash.link2' => 'Kiinnitä kohde kojelautaan',
'dash.pinned_items' => 'Kiinnitetyt Kohteet',
'apps.app_list' => 'Sovellus luettelosta',
'apps.view_trash' => 'Näytä roskakori',
'apps.add_application' => 'Lisää sovellus',
'apps.application_name' => 'Sovelluksen nimi',
'apps.colour' => 'Väri',
'apps.icon' => 'Kuvake',
'apps.pinned' => 'Puristuksiin',
'apps.title' => 'Otsikko',
'apps.hex' => 'Hex väri',
'apps.username' => 'Käyttäjätunnus',
'apps.password' => 'Salasana',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Otsikko',
'delete' => 'Poistaa',
'optional' => 'Valinnainen',
'restore' => 'Palauttaa',
'alert.success.item_created' => 'Tuote luotiin onnistuneesti',
'alert.success.item_updated' => 'Kohde on päivitetty onnistuneesti',
'alert.success.item_deleted' => 'Kohde poistettu onnistuneesti',
'alert.success.item_restored' => 'Tuote palautettiin onnistuneesti',
'alert.success.setting_updated' => 'Olet muokannut tätä asetusta',
'alert.error.not_exist' => 'Tätä asetusta ei ole olemassa.',
);

58
resources/lang/fr/app.php Normal file
View file

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Système',
'settings.appearance' => 'Apparence',
'settings.miscellaneous' => 'Divers',
'settings.version' => 'Version',
'settings.background_image' => 'Image D\'Arrière-Plan',
'settings.homepage_search' => 'La Page D\'Accueil De Recherche',
'settings.search_provider' => 'Fournisseur de recherche',
'settings.language' => 'Langue',
'settings.reset' => 'Réinitialiser aux valeurs par défaut',
'settings.remove' => 'Supprimer',
'settings.search' => 'chercher',
'settings.no_items' => 'Pas d\'articles trouvés',
'settings.label' => 'Étiquette',
'settings.value' => 'Valeur',
'settings.edit' => 'Modifier',
'settings.view' => 'Vue',
'options.none' => '- non défini -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Oui',
'options.no' => 'Non',
'buttons.save' => 'Enregistrer',
'buttons.cancel' => 'Annuler',
'buttons.add' => 'Ajouter',
'buttons.upload' => 'Télécharger un fichier',
'dash.pin_item' => 'Épingler l\'élément au tableau de bord',
'dash.no_apps' => 'Il n\'existe actuellement aucun épinglé applications :link1 ou :link2',
'dash.link1' => 'Ajouter une application ici',
'dash.link2' => 'Pin un élément au tableau de bord',
'dash.pinned_items' => 'Éléments épinglés',
'apps.app_list' => 'Liste des applications',
'apps.view_trash' => 'Voir la corbeille',
'apps.add_application' => 'Ajouter une application',
'apps.application_name' => 'Nom de l\'application',
'apps.colour' => 'Couleur',
'apps.icon' => 'Icône',
'apps.pinned' => 'Épinglé',
'apps.title' => 'Titre',
'apps.hex' => 'Hexadécimal de la couleur',
'apps.username' => 'Nom d\'utilisateur',
'apps.password' => 'Mot de passe',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Titre',
'delete' => 'Effacer',
'optional' => 'Optionnel',
'restore' => 'Restaurer',
'alert.success.item_created' => 'Élément créé avec succès',
'alert.success.item_updated' => 'Article mis à jour avec succès',
'alert.success.item_deleted' => 'Élément supprimé avec succès',
'alert.success.item_restored' => 'Élément à restaurer avec succès',
'alert.success.setting_updated' => 'Vous avez modifié ce paramètre avec succès',
'alert.error.not_exist' => 'Ce paramètre n\'existe pas.',
);

58
resources/lang/sv/app.php Normal file
View file

@ -0,0 +1,58 @@
<?php
return array (
'settings.system' => 'Systemet',
'settings.appearance' => 'Utseende',
'settings.miscellaneous' => 'Övrigt',
'settings.version' => 'Version',
'settings.background_image' => 'Bakgrundsbild',
'settings.homepage_search' => 'Startsida Sök',
'settings.search_provider' => 'Sök Leverantör',
'settings.language' => 'Språk',
'settings.reset' => 'Återställ tillbaka till standard',
'settings.remove' => 'Avlägsna',
'settings.search' => 'sök',
'settings.no_items' => 'Inga poster hittades',
'settings.label' => 'Etikett',
'settings.value' => 'Värde',
'settings.edit' => 'Ändra',
'settings.view' => 'Visa',
'options.none' => '- inte sätta -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.yes' => 'Ja',
'options.no' => 'Nej',
'buttons.save' => 'Spara',
'buttons.cancel' => 'Avbryt',
'buttons.add' => 'Lägg till',
'buttons.upload' => 'Ladda upp en fil',
'dash.pin_item' => 'Pin objekt till instrumentpanelen',
'dash.no_apps' => 'Det finns för närvarande inga fästa applikationer, :link1 eller :link2',
'dash.link1' => 'Lägg till en ansökan här',
'dash.link2' => 'Pin-ett objekt till dash',
'dash.pinned_items' => 'Fasta Objekt',
'apps.app_list' => 'Applikationslista',
'apps.view_trash' => 'Visa papperskorgen',
'apps.add_application' => 'Lägg till applikation',
'apps.application_name' => 'Ansökan namn',
'apps.colour' => 'Färg',
'apps.icon' => 'Ikonen',
'apps.pinned' => 'Nålas',
'apps.title' => 'Titel',
'apps.hex' => 'Hex-färg',
'apps.username' => 'Användarnamn',
'apps.password' => 'Lösenord',
'apps.config' => 'Config',
'url' => 'Url',
'title' => 'Titel',
'delete' => 'Radera',
'optional' => 'Frivillig',
'restore' => 'Återställa',
'alert.success.item_created' => 'Objekt som skapats',
'alert.success.item_updated' => 'Föremålet uppdaterades framgångsrikt',
'alert.success.item_deleted' => 'Objekt som har tagits bort',
'alert.success.item_restored' => 'Artikeln återställdes framgångsrikt',
'alert.success.setting_updated' => 'Du har framgångsrikt redigerat denna inställning',
'alert.error.not_exist' => 'Denna inställning existerar inte.',
);

View file

@ -1,4 +1,4 @@
<?php $addclass = (isset($ajax)) ? ' active' : ''; ?>
<section class="add-item{{ $addclass }}">
<a id="add-item" href="">Pin item to dash</a>
<a id="add-item" href="">{{ __('app.dash.pin_item') }}</a>
</section>

View file

@ -15,7 +15,7 @@
<nav class="sidenav">
<a class="close-sidenav" href=""><i class="fas fa-times-circle"></i></a>
@if(isset($all_apps))
<h2>Pinned Items</h2>
<h2>{{ __('app.dash.pinned_items') }}</h2>
<ul id="pinlist">
@foreach($all_apps as $app)
<?php
@ -56,18 +56,13 @@
@yield('content')
<div id="config-buttons">
@if(!Route::is('dash'))
<a id="dash" class="config" href="{{ route('dash') }}"><i class="fas fa-th"></i></a>
@endif
@if(!Request::is(['items', 'items/*']))
<a id="items" class="config" href="{{ route('items.index') }}"><i class="fas fa-list"></i></a>
@endif
@if(!Request::is(['settings', 'settings/*']))
<a id="settings" class="config" href="{{ route('settings.index') }}"><i class="fas fa-cogs"></i></a>
@endif
@if(Route::is('dash'))
<a id="config-button" class="config" href=""><i class="fas fa-exchange"></i></a>
@endif
<a id="dash" class="config" href="{{ route('dash') }}"><i class="fas fa-th"></i></a>
<a id="items" class="config" href="{{ route('items.index') }}"><i class="fas fa-list"></i></a>
<a id="settings" class="config" href="{{ route('settings.index') }}"><i class="fas fa-cogs"></i></a>
</div>
</main>
@ -77,6 +72,7 @@
<script>!window.jQuery && document.write('<script src="/js/jquery-3.3.1.min.js"><\/script>')</script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="{{ asset('js/app.js') }}"></script>
@yield('scripts')
</body>
</html>

View file

@ -6,4 +6,7 @@
@include('items.form')
{!! Form::close() !!}
@endsection
@section('scripts')
@include('items.scripts')
@endsection

View file

@ -6,4 +6,7 @@
@include('items.form')
{!! Form::close() !!}
@endsection
@section('scripts')
@include('items.scripts')
@endsection

View file

@ -1,9 +1,9 @@
<section class="module-container">
<header>
<div class="section-title">Add application</div>
<div class="section-title">{{ __('app.apps.add_application') }}</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button>
<a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a>
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
<div class="create">
@ -14,30 +14,17 @@
</div>-->
<div class="input">
<label>Application name *</label>
{!! Form::text('title', null, array('placeholder' => 'Title','class' => 'form-control')) !!}
<label>{{ __('app.apps.application_name') }} *</label>
{!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'id' => 'appname', 'class' => 'form-control')) !!}
<hr />
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('url', null, array('placeholder' => __('app.url'),'class' => 'form-control')) !!}
</div>
<div class="input">
<label>Colour *</label>
{!! Form::text('colour', null, array('placeholder' => 'Hex Colour','class' => 'form-control color-picker')) !!}
</div>
<div class="input">
<label>URL</label>
{!! Form::text('url', null, array('placeholder' => 'Url','class' => 'form-control')) !!}
</div>
<div class="input">
<label>Icon</label>
@if(isset($item->icon) && !empty($item->icon))
<a href="{{ asset('storage/'.$item->icon) }}">View current icon</a>
{!! Form::hidden('icon', $item->icon, ['class' => 'form-control']) !!}
@endif
<input name="file" type="file" class="form-control">
</div>
<div class="input">
<label>Pinned</label>
<label>{{ __('app.apps.colour') }} *</label>
{!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
<hr />
<label>{{ __('app.apps.pinned') }}</label>
<label class="switch">
<?php
$checked = false;
@ -49,15 +36,45 @@
<span class="slider round"></span>
</label>
</div>
<div class="input">
<label>{{ __('app.apps.icon') }}</label>
<div class="icon-container">
<div id="appimage">
@if(isset($item->icon) && !empty($item->icon) || old('icon'))
<?php
if(isset($item->icon)) $icon = $item->icon;
else $icon = old('icon');
?>
<img src="{{ asset('storage/'.$icon) }}" />
{!! Form::hidden('icon', $icon, ['class' => 'form-control']) !!}
@endif
</div>
<div class="upload-btn-wrapper">
<button class="btn">{{ __('app.buttons.upload')}} </button>
<input type="file" name="myfile" />
</div>
</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>
<div class="section-title">&nbsp;</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button>
<a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a>
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('items.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</footer>
</section>

View file

@ -4,24 +4,24 @@
<section class="module-container">
<header>
<div class="section-title">
Application list
{{ __('app.apps.app_list') }}
@if( isset($trash) && $trash->count() > 0 )
<a class="trashed" href="{{ route('items.index', ['trash' => true]) }}">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('items.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>Add</span></a>
<a href="{{ route('items.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
</div>
</header>
<table class="table table-hover">
<thead>
<tr>
<th>Title</th>
<th>Url</th>
<th class="text-center" width="100">Edit</th>
<th class="text-center" width="100">Delete</th>
<th>{{ __('app.title') }}</th>
<th>{{ __('app.url') }}</th>
<th class="text-center" width="100">{{ __('app.settings.edit') }}</th>
<th class="text-center" width="100">{{ __('app.delete') }}</th>
</tr>
</thead>
<tbody>
@ -30,7 +30,7 @@
<tr>
<td>{{ $app->title }}</td>
<td><a href="{{ $app->url }}">{{ $app->url }}</a></td>
<td class="text-center"><a href="{!! route('items.edit', $app->id) !!}" title="Edit {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center"><a 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>
@ -41,7 +41,7 @@
@else
<tr>
<td colspan="4" class="form-error text-center">
<strong>No items found</strong>
<strong>{{ __('app.settings.no_items') }}</strong>
</td>
</tr>
@endif

View file

@ -0,0 +1,34 @@
<script>
$( function() {
var elem = $('.color-picker')[0];
var hueb = new Huebee( elem, {
// options
});
var availableTags = [
<?php
$supported = App\Item::supportedOptions();
foreach($supported as $sapp) {
echo '"'.$sapp.'",';
}
?>
];
$( "#appname" ).autocomplete({
source: availableTags,
select: function( event, ui ) {
$.post('/appload', { app: ui.item.value }, function(data) {
$('#appimage').html("<img src='/storage/"+data.icon+"' /><input type='hidden' name='icon' value='"+data.icon+"' />");
$('input[name=colour]').val(data.colour);
hueb.setColor( data.colour );
$('input[name=pinned]').prop('checked', true);
if(data.config != null) {
$.get('/view/'+data.config, function(getdata) {
$('#sapconfig').html(getdata).show();
});
}
}, "json");
}
});
});
</script>

View file

@ -7,18 +7,17 @@
Showing Deleted Applications
</div>
<div class="module-actions">
<a href="{{ route('items.index') }}" title="" class="button"><i class="fa fa-ban"></i><span>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>
<table class="table table-hover">
<thead>
<tr>
<th>Title</th>
<th>Description</th>
<th>{{ __('app.title') }}</th>
<th>Url</th>
<th class="text-center" width="100">Restore</th>
<th class="text-center" width="100">Delete</th>
<th class="text-center" width="100">{{ __('app.restore') }}</th>
<th class="text-center" width="100">{{ __('app.delete') }}</th>
</tr>
</thead>
<tbody>
@ -26,9 +25,8 @@
@foreach($trash as $app)
<tr>
<td>{{ $app->title }}</td>
<td>{{ $app->description }}</td>
<td>{{ $app->url }}</td>
<td class="text-center"><a href="{!! route('items.restore', $app->id) !!}" title="Restore {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
<td>{{ __('app.url') }}</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" />
@ -40,7 +38,7 @@
@else
<tr>
<td colspan="5" class="form-error text-center">
<strong>No items found</strong>
<strong>{{ __('app.settings.no_items') }}</strong>
</td>
</tr>
@endif

View file

@ -1,9 +1,9 @@
<section class="module-container">
<header>
<div class="section-title">{{ $setting->label }}</div>
<div class="section-title">{{ __($setting->label) }}</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button>
<a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a>
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</header>
<div class="create">
@ -22,8 +22,8 @@
<footer>
<div class="section-title">&nbsp;</div>
<div class="module-actions">
<button type="submit"class="button"><i class="fa fa-save"></i><span>Save</span></button>
<a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a>
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('settings.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
</footer>

View file

@ -6,7 +6,7 @@
<section class="module-container">
<header>
<div class="section-title">
{{ $group->title }}
{{ __($group->title) }}
</div>
</header>
@ -14,22 +14,22 @@
<table class="table table-hover">
<thead>
<tr>
<th>Label</th>
<th style="width: 60%;">Value</th>
<th class="text-center" style="width: 75px;">Edit</th>
<th>{{ __('app.settings.label') }}</th>
<th style="width: 60%;">{{ __('app.settings.value') }}</th>
<th class="text-center" style="width: 75px;">{{ __('app.settings.edit') }}</th>
</tr>
</thead>
<tbody>
@if (count($group->settings) > 0)
@foreach ($group->settings as $setting)
<tr>
<td>{{ $setting->label }}</td>
<td>{{ __($setting->label) }}</td>
<td>
{!! $setting->list_value !!}
</td>
<td class="text-center">
@if((bool)$setting->system !== true)
<a href="{!! route('settings.edit', ['id' => $setting->id]) !!}" title="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>
@ -38,7 +38,7 @@
<tr>
<td colspan="3" class="form-error text-center">
<strong>No items found</strong>
<strong>{{ __('app.settings.no_items') }}</strong>
</td>
</tr>
@endif

View file

@ -0,0 +1,12 @@
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }})</h2>
<div class="items">
<input type="hidden" name="config[type]" value="\App\SupportedApps\Nzbget" />
<div class="input">
<label>{{ __('app.apps.username') }}</label>
{!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'class' => 'form-control')) !!}
</div>
<div class="input">
<label>{{ __('app.apps.password') }}</label>
{!! Form::text('config[password]', null, array('placeholder' => __('app.apps.password'), 'class' => 'form-control')) !!}
</div>
</div>

View file

@ -8,7 +8,11 @@
@else
<div class="message-container2">
<div class="alert alert-danger">
<p>There are currently no pinned Applications, <a href="{{ route('items.create') }}">Add an application here</a> or <a id="pin-item" href="">Pin an item to the dash</a></p>
<p>{!! __('app.dash.no_apps',
[
'link1' => '<a href="'.route('items.create').'">'.__('app.dash.link1').'</a>',
'link2' => '<a id="pin-item" href="">'.__('app.dash.link2').'</a>'
]) !!}</p>
</div>
</div>

View file

@ -22,6 +22,12 @@ Route::get('items/unpin/{id}', 'ItemController@unpin')->name('items.unpin');
Route::get('items/pintoggle/{id}/{ajax?}', 'ItemController@pinToggle')->name('items.pintoggle');
Route::post('order', 'ItemController@setOrder')->name('items.order');
Route::post('appload', 'ItemController@appload')->name('appload');
Route::get('view/{name_view}', function ($name_view) {
return view('supportedapps.'.$name_view);
});
/**
* Settings.
*/

View file

@ -1,3 +0,0 @@
*
!public/
!.gitignore

View file

@ -1,2 +1,2 @@
*
!.gitignore
backgrounds/
icons/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB