Browse Source

Merge branch 'master' into app-Mylar

pull/190/head
ullbergm 7 years ago
committed by GitHub
parent
commit
6c8eeb0ced
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      app/Item.php
  2. 12
      app/SupportedApps/Booksonic.php
  3. 12
      app/SupportedApps/MusicBrainz.php
  4. 12
      app/SupportedApps/Rancher.php
  5. 9
      app/SupportedApps/Transmission.php
  6. 23
      database/seeds/SettingsSeeder.php
  7. 4
      readme.md
  8. 28
      resources/lang/en/app.php
  9. 4
      resources/views/supportedapps/transmission.blade.php
  10. BIN
      storage/app/public/supportedapps/booksonic.png
  11. BIN
      storage/app/public/supportedapps/musicbrainz.png
  12. BIN
      storage/app/public/supportedapps/rancher.png

10
app/Item.php

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

12
app/SupportedApps/Booksonic.php

@ -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';
}
}

12
app/SupportedApps/MusicBrainz.php

@ -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';
}
}

12
app/SupportedApps/Rancher.php

@ -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';
}
}

9
app/SupportedApps/Transmission.php

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

23
database/seeds/SettingsSeeder.php

@ -138,6 +138,27 @@ class SettingsSeeder extends Seeder
$setting->save(); $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();
}
} }
} }

4
readme.md

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

28
resources/lang/en/app.php

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

4
resources/views/supportedapps/transmission.blade.php

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

BIN
storage/app/public/supportedapps/booksonic.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
storage/app/public/supportedapps/musicbrainz.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
storage/app/public/supportedapps/rancher.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Loading…
Cancel
Save