From 5807ebb9d328da14c643c9de25458433aea058a6 Mon Sep 17 00:00:00 2001 From: Tim Speckhals Date: Tue, 5 Jun 2018 07:51:23 +0200 Subject: [PATCH 01/14] Update German Translation --- resources/lang/de/notification.php | 2 ++ resources/lang/de/profile.php | 5 ++++- resources/lang/de/timeline.php | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 resources/lang/de/timeline.php diff --git a/resources/lang/de/notification.php b/resources/lang/de/notification.php index 2818fc996..d393089f2 100644 --- a/resources/lang/de/notification.php +++ b/resources/lang/de/notification.php @@ -3,5 +3,7 @@ return [ 'likedPhoto' => 'gefällt dein Foto.', + 'startedFollowingYou' => 'folgt dir nun.', + 'commented' => 'hat deinen Post kommentiert.', ]; \ No newline at end of file diff --git a/resources/lang/de/profile.php b/resources/lang/de/profile.php index 586f57419..294a90c85 100644 --- a/resources/lang/de/profile.php +++ b/resources/lang/de/profile.php @@ -1,5 +1,8 @@ 'Dieser Benutzer hat noch keine Fotos hochgeladen!', + 'emptyTimeline' => 'Dieser Benutzer hat noch nichts gepostet!', + 'emptyFollowers' => 'Diesem Benutzer folgt noch niemand!', + 'emptyFollowing' => 'Dieser Benutzer folgt noch niemanden!', + 'savedWarning' => 'Nur du kannst sehen was du gespeichert hast', ]; \ No newline at end of file diff --git a/resources/lang/de/timeline.php b/resources/lang/de/timeline.php new file mode 100644 index 000000000..af5521bdd --- /dev/null +++ b/resources/lang/de/timeline.php @@ -0,0 +1,7 @@ + 'Deine Timeline ist leer.' + +]; \ No newline at end of file From 593f17ad339d650fcf84bc873ae962607c835c95 Mon Sep 17 00:00:00 2001 From: j1t Date: Tue, 5 Jun 2018 06:12:38 +0000 Subject: [PATCH 02/14] Update notification.php --- resources/lang/he/notification.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/lang/he/notification.php b/resources/lang/he/notification.php index 3e7406a97..b529138df 100644 --- a/resources/lang/he/notification.php +++ b/resources/lang/he/notification.php @@ -3,5 +3,7 @@ return [ 'likedPhoto' => 'אהבו את התמונה שלך.', + 'startedFollowingYou' => 'התחיל לעקוב אחריך.', + 'commented' => 'הגיב על הפוסט שלך.', ]; From fc3a52b224e3eec3c71c7b6ad55d558091fad8b6 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Tue, 5 Jun 2018 08:27:18 +0200 Subject: [PATCH 03/14] Add HTML required for infinite scroll messages --- resources/views/timeline/personal.blade.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/resources/views/timeline/personal.blade.php b/resources/views/timeline/personal.blade.php index ce9415638..3c53eb838 100644 --- a/resources/views/timeline/personal.blade.php +++ b/resources/views/timeline/personal.blade.php @@ -36,6 +36,27 @@ @endif + +
+
+
+
+
+

No more content

+

+ Maybe you could try + discovering + more people you can follow. +

+
+
+

Whoops, an error

+

+ Try reloading the page +

+
+
+
{{$timeline->links()}}
From 0381ac249ed009905b206f7c6a13c469ee58d158 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Tue, 5 Jun 2018 08:29:38 +0200 Subject: [PATCH 04/14] Add infinite scroll messages to public timeline --- resources/views/timeline/public.blade.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/resources/views/timeline/public.blade.php b/resources/views/timeline/public.blade.php index e5b814f1a..6a75c944f 100644 --- a/resources/views/timeline/public.blade.php +++ b/resources/views/timeline/public.blade.php @@ -27,6 +27,27 @@ @endforeach + +
+
+
+
+
+

No more content

+

+ Maybe you could try + discovering + more people you can follow. +

+
+
+

Whoops, an error

+

+ Try reloading the page +

+
+
+
{{$timeline->links()}}
From fca898e7667ba58099a1604f765e8056af09ecd5 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Tue, 5 Jun 2018 08:37:12 +0200 Subject: [PATCH 05/14] Add css for loading page routine --- resources/assets/sass/custom.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/assets/sass/custom.scss b/resources/assets/sass/custom.scss index 92f0ca5ad..1db518df5 100644 --- a/resources/assets/sass/custom.scss +++ b/resources/assets/sass/custom.scss @@ -202,3 +202,15 @@ body, button, input, textarea { z-index:1020 } } + +@keyframes loading-bar { + from { background-position: 0 0; } + to { background-position: 100vw 0; } +} + +.loading-page { + background-image: linear-gradient(to right, #6736dd, #10c5f8, #10c5f8, #6736dd); + width: 100vw; + height: .25rem; + animation: loading-bar 3s linear infinite; +} From cdc19d44195415db00686a15afed9eba6a053bb7 Mon Sep 17 00:00:00 2001 From: Stasiek Michalski Date: Tue, 5 Jun 2018 08:38:48 +0200 Subject: [PATCH 06/14] Add JS for page messages --- resources/assets/js/timeline.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/timeline.js b/resources/assets/js/timeline.js index 576b3e71e..72c59406c 100644 --- a/resources/assets/js/timeline.js +++ b/resources/assets/js/timeline.js @@ -1,12 +1,14 @@ $(document).ready(function() { $('.pagination').hide(); + $('.page-load-status').show(); let elem = document.querySelector('.timeline-feed'); let infScroll = new InfiniteScroll( elem, { path: '.pagination__next', append: '.timeline-feed', + status: '.page-load-status', history: false, }); infScroll.on( 'append', function( response, path, items ) { pixelfed.hydrateLikes(); }); -}); \ No newline at end of file +}); From be2f3873e960cd926daf7e306e64f0da19672885 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 5 Jun 2018 01:48:19 -0600 Subject: [PATCH 07/14] Update compiled assets --- public/css/app.css | Bin 164480 -> 164981 bytes public/js/timeline.js | Bin 763 -> 850 bytes public/mix-manifest.json | Bin 184 -> 184 bytes resources/assets/js/timeline.js | 1 + 4 files changed, 1 insertion(+) diff --git a/public/css/app.css b/public/css/app.css index 7ff4cb201ef958d2e560605513fff974b411a39b..1fa936751ebd072c87e5907b7c3bf7ee0290878f 100644 GIT binary patch delta 366 zcmZo@<@(ye)zHGYg~`8O&Ox_4H7Pr@L^nINGOZ{vH?>$HCqFSIGcR2?DY0m}LOr7d zqrr5WdPXUELj!}das`9hS_gt^)!}OOV5Su$rl(dXB_?O57v-1crRZkn0tKdbmojO% zm*f}dq!s1oYABnT8=Ix1XzC>A=j0dZ76T}MEcjJydulzCG&2DEu6Ypv delta 24 fcmey`!PU^p)zHGYg~`8u`ld!EvF%ZfOw!B%dn^dF diff --git a/public/js/timeline.js b/public/js/timeline.js index 548ff63d5fe390367b675cb6a4c24cd9efb28fc8..e6383f8c17aa758ed81a36d2439d0579c70c4521 100644 GIT binary patch literal 850 zcmaJin*l2_4mpVMNBaepA#Ud20=W~xG@QP>AHo9-9vAtn;M6%!{U$?vnL}kTg_E{e zuH}?0LX4XU1Q}FmYq_7X(#zW!MY`B>`ErXzREH8Is;Z>)t;<;z2T3yNLgn&NyuWYX zenLg6hQ=U#^{xX?QMKtPO_)Ot%-g2P#|?G4bOa|J(|Aeg?JMLI1_o zgN2V*1tQG8a#1~4ip4*YSNlmmC&@HRawX+*?yg)4&U}-T&O356cA#3_Z;v>8y0kEx z&KzCIJ}`+KRbQ?}I{-l9&|nOJ3CLD zsZQ?=>bxmTsMgfLg`DEBvQF2lo-_@8%J!{0a&cY_C}&#rdjLPaf=z>RJ`s{RfKB6C zH2^ge8-(NHQ<@bTg4fEsv??G&r>QOOtM7IQCt^}}9blbOk390C;sSXTCR@{|(qr0! pC{)^bcHv<1YISPbe|^c$oWM3vt9GotCirZALC;0nA`zq5`~{g!Eb#yU delta 394 zcmY*U!AiqG6eI=v5fvc~J?z2~TM!Qo`vW4xv*IBpFS;7vhRut%Y!{E7Oa9Ei5d8x$ zZi=Dxvdqq#H*e-+{Bx8}%NBD|8X0i=l9>>tb;&@6#0h*8|g1$WFYmjBWbw=ndS)O`h$0K4(%yt^K~cHg7f%s1k;Rx7AV VDB_28VKRbC^#l#$J|%aKC%+TQin0Iz diff --git a/public/mix-manifest.json b/public/mix-manifest.json index bae2339326ffd0e3dc19e43d320be30f7b82b650..c821c35ba81024fdc612648514213ba0557b8a2e 100644 GIT binary patch delta 54 zcmdnNxPx&*yoh;Hih)T=Vw#bqr9qN;VrpuVxxvI@J#h=uH1lLb^HkF$3j?Dh10#zx JgH$E1S^&rU54QjS delta 54 zcmdnNxPx&*yogz9Qd(-7fq|JpTC$08N@}X1x%tFmJ#oXtlvE3&#FUieWJ6QqRFkwc JGczTwS^(E75O)9o diff --git a/resources/assets/js/timeline.js b/resources/assets/js/timeline.js index 72c59406c..59aa60657 100644 --- a/resources/assets/js/timeline.js +++ b/resources/assets/js/timeline.js @@ -9,6 +9,7 @@ $(document).ready(function() { history: false, }); infScroll.on( 'append', function( response, path, items ) { + $('.page-load-status').show(); pixelfed.hydrateLikes(); }); }); From a8178750640e4e9368fa40159276c945fd70b506 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 5 Jun 2018 01:49:05 -0600 Subject: [PATCH 08/14] Add basic language picker --- app/Http/Controllers/SiteController.php | 10 +++++++++- .../views/layouts/partial/footer.blade.php | 2 +- resources/views/site/language.blade.php | 19 +++++++++++++++++++ .../views/site/partial/sidebar.blade.php | 3 +++ routes/web.php | 2 ++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 resources/views/site/language.blade.php diff --git a/app/Http/Controllers/SiteController.php b/app/Http/Controllers/SiteController.php index 7993f7838..31603176b 100644 --- a/app/Http/Controllers/SiteController.php +++ b/app/Http/Controllers/SiteController.php @@ -2,9 +2,17 @@ namespace App\Http\Controllers; +use App; use Illuminate\Http\Request; class SiteController extends Controller { - + public function changeLocale(Request $request, $locale) + { + if(!App::isLocale($locale)) { + return redirect()->back(); + } + App::setLocale($locale); + return redirect()->back(); + } } diff --git a/resources/views/layouts/partial/footer.blade.php b/resources/views/layouts/partial/footer.blade.php index 29cd2d2d1..b1c9d8944 100644 --- a/resources/views/layouts/partial/footer.blade.php +++ b/resources/views/layouts/partial/footer.blade.php @@ -10,7 +10,7 @@ Directory Profiles Hashtags - Language + Language © {{date('Y')}} PixelFed.org

diff --git a/resources/views/site/language.blade.php b/resources/views/site/language.blade.php new file mode 100644 index 000000000..f2c933638 --- /dev/null +++ b/resources/views/site/language.blade.php @@ -0,0 +1,19 @@ +@extends('site.partial.template') + +@section('section') + +
+

Language

+
+
+
We're still working on localization support!
+

Current Locale: {{App::getLocale()}}

+

Select from one of the supported languages:

+ +@endsection + +@push('meta') + +@endpush diff --git a/resources/views/site/partial/sidebar.blade.php b/resources/views/site/partial/sidebar.blade.php index 18aa8dfe2..b9bfa0e19 100644 --- a/resources/views/site/partial/sidebar.blade.php +++ b/resources/views/site/partial/sidebar.blade.php @@ -9,6 +9,9 @@ + diff --git a/routes/web.php b/routes/web.php index bac723e7d..160d9bd6b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -61,6 +61,7 @@ Route::domain(config('pixelfed.domain.app'))->group(function() { Route::post('like', 'LikeController@store'); Route::post('follow', 'FollowerController@store'); Route::post('bookmark', 'BookmarkController@store'); + Route::get('lang/{locale}', 'SiteController@changeLocale'); Route::group(['prefix' => 'report'], function() { Route::get('/', 'ReportController@showForm')->name('report.form'); @@ -123,6 +124,7 @@ Route::domain(config('pixelfed.domain.app'))->group(function() { Route::view('privacy', 'site.privacy')->name('site.privacy'); Route::view('platform', 'site.platform')->name('site.platform'); Route::view('libraries', 'site.libraries')->name('site.libraries'); + Route::view('language', 'site.language')->name('site.language'); }); Route::get('p/{username}/{id}/c/{cid}', 'CommentController@show'); From 1e5941285df95f8e1affb11ab6a1608d12b205e5 Mon Sep 17 00:00:00 2001 From: trwnh Date: Tue, 5 Jun 2018 06:24:22 -0500 Subject: [PATCH 09/14] Fix missing bootstrap prefix in activity page Fixes #210 - same issue as #163 but on a different page --- resources/views/account/activity.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/account/activity.blade.php b/resources/views/account/activity.blade.php index a6bd0c388..092063f90 100644 --- a/resources/views/account/activity.blade.php +++ b/resources/views/account/activity.blade.php @@ -2,7 +2,7 @@ @section('content')
-
+