Compare commits

..

4 Commits

Author SHA1 Message Date
KodeStar
1750da1345 Merge pull request #630 from divendres/catala
Catalan translation
2022-11-14 15:02:46 +00:00
KodeStar
398df75865 Merge branch '2.x' 2022-03-17 11:01:43 +00:00
KodeStar
bd3b882b3a Squashed commit of the following:
commit e52bc9c6b2
Author: KodeStar <kodestar@gmail.com>
Date:   Thu Mar 17 10:23:15 2022 +0000

    Update supportedapps.json

commit a16233ee10
Author: KodeStar <kodestar@gmail.com>
Date:   Thu Mar 17 10:21:24 2022 +0000

    Fix for displaying svg icons correctly
2022-03-17 10:24:31 +00:00
Albert
d0e3a2faf5 Catalan translation 2021-11-23 13:38:01 +01:00
10 changed files with 162 additions and 58 deletions

View File

@@ -145,38 +145,11 @@ class ItemController extends Controller
//
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = '0';
$data['current_tags'] = collect([0 => __('app.dashboard')]);
return view('items.create', $data);
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
// Get the item
$item = Item::find($id);
if($item->appid === null && $item->class !== null) { // old apps wont have an app id so set it
$app = Application::where('class', $item->class)->first();
if($app) {
$item->appid = $app->appid;
}
}
$data['item'] = $item;
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = $data['item']->tags();
//$data['current_tags'] = $data['item']->parent;
//die(print_r($data['current_tags']));
// show the edit form and pass the nerd
return view('items.edit', $data);
}
public function storelogic($request, $id = null)
{
$application = Application::single($request->input('appid'));
@@ -265,6 +238,31 @@ class ItemController extends Controller
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
// Get the item
$item = Item::find($id);
if($item->appid === null && $item->class !== null) { // old apps wont have an app id so set it
$app = Application::where('class', $item->class)->first();
if($app) {
$item->appid = $app->appid;
}
}
$data['item'] = $item;
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend(__('app.dashboard'), 0);
$data['current_tags'] = $data['item']->tags();
//$data['current_tags'] = $data['item']->parent;
//die(print_r($data['current_tags']));
// show the edit form and pass the nerd
return view('items.edit', $data);
}
/**
* Update the specified resource in storage.
@@ -360,10 +358,9 @@ class ItemController extends Controller
$app = Application::single($appid);
$output = (array)$app;
$appdetails = Application::getApp($appid);
if((boolean)$app->enhanced === true) {
// if(!isset($app->config)) { // class based config
$appdetails = Application::getApp($appid);
$output['custom'] = className($appdetails->name).'.config';
// }
}
@@ -381,8 +378,8 @@ class ItemController extends Controller
{
$data = $request->input('data');
//$url = $data[array_search('url', array_column($data, 'name'))]['value'];
$single = Application::single($data['type']);
$app = $single->class;
$app = $data['type'];
$app_details = new $app();
$app_details->config = (object)$data;

View File

@@ -10,7 +10,6 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Support\Facades\Storage;
use App\Application;
use App\SupportedApps;
use App\Item;
class ProcessApps implements ShouldQueue
{
@@ -43,13 +42,5 @@ class ProcessApps implements ShouldQueue
$app->save();
}
$items = Item::whereNotNull('class')->get();
foreach($items as $item) {
if(!file_exists(app_path('SupportedApps/'.Item::nameFromClass($item->class)))) {
$app = Application::where('class', $item->class)->first();
Application::getApp($app->appid);
}
}
}
}

View File

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

1
public/css/app.css vendored
View File

@@ -1,3 +1,4 @@
@charset "UTF-8";
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;

6
public/js/app.js vendored
View File

@@ -620,14 +620,14 @@ $.when($.ready).then(function () {
drop: function( event, ui ) {
var tag = $( this ).data('id');
var item = $( ui.draggable ).data('id');
$.get('tag/add/'+tag+'/'+item, function(data) {
$.get('tag/add/'+tag+'/'+item, function(data) {
if(data == 1) {
$( ui.draggable ).remove();
} else {
alert('not added');
}
});
}
}
});*/
$('#sortable').sortable({
@@ -716,7 +716,7 @@ $.when($.ready).then(function () {
}).on('click', '#test_config', function (e) {
e.preventDefault();
var apiurl = $('#create input[name=url]').val();
var override_url = $('#sapconfig input[name="config[override_url]"]').val();
var override_url = $('#create input[name="config[override_url]"]').val();
if (override_url.length && override_url != '') {
apiurl = override_url;

View File

@@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=ad45b1705b7f7906db0b",
"/js/app.js": "/js/app.js?id=5446aeb4aa754e641c77"
"/css/app.css": "/css/app.css?id=bc18c3a0e8475fe00a5a",
"/js/app.js": "/js/app.js?id=c95edea425171c6ce8f6"
}

View File

@@ -205,7 +205,7 @@ $.when( $.ready ).then(function() {
e.preventDefault();
var apiurl = $('#create input[name=url]').val();
var override_url = $('#sapconfig input[name="config[override_url]"]').val();
var override_url = $('#create input[name="config[override_url]"]').val();
if(override_url.length && override_url != '') {
apiurl = override_url;
}

120
resources/lang/cat/app.php Normal file
View File

@@ -0,0 +1,120 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| App Language Lines
|--------------------------------------------------------------------------
|
*/
'settings.system' => 'Sistema',
'settings.appearance' => 'Aparença',
'settings.miscellaneous' => 'Miscel·lania',
'settings.support' => 'Suport',
'settings.donate' => 'Fer una donació',
'settings.version' => 'Versió',
'settings.background_image' => 'Imatge de fons',
'settings.window_target' => 'L\'enllaç s\'obre a',
'settings.window_target.current' => 'Obre en aquesta pestanya',
'settings.window_target.one' => 'Obre en la mateixa pestanya',
'settings.window_target.new' => 'Obre en una nova pestanya',
'settings.homepage_search' => 'Cerca a la pàgina principal',
'settings.search_provider' => 'Proveïdor de cerca per defecte',
'settings.language' => 'Idioma',
'settings.reset' => 'Reinicia als parametres per defecte',
'settings.remove' => 'Elimina',
'settings.search' => 'cerca',
'settings.no_items' => 'No s\'han trobat resultats',
'settings.label' => 'Etiqueta',
'settings.value' => 'Valor',
'settings.edit' => 'Edita',
'settings.view' => 'Veure',
'options.none' => '- no definit -',
'options.google' => 'Google',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.qwant' => 'Qwant',
'options.startpage' => 'StartPage',
'options.yes' => 'Sí',
'options.no' => 'No',
'options.nzbhydra' => 'NZBHydra',
'options.jackett' => 'Jackett',
'buttons.save' => 'Desa',
'buttons.cancel' => 'Cancel·la',
'buttons.add' => 'Afegeix',
'buttons.upload' => 'Puja una icona',
'buttons.downloadapps' => 'Actualitza la llista d\'Apps',
'dash.pin_item' => 'Ancora l\'element al panell',
'dash.no_apps' => 'No hi ha cap aplicació ancorada, :link1 o :link2',
'dash.link1' => 'Afegiu una aplicació aquí',
'dash.link2' => 'Ancoreu un item al panell',
'dash.pinned_items' => 'Elements ancorats',
'apps.app_list' => 'Llista d\'aplicacions',
'apps.view_trash' => 'Veure la paperera',
'apps.add_application' => 'Afegeix l\'aplicació',
'apps.application_name' => 'Nom de l\'aplicació',
'apps.colour' => 'Color',
'apps.icon' => 'Icona',
'apps.pinned' => 'Ancorada',
'apps.title' => 'Títol',
'apps.hex' => 'Color en hexa',
'apps.username' => 'Usuari',
'apps.password' => 'Contrasenya',
'apps.config' => 'Configuració',
'apps.apikey' => 'Clau API',
'apps.enable' => 'Activa',
'apps.tag_list' => 'Llista d\'etiquetes',
'apps.add_tag' => 'Afegeix una etiqueta',
'apps.tag_name' => 'Nom de l\'etiqueta',
'apps.tags' => 'Etiquetes',
'apps.override' => 'Si és diferent que la URL principal',
'apps.preview' => 'Previsualitza',
'apps.apptype' => 'Tipus d\'aplicació',
'dashboard' => 'Panell principal',
'user.user_list' => 'Usuaris',
'user.add_user' => 'Afegeix usuari',
'user.username' => 'Usuari',
'user.avatar' => 'Avatar',
'user.email' => 'Correu electrònic',
'user.password_confirm' => 'Confirmeu la contrasenya',
'user.secure_front' => 'Permetre accés públic - Només si s\'ha establert una contrasenya.',
'user.autologin' => 'Permetre iniciar sessió des d\'una URL específica. Qualsevol que tingui l\'enllaç podrà accedir.',
'url' => 'URL',
'title' => 'Títol',
'delete' => 'Elimina',
'optional' => 'Opcional',
'restore' => 'Restaura',
'alert.success.item_created' => 'L\'element s\'ha creat correctament',
'alert.success.item_updated' => 'L\'element s\'ha actualitzat correctament',
'alert.success.item_deleted' => 'L\'element s\'ha eliminat correctament',
'alert.success.item_restored' => 'L\'element s\'ha restaurat correctament',
'alert.success.updating' => 'Actualitzant la llista d\'apps',
'alert.success.tag_created' => 'L\'etiqueta s\'ha creat correctament',
'alert.success.tag_updated' => 'L\'etiqueta s\'ha actualitzat correctament',
'alert.success.tag_deleted' => 'L\'etiqueta s\'ha eliminat correctament',
'alert.success.tag_restored' => 'L\'etiqueta s\'ha restaurat correctament',
'alert.success.setting_updated' => 'S\'ha editat aquest paràmetre correctament',
'alert.error.not_exist' => 'Aquest paràmetre no existeix.',
'alert.success.user_created' => 'L\'usuari s\'ha creat correctament',
'alert.success.user_updated' => 'L\'usuari s\'ha actualitzat correctament',
'alert.success.user_deleted' => 'L\'usuari s\'ha eliminar correctament',
'alert.success.user_restored' => 'L\'usuari s\'ha restaurat correctament',
];

View File

@@ -6,7 +6,6 @@ return array (
'settings.miscellaneous' => 'Divers',
'settings.support' => 'Support',
'settings.donate' => 'Contribuer',
'settings.advanced' => 'Options avancées',
'settings.version' => 'Version',
'settings.background_image' => 'Image d\'arrière-plan',
@@ -72,8 +71,6 @@ return array (
'apps.preview' => 'Aperçu',
'apps.apptype' => 'Type d\'application ',
'apps.only_admin_account' => 'Seulement si vous avez un compte administrateur!',
'apps.autologin_url' => 'URL de connexion automatique',
'apps.show_deleted' => 'Afficher les applications supprimées',
'dashboard' => 'Tableau de bord',

View File

@@ -3,13 +3,11 @@
?>
<section class="item-container" data-id="">
<div class="item set-bg-elem" style="background-color: {{ $item->colour ?? '#222' }}">
<div class="app-icon-container">
@if(isset($item->icon) && !empty($item->icon))
<img class="app-icon" src="{{ asset('/storage/'.$item->icon) }}" />
@else
<img class="app-icon" src="{{ asset('/img/heimdall-icon-small.png') }}" />
@endif
</div>
@if(isset($item->icon) && !empty($item->icon))
<img class="app-icon" src="{{ asset('/storage/'.$item->icon) }}" />
@else
<img class="app-icon" src="{{ asset('/img/heimdall-icon-small.png') }}" />
@endif
<div class="details">
<div class="title{{ title_color($item->colour) ?? 'white' }}">{{ $item->title ?? '' }}</div>
@if($item->enhanced())