From ccc5ff1409e3778edeb1b41eadc8bdce25a0e99d Mon Sep 17 00:00:00 2001 From: ildyria Date: Sat, 27 Aug 2022 10:49:31 +0200 Subject: [PATCH 1/2] remove $locale in favor of Lang::get() --- app/Http/Controllers/IndexController.php | 9 --- public/Lychee-front | 2 +- resources/views/gallery.blade.php | 74 +++++++++++------------ resources/views/includes/footer.blade.php | 4 +- resources/views/layouts/gallery.blade.php | 2 +- resources/views/layouts/simple.blade.php | 2 +- resources/views/view.blade.php | 2 +- 7 files changed, 43 insertions(+), 52 deletions(-) diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 220c35fa568..22990618080 100644 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers; use App\Exceptions\ModelDBException; -use App\Facades\Lang; use App\ModelFunctions\ConfigFunctions; use App\ModelFunctions\SymLinkFunctions; use App\Models\Configs; @@ -40,9 +39,6 @@ public function __construct(ConfigFunctions $configFunctions, SymLinkFunctions $ public function show(): View { if (Configs::getValueAsBool('landing_page_enable')) { - $lang = Lang::get_lang(); - $lang['language'] = Configs::getValueAsString('lang'); - $infos = $this->configFunctions->get_pages_infos(); $menus = Page::menu()->get(); @@ -55,7 +51,6 @@ public function show(): View $page_config['display_socials'] = false; return view('landing', [ - 'locale' => $lang, 'title' => $title, 'infos' => $infos, 'menus' => $menus, @@ -94,9 +89,6 @@ public function gallery(): View $this->symLinkFunctions->remove_outdated(); $infos = $this->configFunctions->get_pages_infos(); - $lang = Lang::get_lang(); - $lang['language'] = Configs::getValueAsString('lang'); - $title = Configs::getValueAsString('site_title'); $rss_enable = Configs::getValueAsBool('rss_enable'); $page_config = []; @@ -104,7 +96,6 @@ public function gallery(): View $page_config['display_socials'] = Configs::getValueAsBool('display_social_in_gallery'); return view('gallery', [ - 'locale' => $lang, 'title' => $title, 'infos' => $infos, 'page_config' => $page_config, diff --git a/public/Lychee-front b/public/Lychee-front index c6dd8155569..c1c39516e22 160000 --- a/public/Lychee-front +++ b/public/Lychee-front @@ -1 +1 @@ -Subproject commit c6dd8155569cbea7564dc72bd8f7868306da9b4f +Subproject commit c1c39516e2259f44d9b9d2e7e9b5c488499d71eb diff --git a/resources/views/gallery.blade.php b/resources/views/gallery.blade.php index e8dc234e3ec..ce0e7d85659 100644 --- a/resources/views/gallery.blade.php +++ b/resources/views/gallery.blade.php @@ -23,132 +23,132 @@
- + - + - + - + - + - - + - + - + - + - + - + - + @@ -156,7 +156,7 @@
- + @@ -165,7 +165,7 @@
- + @@ -195,7 +195,7 @@ diff --git a/resources/views/includes/footer.blade.php b/resources/views/includes/footer.blade.php index 7736a57401a..5dac6e0ae5a 100644 --- a/resources/views/includes/footer.blade.php +++ b/resources/views/includes/footer.blade.php @@ -9,7 +9,7 @@ @if($infos['copyright_enable'] == '1') + {!! sprintf(Lang::get('FOOTER_COPYRIGHT'), $infos['owner'], $infos['copyright_year']) !!}

@endif @if($infos['additional_footer_text'] != '') @@ -18,6 +18,6 @@ @if($page_config['show_hosted_by']) -

{{ $locale['HOSTED_WITH_LYCHEE'] }}

+

{{ Lang::get('HOSTED_WITH_LYCHEE') }}

@endif
diff --git a/resources/views/layouts/gallery.blade.php b/resources/views/layouts/gallery.blade.php index 016e03d7d4a..cce44a6eec7 100644 --- a/resources/views/layouts/gallery.blade.php +++ b/resources/views/layouts/gallery.blade.php @@ -1,5 +1,5 @@ - + @include('includes.head') diff --git a/resources/views/layouts/simple.blade.php b/resources/views/layouts/simple.blade.php index 9a2049a837c..b0038ca3b37 100644 --- a/resources/views/layouts/simple.blade.php +++ b/resources/views/layouts/simple.blade.php @@ -1,5 +1,5 @@ - + @include('includes.head') diff --git a/resources/views/view.blade.php b/resources/views/view.blade.php index 821d0eefa8d..ec256923bee 100644 --- a/resources/views/view.blade.php +++ b/resources/views/view.blade.php @@ -58,7 +58,7 @@ From 5f6f5def7e007ce58639e7a5223ff7a0d5500605 Mon Sep 17 00:00:00 2001 From: ildyria Date: Sat, 27 Aug 2022 11:19:27 +0200 Subject: [PATCH 2/2] fix Lychee-front back to masteR --- public/Lychee-front | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/Lychee-front b/public/Lychee-front index c1c39516e22..c6dd8155569 160000 --- a/public/Lychee-front +++ b/public/Lychee-front @@ -1 +1 @@ -Subproject commit c1c39516e2259f44d9b9d2e7e9b5c488499d71eb +Subproject commit c6dd8155569cbea7564dc72bd8f7868306da9b4f