Browse Source

Merge branch 'master' into Add-option-to-open-links-in-current-window-or-new-tab

remotes/ullbergm/master^2
ullbergm 7 years ago
committed by GitHub
parent
commit
fcacb7c919
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/Item.php
  2. 7
      app/Providers/AppServiceProvider.php
  3. 12
      app/SupportedApps/Booksonic.php
  4. 12
      app/SupportedApps/Headphones.php
  5. 12
      app/SupportedApps/LazyLibrarian.php
  6. 12
      app/SupportedApps/LibreNMS.php
  7. 12
      app/SupportedApps/MusicBrainz.php
  8. 12
      app/SupportedApps/Mylar.php
  9. 12
      app/SupportedApps/Rancher.php
  10. 13
      database/seeds/SettingsSeeder.php
  11. 1
      public/js/trianglify.min.js
  12. 7
      readme.md
  13. 1
      resources/lang/de/app.php
  14. 1
      resources/lang/en/app.php
  15. 1
      resources/lang/es/app.php
  16. 1
      resources/lang/fi/app.php
  17. 1
      resources/lang/fr/app.php
  18. 1
      resources/lang/it/app.php
  19. 1
      resources/lang/nl/app.php
  20. 1
      resources/lang/no/app.php
  21. 1
      resources/lang/pl/app.php
  22. 1
      resources/lang/sv/app.php
  23. 1
      resources/lang/tr/app.php
  24. 24
      resources/views/app.blade.php
  25. BIN
      storage/app/public/supportedapps/booksonic.png
  26. BIN
      storage/app/public/supportedapps/headphones.png
  27. BIN
      storage/app/public/supportedapps/lazylibrarian.png
  28. BIN
      storage/app/public/supportedapps/librenms.png
  29. BIN
      storage/app/public/supportedapps/musicbrainz.png
  30. BIN
      storage/app/public/supportedapps/mylar.png
  31. BIN
      storage/app/public/supportedapps/rancher.png

7
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,
@ -37,13 +38,18 @@ class Item extends Model
'Glances' => \App\SupportedApps\Glances::class,
'Grafana' => \App\SupportedApps\Grafana::class,
'Graylog' => \App\SupportedApps\Graylog::class,
'Headphones' => \App\SupportedApps\Headphones::class,
'Home Assistant' => \App\SupportedApps\HomeAssistant::class,
'Jackett' => \App\SupportedApps\Jackett::class,
'Jdownloader' => \App\SupportedApps\Jdownloader::class,
'Krusader' => \App\SupportedApps\Krusader::class,
'LibreNMS' => \App\SupportedApps\LibreNMS::class,
'LazyLibrarian' => \App\SupportedApps\LazyLibrarian::class,
'Lidarr' => \App\SupportedApps\Lidarr::class,
'Mcmyadmin' => \App\SupportedApps\Mcmyadmin::class,
'Medusa' => \App\SupportedApps\Medusa::class,
'Mylar' => \App\SupportedApps\Mylar::class,
'MusicBrainz' => \App\SupportedApps\MusicBrainz::class,
'NZBGet' => \App\SupportedApps\Nzbget::class,
'Netdata' => \App\SupportedApps\Netdata::class,
'Nextcloud' => \App\SupportedApps\Nextcloud::class,
@ -60,6 +66,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,

7
app/Providers/AppServiceProvider.php

@ -17,6 +17,7 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
$alt_bg = '';
$trianglify = '';
if(!is_file(base_path('.env'))) {
touch(base_path('.env'));
@ -32,7 +33,9 @@ class AppServiceProvider extends ServiceProvider
}
if(is_file(database_path('app.sqlite'))) {
if(Schema::hasTable('settings')) {
if($bg_image = Setting::fetch('background_image')) {
if(Setting::fetch('trianglify')) {
$trianglify = '<script>addTriangleTo(app);</script>';
} else if($bg_image = Setting::fetch('background_image')) {
$alt_bg = ' style="background-image: url(/storage/'.$bg_image.')"';
}
@ -53,7 +56,7 @@ class AppServiceProvider extends ServiceProvider
Artisan::call('storage:link');
}
view()->share('alt_bg', $alt_bg);
view()->share('trianglify', $trianglify);
}
/**

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

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

12
app/SupportedApps/LazyLibrarian.php

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

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

13
database/seeds/SettingsSeeder.php

@ -138,6 +138,19 @@ class SettingsSeeder extends Seeder
$setting->save();
}
if(!$setting = Setting::find(6)) {
$setting = new Setting;
$setting->id = 6;
$setting->group_id = 2;
$setting->key = 'trianglify';
$setting->type = 'boolean';
$setting->label = 'app.settings.trianglify';
$setting->save();
} else {
$setting->label = 'app.settings.trianglify';
$setting->save();
}
$window_target_options = json_encode([
'current' => 'app.settings.window_target.current',
'heimdall' => 'app.settings.window_target.one',

1
public/js/trianglify.min.js

File diff suppressed because one or more lines are too long

7
readme.md

@ -42,6 +42,7 @@ Supported applications are recognized by the title of the application as entered
**Foundation**
- AirSonic
- Booksonic
- Cardigann
- Deluge
- DokuWiki
@ -50,11 +51,16 @@ Supported applications are recognized by the title of the application as entered
- Gitea
- Grafana
- Graylog
- Headphones
- Jdownloader
- Krusader
- LibreNMS
- LazyLibrarian
- Lidarr
- McMyAdmin
- Medusa
- Mylar
- MusicBrainz
- NZBhydra & NZBhydra2
- Netdata
- Nextcloud
@ -65,6 +71,7 @@ Supported applications are recognized by the title of the application as entered
- Plexrequests
- Portainer
- Radarr
- Rancher
- SickRage
- Sonarr
- TT-RSS

1
resources/lang/de/app.php

@ -6,6 +6,7 @@ return array (
'settings.miscellaneous' => 'Sonstiges',
'settings.version' => 'Ausführung',
'settings.background_image' => 'Hintergrundbild',
'settings.trianglify' => 'Trianglify',
'settings.homepage_search' => 'Homepage Suchen',
'settings.search_provider' => 'Suchanbieter',
'settings.language' => 'Sprache',

1
resources/lang/en/app.php

@ -19,6 +19,7 @@ return [
'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.trianglify' => 'Trianglify',
'settings.homepage_search' => 'Homepage Search',
'settings.search_provider' => 'Search Provider',
'settings.language' => 'Language',

1
resources/lang/es/app.php

@ -6,6 +6,7 @@ return array (
'settings.miscellaneous' => 'Miscelánea',
'settings.version' => 'Versión',
'settings.background_image' => 'Imagen De Fondo',
'settings.trianglify' => 'Trianglify',
'settings.homepage_search' => 'Página De Inicio De Búsqueda',
'settings.search_provider' => 'Proveedor de búsqueda',
'settings.language' => 'Idioma',

1
resources/lang/fi/app.php

@ -6,6 +6,7 @@ return array (
'settings.miscellaneous' => 'Sekalainen',
'settings.version' => 'Versio',
'settings.background_image' => 'Taustakuva',
'settings.trianglify' => 'Trianglify',
'settings.homepage_search' => 'Kotisivu Haku',
'settings.search_provider' => 'Hakupalvelu',
'settings.language' => 'Kieli',

1
resources/lang/fr/app.php

@ -6,6 +6,7 @@ return array (
'settings.miscellaneous' => 'Divers',
'settings.version' => 'Version',
'settings.background_image' => 'Image D\'Arrière-Plan',
'settings.trianglify' => 'Trianglify',
'settings.homepage_search' => 'La Page D\'Accueil De Recherche',
'settings.search_provider' => 'Fournisseur de recherche',
'settings.language' => 'Langue',

1
resources/lang/it/app.php

@ -16,6 +16,7 @@ return [
'settings.version' => 'Versione',
'settings.background_image' => 'Immagine di sfondo',
'settings.homepage_search' => 'Ricerca in homepage',
'settings.trianglify' => 'Trianglify',
'settings.search_provider' => 'Motore di ricerca',
'settings.language' => 'Lingua',
'settings.reset' => 'Ripristina le impostazioni di default',

1
resources/lang/nl/app.php

@ -16,6 +16,7 @@ return [
'settings.version' => 'Versie',
'settings.background_image' => 'Achtergrondafbeelding',
'settings.homepage_search' => 'Zoeken op thuispagina',
'settings.trianglify' => 'Trianglify',
'settings.search_provider' => 'Zoekaanbieder',
'settings.language' => 'Taal',
'settings.reset' => 'Op standaard instellen',

1
resources/lang/no/app.php

@ -16,6 +16,7 @@ return [
'settings.version' => 'Versjon',
'settings.background_image' => 'Bakgrunnsbilde',
'settings.homepage_search' => 'Startside Søk',
'settings.trianglify' => 'Trianglify',
'settings.search_provider' => 'Søkemotor',
'settings.language' => 'Språk',
'settings.reset' => 'Tilbakestill tilbake til standard',

1
resources/lang/pl/app.php

@ -16,6 +16,7 @@ return [
'settings.version' => 'Wersja',
'settings.background_image' => 'Tapeta Pulpitu',
'settings.homepage_search' => 'Strona Domowa Wyszukiwanie',
'settings.trianglify' => 'Trianglify',
'settings.search_provider' => 'Operator Wyszukiwania',
'settings.language' => 'Język',
'settings.reset' => 'Przywróć ustawienia domyślne',

1
resources/lang/sv/app.php

@ -7,6 +7,7 @@ return array (
'settings.version' => 'Version',
'settings.background_image' => 'Bakgrundsbild',
'settings.homepage_search' => 'Startsida Sök',
'settings.trianglify' => 'Trianglify',
'settings.search_provider' => 'Sökmotor',
'settings.language' => 'Språk',
'settings.reset' => 'Återställ standardinställningar',

1
resources/lang/tr/app.php

@ -16,6 +16,7 @@ return [
'settings.version' => 'Versiyon',
'settings.background_image' => 'Arkaplan Resmi',
'settings.homepage_search' => 'Anasayfa Arama',
'settings.trianglify' => 'Trianglify',
'settings.search_provider' => 'Arama Motoru',
'settings.language' => 'Dil',
'settings.reset' => 'Varsayılana Geri Dön',

24
resources/views/app.blade.php

@ -91,6 +91,30 @@
<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="/js/app.js?v=2"></script>
<script src="/js/trianglify.min.js"></script>
<script>
function addTriangleTo(target) {
var dimensions = target.getClientRects()[0];
var pattern = Trianglify({
width: dimensions.width,
height: dimensions.height
});
target.style['background-image'] = 'url(' + pattern.png() + ')';
target.style['background-size'] = 'cover';
target.style['-webkit-background-size'] = 'cover';
target.style['-moz-background-size'] = 'cover';
target.style['-o-background-size'] = 'cover';
}
var resizeTimer;
$(window).on('resize', function(e) {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
addTriangleTo(app);
}, 400);
});
</script>
{!! $trianglify !!}
@yield('scripts')
</body>

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 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/mylar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Loading…
Cancel
Save