Browse Source

Merge branch 'master' into trianglify

ullbergm/trianglify
ullbergm 7 years ago
committed by GitHub
parent
commit
cf2478c268
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/LibreNMS.php
  4. 12
      app/SupportedApps/MusicBrainz.php
  5. 12
      app/SupportedApps/Rancher.php
  6. 9
      app/SupportedApps/Transmission.php
  7. 21
      database/seeds/SettingsSeeder.php
  8. 4
      readme.md
  9. 12
      resources/lang/en/app.php
  10. 4
      resources/views/supportedapps/transmission.blade.php
  11. BIN
      storage/app/public/supportedapps/booksonic.png
  12. BIN
      storage/app/public/supportedapps/librenms.png
  13. BIN
      storage/app/public/supportedapps/musicbrainz.png
  14. BIN
      storage/app/public/supportedapps/rancher.png

10
app/Item.php

@ -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,
'NZBGet' => \App\SupportedApps\Nzbget::class,
'Netdata' => \App\SupportedApps\Netdata::class,
'Nextcloud' => \App\SupportedApps\Nextcloud::class,
@ -60,6 +63,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,
@ -165,10 +169,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 . '"';
}
}

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/LibreNMS.php

@ -0,0 +1,12 @@
<?php namespace App\SupportedApps;
class LibreNMS implements Contracts\Applications {
public function defaultColour()
{
return '#e77';
}
public function icon()
{
return 'supportedapps/librenms.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()
{
$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;
}
}

21
database/seeds/SettingsSeeder.php

@ -151,6 +151,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();
}
}
}

4
readme.md

@ -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
- NZBhydra & NZBhydra2
- Netdata
- Nextcloud
@ -65,6 +68,7 @@ Supported applications are recognized by the title of the application as entered
- Plexrequests
- Portainer
- Radarr
- Rancher
- SickRage
- Sonarr
- TT-RSS

12
resources/lang/en/app.php

@ -16,6 +16,10 @@ return [
'settings.version' => 'Version',
'settings.background_image' => 'Background Image',
'settings.trianglify' => 'Trianglify',
'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',
@ -61,7 +65,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',
@ -69,7 +73,7 @@ return [
'apps.tags' => 'Tags',
'apps.override' => 'If different to main url',
'url' => 'Url',
'url' => 'URL',
'title' => 'Title',
'delete' => 'Delete',
'optional' => 'Optional',
@ -85,8 +89,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.',
];

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

@ -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')) !!}

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 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