Merge branch 'master' into app-Mylar

This commit is contained in:
ullbergm 2018-06-10 07:39:37 -04:00 committed by GitHub
commit 6c8eeb0ced
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 96 additions and 18 deletions

View file

@ -29,6 +29,7 @@ class Item extends Model
'AirSonic' => \App\SupportedApps\AirSonic::class,
'Cardigann' => \App\SupportedApps\Cardigann::class,
'CouchPotato' => \App\SupportedApps\CouchPotato::class,
'Booksonic' => \App\SupportedApps\Booksonic::class,
'Deluge' => \App\SupportedApps\Deluge::class,
'Dokuwiki' => \App\SupportedApps\Dokuwiki::class,
'Duplicati' => \App\SupportedApps\Duplicati::class,
@ -41,9 +42,11 @@ class Item extends Model
'Jackett' => \App\SupportedApps\Jackett::class,
'Jdownloader' => \App\SupportedApps\Jdownloader::class,
'Krusader' => \App\SupportedApps\Krusader::class,
'LibreNMS' => \App\SupportedApps\LibreNMS::class,
'Lidarr' => \App\SupportedApps\Lidarr::class,
'Mcmyadmin' => \App\SupportedApps\Mcmyadmin::class,
'Medusa' => \App\SupportedApps\Medusa::class,
'MusicBrainz' => \App\SupportedApps\MusicBrainz::class,
'Mylar' => \App\SupportedApps\Mylar::class,
'NZBGet' => \App\SupportedApps\Nzbget::class,
'Netdata' => \App\SupportedApps\Netdata::class,
@ -61,6 +64,7 @@ class Item extends Model
'Portainer' => \App\SupportedApps\Portainer::class,
'Proxmox' => \App\SupportedApps\Proxmox::class,
'Radarr' => \App\SupportedApps\Radarr::class,
'Rancher' => \App\SupportedApps\Rancher::class,
'Runeaudio' => \App\SupportedApps\Runeaudio::class,
'Sabnzbd' => \App\SupportedApps\Sabnzbd::class,
'Sickrage' => \App\SupportedApps\Sickrage::class,
@ -166,10 +170,12 @@ class Item extends Model
public function getLinkTargetAttribute()
{
if((int)$this->type === 1) {
$target = Setting::fetch('window_target');
if((int)$this->type === 1 || $target === 'current') {
return '';
} else {
return ' target="heimdallapp"';
return ' target="' . $target . '"';
}
}

View file

@ -0,0 +1,12 @@
<?php namespace App\SupportedApps;
class Booksonic implements Contracts\Applications {
public function defaultColour()
{
return '#58a';
}
public function icon()
{
return 'supportedapps/booksonic.png';
}
}

View file

@ -0,0 +1,12 @@
<?php namespace App\SupportedApps;
class MusicBrainz implements Contracts\Applications {
public function defaultColour()
{
return '#a0a';
}
public function icon()
{
return 'supportedapps/musicbrainz.png';
}
}

View file

@ -0,0 +1,12 @@
<?php namespace App\SupportedApps;
class Rancher implements Contracts\Applications {
public function defaultColour()
{
return '#78c9cf';
}
public function icon()
{
return 'supportedapps/rancher.png';
}
}

View file

@ -158,9 +158,12 @@ class Transmission implements Contracts\Applications, Contracts\Livestats
private function getApiUrl()
{
$url = $this->config->url;
$config = $this->config;
$url = $config->url;
$url = rtrim($url, '/');
$apiUrl = $url.'/transmission/rpc';
return $apiUrl;
$api_url = $url.'/transmission/rpc';
return $api_url;
}
}

View file

@ -138,6 +138,27 @@ class SettingsSeeder extends Seeder
$setting->save();
}
$window_target_options = json_encode([
'current' => 'app.settings.window_target.current',
'heimdall' => 'app.settings.window_target.one',
'_blank' => 'app.settings.window_target.new',
]);
if(!$setting = Setting::find(7)) {
$setting = new Setting;
$setting->id = 7;
$setting->group_id = 3;
$setting->key = 'window_target';
$setting->type = 'select';
$setting->options = $window_target_options;
$setting->label = 'app.settings.window_target';
$setting->value = 'heimdall';
$setting->save();
} else {
$setting->options = $window_target_options;
$setting->label = 'app.settings.window_target';
$setting->save();
}
}
}

View file

@ -42,6 +42,7 @@ Supported applications are recognized by the title of the application as entered
**Foundation**
- AirSonic
- Booksonic
- Cardigann
- Deluge
- DokuWiki
@ -52,9 +53,11 @@ Supported applications are recognized by the title of the application as entered
- Graylog
- Jdownloader
- Krusader
- LibreNMS
- Lidarr
- McMyAdmin
- Medusa
- MusicBrainz
- Mylar
- NZBhydra & NZBhydra2
- Netdata
@ -66,6 +69,7 @@ Supported applications are recognized by the title of the application as entered
- Plexrequests
- Portainer
- Radarr
- Rancher
- SickRage
- Sonarr
- TT-RSS

View file

@ -15,6 +15,10 @@ return [
'settings.version' => 'Version',
'settings.background_image' => 'Background Image',
'settings.window_target' => 'Link opens in',
'settings.window_target.current' => 'Open in this tab',
'settings.window_target.one' => 'Open in the same tab',
'settings.window_target.new' => 'Open in a new tab',
'settings.homepage_search' => 'Homepage Search',
'settings.search_provider' => 'Search Provider',
'settings.language' => 'Language',
@ -22,12 +26,12 @@ return [
'settings.remove' => 'Remove',
'settings.search' => 'search',
'settings.no_items' => 'No items found',
'settings.label' => 'Label',
'settings.value' => 'Value',
'settings.edit' => 'Edit',
'settings.view' => 'View',
'settings.label' => 'Label',
'settings.value' => 'Value',
'settings.edit' => 'Edit',
'settings.view' => 'View',
'options.none' => '- not set -',
'options.google' => 'Google',
@ -60,7 +64,7 @@ return [
'apps.username' => 'Username',
'apps.password' => 'Password',
'apps.config' => 'Config',
'apps.apikey' => 'Api Key',
'apps.apikey' => 'API Key',
'apps.enable' => 'Enable',
'apps.tag_list' => 'Tags list',
'apps.add_tag' => 'Add tag',
@ -68,11 +72,11 @@ return [
'apps.tags' => 'Tags',
'apps.override' => 'If different to main url',
'url' => 'Url',
'url' => 'URL',
'title' => 'Title',
'delete' => 'Delete',
'optional' => 'Optional',
'restore' => 'Restore',
'delete' => 'Delete',
'optional' => 'Optional',
'restore' => 'Restore',
'alert.success.item_created' => 'Item created successfully',
'alert.success.item_updated' => 'Item updated successfully',
@ -84,8 +88,8 @@ return [
'alert.success.tag_deleted' => 'Tag deleted successfully',
'alert.success.tag_restored' => 'Tag restored successfully',
'alert.success.setting_updated' => 'You have successfully edited this Setting',
'alert.error.not_exist' => 'This Setting does not exist.',
'alert.success.setting_updated' => 'You have successfully edited this setting',
'alert.error.not_exist' => 'This setting does not exist.',
];

View file

@ -2,6 +2,10 @@
<div class="items">
<input type="hidden" name="config[enabled]" value="1" />
<input type="hidden" data-config="type" class="config-item" name="config[type]" value="\App\SupportedApps\Transmission" />
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!}
</div>
<div class="input">
<label>{{ __('app.apps.username') }}</label>
{!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'data-config' => 'username', 'class' => 'form-control config-item')) !!}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB