From fcbf005ce4fee375405df5e73cd3d5472c5c1287 Mon Sep 17 00:00:00 2001 From: Chri$ Date: Tue, 24 Dec 2024 12:39:33 +0100 Subject: [PATCH 1/6] feat:[lar-144] translate about-us page and remove subscribe and unscubsribe in discussion --- app/Livewire/Discussions/Subscribe.php | 68 ---- lang/en/pages/about.php | 58 ++++ lang/fr/pages/about.php | 58 ++++ resources/views/about.blade.php | 306 ------------------ .../livewire/discussions/subscribe.blade.php | 43 --- .../views/livewire/pages/about.blade.php | 266 +++++++++++++++ .../discussions/single-discussion.blade.php | 4 +- routes/web.php | 3 +- 8 files changed, 385 insertions(+), 421 deletions(-) delete mode 100644 app/Livewire/Discussions/Subscribe.php create mode 100644 lang/en/pages/about.php create mode 100644 lang/fr/pages/about.php delete mode 100644 resources/views/about.blade.php delete mode 100644 resources/views/livewire/discussions/subscribe.blade.php create mode 100644 resources/views/livewire/pages/about.blade.php diff --git a/app/Livewire/Discussions/Subscribe.php b/app/Livewire/Discussions/Subscribe.php deleted file mode 100644 index b1b51ed2..00000000 --- a/app/Livewire/Discussions/Subscribe.php +++ /dev/null @@ -1,68 +0,0 @@ - '$refresh']; - - public function subscribe(): void - { - $this->authorize('subscribe', $this->discussion); - - $subscribe = new SubscribeModel; - $subscribe->uuid = Uuid::uuid4()->toString(); - $subscribe->user()->associate(Auth::user()); - $this->discussion->subscribes()->save($subscribe); - - Notification::make() - ->title(__('Abonnement')) - ->body(__('Vous êtes maintenant abonné à cette discussion.')) - ->success() - ->duration(5000) - ->send(); - - $this->dispatch('refresh')->self(); - } - - public function unsubscribe(): void - { - $this->authorize('unsubscribe', $this->discussion); - - $this->discussion->subscribes() - ->where('user_id', Auth::id()) - ->delete(); - - Notification::make() - ->title(__('Désabonnement')) - ->body(__('Vous êtes maintenant désabonné à cette discussion.')) - ->success() - ->duration(5000) - ->send(); - - $this->dispatch('refresh')->self(); - } - - public function render(): View - { - return view('livewire.discussions.subscribe'); - } -} diff --git a/lang/en/pages/about.php b/lang/en/pages/about.php new file mode 100644 index 00000000..17c045e0 --- /dev/null +++ b/lang/en/pages/about.php @@ -0,0 +1,58 @@ + 'About us', + 'description' => 'We build an Open Source community of learners and teachers', + 'second_description_part_one' => 'Everyone teaches, everyone learns', + 'second_description_part_two' => '. That\'s the spirit behind the community. A community that aims to grow and + gives everyone the chance to share their knowledge and learn.', + + 'stats' => [ + 'member_discord' => 'Members on Discord', + 'member_telegram' => 'Members on Discord', + 'member_whatsapp' => 'Members on WhatsApp', + ], + 'history' => 'Our history', + 'history_part_one' => 'We\'re just getting started', + 'first_description' => 'Launched in June 2018, Laravel CM quickly began to grow and kick off its activities + activities with a first Meetup for its overall presentation and objectives. This Meetup + registered over 100 participants', + 'second_description' => 'During this event, we recorded the participation of companies such as + such as:', + 'list' => [ + 'one' => [ + 'title' => 'incubator', + 'description' => 'who hosted the meetup.', + ], + 'two' => [ + 'title' => 'company', + 'description' => ' one of our sponsors.', + ], + 'three' => [ + 'title' => ' The StartUp', + 'description' => ' who has been a sponsor and supported us in our communications.', + ], + 'four' => [ + 'title' => ' The StartUp', + 'description' => 'who supported us in setting up our communication materials.', + ], + 'five' => [ + 'title' => 'The company', + 'description' => ' sponsor of the Meetup.', + ], + 'paragraph_one' => 'Laravel Cameroun is a community of developers and designers who come together to + help each other. The software industry relies on collaboration and networked + learning. We\'ve set ourselves the goal of bringing together as many + developers and designers in Cameroon and French-speaking Africa to organize + events and Meetups throughout Cameroon and French-speaking Africa.', + + ], + 'our_team' => [ + 'title' => 'Meet the Team', + 'description' => 'Laravel Cameroun is a Meetup idea that was initiated and then transformed into a community of developers.', + ], + +]; diff --git a/lang/fr/pages/about.php b/lang/fr/pages/about.php new file mode 100644 index 00000000..82d6c3ca --- /dev/null +++ b/lang/fr/pages/about.php @@ -0,0 +1,58 @@ + ' À propos', + 'description' => 'Nous construisons une communauté Open Source d\'apprenants et d\'enseignants', + 'second_description_part_one' => 'Tout le monde enseigne, tout le monde apprend', + 'second_description_part_two' => '. Tel est l\'esprit qui est derrière la communauté. Une communauté qui se veut grandissante et qui + donne la possibilité à tout le monde de partager ses connaissances et d\'apprendre.', + + 'stats' => [ + 'member_discord' => 'Membres sur Discord', + 'member_telegram' => 'Membres sur Telegram', + 'member_whatsapp' => 'Membres sur WhatsApp', + ], + 'history' => ' Notre histoire', + 'history_part_one' => 'Nous commençons tout juste', + 'first_description' => 'Lancé en Juin 2018, Laravel CM a rapidement commencé à se développer et à démarrer ses + activités par un premier Meetup pour sa présentation globale et ses objectifs. Ce Meetup a + enregistré plus de 100 participants', + 'second_description' => 'Durant cet événement, nous avons notamment enregistré la participation des entreprises + telles que:', + 'list' => [ + 'one' => [ + 'title' => 'incubateur', + 'description' => 'qui a hébergé le meetup.', + ], + 'two' => [ + 'title' => 'entreprise', + 'description' => ' qui a été l\'un de nos sponsors.', + ], + 'three' => [ + 'title' => ' La StartUp', + 'description' => ' qui a été un sponsor et nous a soutenu dans la communication.', + ], + 'four' => [ + 'title' => ' La StartUp', + 'description' => 'qui nous a apporté son soutien dans la mise en place des supports de communication.', + ], + 'five' => [ + 'title' => ' L\'entreprise', + 'description' => ' sponsor du Meetup.', + ], + 'paragraph_one' => 'Laravel Cameroun est une communauté de développeurs et de designers qui se réunissent pour + s\'entraider. L\'industrie du logiciel reposant sur la collaboration et l\'apprentissage en + réseau. Nous nous sommes donnés comme objectif de pouvoir rassembler le maximum de + développeurs et designers évoluant au Cameroun et dans l\'Afrique Francophone pour organiser + des grands événements et Meetup partout dans le Cameroun et en Afrique Francophone.', + + ], + 'our_team' => [ + 'title' => 'Voir l\'equipe', + 'description' => ' Laravel Cameroun est une idée de Meetup qui a été initiée puis transformée en une communauté de développeurs', + ], + +]; diff --git a/resources/views/about.blade.php b/resources/views/about.blade.php deleted file mode 100644 index dfaeaac3..00000000 --- a/resources/views/about.blade.php +++ /dev/null @@ -1,306 +0,0 @@ - - -
-
-

- - À propos - - - Nous construisons une communauté Open Source d'apprenants et d'enseignants - -

-
-
-

- - " - Tout le monde enseigne, tout le monde apprend - " - - . Tel est l'esprit qui est derrière la communauté. Une communauté qui se veut grandissante et qui - donne la possibilité à tout le monde de partager ses connaissances et d'apprendre. -

-
-
- -
-
-
-
Membres sur Slack
-
+300
-
-
-
Membres sur Telegram
-
+700
-
-
-
Membres sur WhatsApp
-
+350
-
-
-
- -
-

- - Notre histoire - - - Nous commençons tout juste - -

- -
-
-
-

- Lancé en Juin 2018, Laravel CM a rapidement commencé à se développer et à démarrer ses - activités par un premier Meetup pour sa présentation globale et ses objectifs. Ce Meetup a - enregistré plus de 100 participants. -

-

- Durant cet événement, nous avons notamment enregistré la participation des entreprises - telles que: -

-
    -
  • - L'incubateur - ActivSpaces - qui a hébergé le meetup. -
  • -
  • - L'entreprise - Kerawa Cameroun - qui a été l'un de nos sponsors. -
  • -
  • - La StartUp - John's Corporation - qui a été un sponsor et nous a soutenu dans la communication. -
  • -
  • - La StartUp - Dark Code - qui nous a apporté son soutien dans la mise en place des supports de communication. -
  • -
  • - L'entreprise - Diool - sponsor du Meetup. -
  • -
-

- Laravel Cameroun est une communauté de développeurs et de designers qui se réunissent pour - s'entraider. L'industrie du logiciel reposant sur la collaboration et l'apprentissage en - réseau. Nous nous sommes donnés comme objectif de pouvoir rassembler le maximum de - développeurs et designers évoluant au Cameroun et dans l'Afrique Francophone pour organiser - des grands événements et Meetup partout dans le Cameroun et en Afrique Francophone. -

-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- - Notre équipe - -

- Équipe de direction -

-

- Laravel Cameroun est une idée qui a été initiée puis transformée en une communauté par 2 - développeurs parmi les plus influents au Cameroun. -

-
-
- -
-
-
-
-
-
diff --git a/resources/views/livewire/discussions/subscribe.blade.php b/resources/views/livewire/discussions/subscribe.blade.php deleted file mode 100644 index b5735541..00000000 --- a/resources/views/livewire/discussions/subscribe.blade.php +++ /dev/null @@ -1,43 +0,0 @@ -
- - @can('unsubscribe', $discussion) - - - - - Se désabonner - - - @elsecan('subscribe', $discussion) - - - - - S'abonner - - - @endcan - -
diff --git a/resources/views/livewire/pages/about.blade.php b/resources/views/livewire/pages/about.blade.php new file mode 100644 index 00000000..539bfbf2 --- /dev/null +++ b/resources/views/livewire/pages/about.blade.php @@ -0,0 +1,266 @@ + + [ + [ + 'name' => 'Arthur Monney', + 'title' => 'Développeur Web Fullstack', + 'avatar' => 'https://avatars.githubusercontent.com/u/14105989?v=4', + 'social_links' => [ + 'twitter' => 'https://twitter.com/MonneyArthur', + 'github' => 'https://github.com/mckenziearts', + 'linkedin' => 'https://www.linkedin.com/in/arthurmonney', + ], + ], + [ + 'name' => 'Fabrice Yopa', + 'title' => 'Co-Founder & CTO IS Dev Experts', + 'avatar' => 'https://avatars.githubusercontent.com/u/4902424?v=4', + 'social_links' => [ + 'twitter' => 'https://twitter.com/yopafabrice', + 'github' => 'https://github.com/fabriceyopa', + 'linkedin' => 'https://www.linkedin.com/in/fabriceyopa', + ], + ], + [ + 'name' => 'Chris Samory', + 'title' => ' Web Fullstack Developer', + 'avatar' => 'https://avatars.githubusercontent.com/u/62399387?s=96&v=4', + 'social_links' => [ + 'twitter' => 'https://x.com/NdeTakougne', + 'github' => 'https://github.com/cybersoldattech', + 'linkedin' => 'https://www.linkedin.com/in/chris-samory-takougne-nde-003084224/', + ], + ], + [ + 'name' => 'Stevy Endaman', + 'title' => ' Web Fullstack Developer', + 'avatar' => 'https://avatars.githubusercontent.com/u/25743606?u=3e52c493f01b83c582b8e2fc845efc83f1c4d83d', + 'social_links' => [ + 'twitter' => 'https://x.com/stevyabessolo', + 'github' => 'https://github.com/StevyMarlino', + 'linkedin' => 'https://www.linkedin.com/in/endaman-stevy', + ], + ] + ] + +]); + +?> + +
+ +
+
+

+ + {{ __('pages/about.title') }} + + + {{ __('pages/about.description') }} + +

+
+
+

+ + " + {{ __('pages/about.second_description_part_one') }} + + " + + {{ __('pages/about.second_description_part_two') }} +

+
+
+ +
+
+
+
{{ __('pages/about.stats.member_discord') }}
+
+300
+
+
+
{{ __('pages/about.stats.member_telegram') }}
+
+700
+
+
+
{{ __('pages/about.stats.member_whatsapp') }}
+
+350
+
+
+
+ +
+

+ + {{ __('pages/about.history') }} + + + {{ __('pages/about.history_part_one') }} + +

+ +
+
+
+

+ {{ __('pages/about.first_description') }} +

+

+ {{ __('pages/about.second_description') }} +

+
    +
  • + {{ __('pages/about.list.one.title') }} + ActivSpaces + {{ __('pages/about.list.one.description') }} +
  • +
  • + {{ __('pages/about.list.two.title') }} + Kerawa Cameroun + {{ __('pages/about.list.two.description') }} +
  • +
  • + {{ __('pages/about.list.three.title') }} + John's Corporation + {{ __('pages/about.list.three.description') }} +
  • +
  • + {{ __('pages/about.list.four.title') }} + Dark Code + {{ __('pages/about.list.four.description') }} +
  • +
  • + {{ __('pages/about.list.five.title') }} + Diool + {{ __('pages/about.list.five.description') }} +
  • +
+

+ {{ __('pages/about.list.paragraph_one') }} +

+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+

+ {{ __('pages/about.our_team.title') }} +

+

+ {{ __('pages/about.our_team.description') }} +

+
+
+ +
+
+
+
+
+
diff --git a/resources/views/livewire/pages/discussions/single-discussion.blade.php b/resources/views/livewire/pages/discussions/single-discussion.blade.php index 1848d414..6c34fcc2 100644 --- a/resources/views/livewire/pages/discussions/single-discussion.blade.php +++ b/resources/views/livewire/pages/discussions/single-discussion.blade.php @@ -116,9 +116,7 @@ class="mx-auto mt-6 text-sm prose prose-sm prose-green max-w-none dark:prose-inv

{{ __('pages/discussion.comments_count', ['count' => $discussion->count_all_replies_with_child]) }}

- @auth - - @endauth + diff --git a/routes/web.php b/routes/web.php index 4083ad80..e1dbf065 100644 --- a/routes/web.php +++ b/routes/web.php @@ -10,11 +10,12 @@ use App\Livewire\Pages\Home; use App\Livewire\Pages\Notifications; use Illuminate\Support\Facades\Route; +use Livewire\Volt\Volt; Route::get('/', Home::class)->name('home'); // Static pages -Route::view('a-propos', 'about')->name('about'); +Volt::route('a-propos', 'pages.about')->name('about'); Route::view('privacy', 'privacy')->name('privacy'); Route::view('rules', 'rules')->name('rules'); Route::view('terms', 'terms')->name('terms'); From 10dfc55311beb93a40a6acc68ab20c7551585bdb Mon Sep 17 00:00:00 2001 From: Chri$ Date: Tue, 24 Dec 2024 12:45:38 +0100 Subject: [PATCH 2/6] feat:[lar-144] add accent --- lang/fr/pages/about.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/fr/pages/about.php b/lang/fr/pages/about.php index 82d6c3ca..b6fe4878 100644 --- a/lang/fr/pages/about.php +++ b/lang/fr/pages/about.php @@ -51,7 +51,7 @@ ], 'our_team' => [ - 'title' => 'Voir l\'equipe', + 'title' => 'Voir l\'équipe', 'description' => ' Laravel Cameroun est une idée de Meetup qui a été initiée puis transformée en une communauté de développeurs', ], From 2bf56c15d7c8c4537c7a8e5c03472e848380c3d2 Mon Sep 17 00:00:00 2001 From: Chri$ Date: Tue, 24 Dec 2024 19:34:14 +0100 Subject: [PATCH 3/6] feat:[lar-144] add Dynamic component and move files to page directory --- lang/en/pages/about.php | 2 +- .../livewire/components/user/notifications.blade.php | 2 +- resources/views/livewire/pages/about.blade.php | 8 ++------ resources/views/{ => livewire/pages}/privacy.blade.php | 8 ++++---- resources/views/{ => livewire/pages}/rules.blade.php | 5 ++--- resources/views/{ => livewire/pages}/terms.blade.php | 8 ++++---- routes/web.php | 6 +++--- 7 files changed, 17 insertions(+), 22 deletions(-) rename resources/views/{ => livewire/pages}/privacy.blade.php (90%) rename resources/views/{ => livewire/pages}/rules.blade.php (94%) rename resources/views/{ => livewire/pages}/terms.blade.php (92%) diff --git a/lang/en/pages/about.php b/lang/en/pages/about.php index 17c045e0..8342b6c9 100644 --- a/lang/en/pages/about.php +++ b/lang/en/pages/about.php @@ -12,7 +12,7 @@ 'stats' => [ 'member_discord' => 'Members on Discord', - 'member_telegram' => 'Members on Discord', + 'member_telegram' => 'Members on Telegram', 'member_whatsapp' => 'Members on WhatsApp', ], 'history' => 'Our history', diff --git a/resources/views/livewire/components/user/notifications.blade.php b/resources/views/livewire/components/user/notifications.blade.php index 5d1ea028..f827fec5 100644 --- a/resources/views/livewire/components/user/notifications.blade.php +++ b/resources/views/livewire/components/user/notifications.blade.php @@ -12,7 +12,7 @@ wire:click="redirectToSubscription({{ $subscription->subscribeable_id }}, '{{ $subscription->subscribeable_type }}')" class="text-base/6 text-left font-medium text-gray-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-500" > - {{ $subscription->subscribeAble->title }} + {{ $subscription->subscribeAble?->title }}
- - -
- - - -
-
- -
- -
- @if ($hasCancelButton) - Annuler - @endif - - @if ($hasButton) - - {{ $buttonLabel }} - - @endif -
-
- -
-
- {!! $this->preview !!} -
-
- - diff --git a/resources/views/livewire/markdown-x.blade.php b/resources/views/livewire/markdown-x.blade.php deleted file mode 100644 index e5c226ef..00000000 --- a/resources/views/livewire/markdown-x.blade.php +++ /dev/null @@ -1,1913 +0,0 @@ -
-
-
-
-
- - Saisi -
-
-
-
- - - - Aide -
-
- -
- -
- - {{-- MarkdownX Editor --}} -
- -
-
-
-
-
-
-
- - - - -
-
-
-
- -
-
-
-
- - - - - - - - -
-
-
-
- Cursor Start: - - Cursor End: - -
-
-
-
-
-
-
-
- - - - - - - - -
-
-
-
- Cursor Start: - - Cursor End: - -
-
-
-
-
- Type '/' for commands -
- - - -
-
- - - - - - - Drop Files Here -
-
-
-
- - {{-- MarkdownX Preview Section --}} -
- {!! $contentPreview !!} -
- {{-- End: MarkdownX Preview Section --}} - - {{-- MarkdownX Help Section --}} -
-

Markdown Basics

-

- Below you will find some common used markdown syntax. For a deeper dive in Markdown check out this - - Cheat Sheet - -

-
- -

Bold & Italic

-

- Italics - *asterisks* -
- Bold - **double asterisks** -

-
- -

Code

-

- Inline Code -
- `backtick` - Code Block - - ``` -
- Three back ticks and then enter your code blocks here. -
- ``` -
-

-
- -

Headers

-

- # This is a Heading 1 -
- ## This is a Heading 2 -
- ### This is a Heading 3 -
-

-
- -

Quotes

-
> type a greater than sign and start typing your quote.
-
- -

Links

-

- You can add - links - by adding text inside of - [] - and the link inside of - () - , like so: -

-
[link_text](https://google.com)
-
- -

Lists

-

- To add a numbered list you can simply start with a number and a - . - , like so: -
- 1. The first item in my list -

-

- For an unordered list, you can add a dash - - - , like so: -
- - The start of my list -

-
- -

Images

-

- You can add images by selecting the image icon, which will upload and add an image to the editor, or you - can manually add the image by adding an exclamation - ! - , followed by the alt text inside of - [] - , and the image URL inside of - () - , like so: -

-
![alt text for image](url_to_image.png)
-
- -

Dividers

-

- To add a divider you can add three dashes or three asterisks: -
- --- or *** -

-
- - @if (in_array('giphy', config('markdownx.dropdown_items'))) -

Embedding GIFs via Giphy

-

- You can easily embed animated GIFS with the following syntax: -
- {% giphy https://giphy.com/embed/giphy_id %} -

-
- @endif - - @if (in_array('codepen', config('markdownx.dropdown_items'))) -

Embedding Codepens

-

- You can also embed a codepen by writing the following: -
- {% codepen https://codepen.io/your/pen/url %} -

-

- You may also choose the default tabs you wish to show your pen by writing the - default-tab - like so: (default is result) -

-

- - {% codepen https://codepen.io/your/pen/url default-tab=result,html %} - -

-
- @endif - - @if (in_array('codesandbox', config('markdownx.dropdown_items'))) -

Embedding CodeSandbox

-

- You can also embed CodeSandbox by writing the following: -
- {% codesandbox YOUR_CODESANDBOX_EMBED_URL %} -

-
- @endif - - @if (in_array('gists', config('markdownx.dropdown_items'))) -

Embedding Gists

-

- You can also embed a Gists by writing the following: -
- {% gist GIST_ID_HERE %} -

-
- @endif - - @if (in_array('youtube', config('markdownx.dropdown_items'))) -

Embedding YouTube Videos

-

- You can also embed a YouTube video by writing the following: -
- {% youtube VIDEO_ID_HERE %} -

-
- @endif - - @if (in_array('buy_me_a_coffee', config('markdownx.dropdown_items'))) -

Embedding buymeacoffee.com

-

- You can also embed your "Buy me a coffee" button by writing the following: -
- - {% buymeacoffee BUY_ME_A_COFFEE_USERNAME_HERE %} - -

-
- @endif -
- {{-- End: MarkdownX Help Section --}} -
- - - - diff --git a/resources/views/livewire/pages/about.blade.php b/resources/views/livewire/pages/about.blade.php index fc4020b3..26f4c98f 100644 --- a/resources/views/livewire/pages/about.blade.php +++ b/resources/views/livewire/pages/about.blade.php @@ -4,11 +4,11 @@ use function Livewire\Volt\{state}; -state(['profiles' => - [ +state([ + 'profiles' => [ [ 'name' => 'Arthur Monney', - 'title' => 'Développeur Web Fullstack', + 'title' => 'Dévelopeur Advocate & Fullstack', 'avatar' => 'https://avatars.githubusercontent.com/u/14105989?v=4', 'social_links' => [ 'twitter' => 'https://twitter.com/MonneyArthur', @@ -119,7 +119,7 @@ class="mt-2 block text-2xl font-extrabold tracking-tight sm:text-3xl xl:text-4xl
  • {{ __('pages/about.list.one.title') }} - ActivSpaces + ActivSpaces {{ __('pages/about.list.one.description') }}
  • @@ -129,17 +129,17 @@ class="mt-2 block text-2xl font-extrabold tracking-tight sm:text-3xl xl:text-4xl
  • {{ __('pages/about.list.three.title') }} - John's Corporation + John's Corporation {{ __('pages/about.list.three.description') }}
  • {{ __('pages/about.list.four.title') }} - Dark Code + Dark Code {{ __('pages/about.list.four.description') }}
  • {{ __('pages/about.list.five.title') }} - Diool + Diool {{ __('pages/about.list.five.description') }}
@@ -241,11 +241,9 @@ class="space-y-12 sm:grid sm:grid-cols-2 sm:gap-x-6 sm:gap-y-12 sm:space-y-0 lg:
    @foreach($profile['social_links'] as $platform => $url)
  • - + {{ ucfirst($platform) }} - @if(\Illuminate\Support\Facades\View::exists('components.icon.'.$platform)) - - @endif +
  • @endforeach diff --git a/resources/views/livewire/pages/notifications.blade.php b/resources/views/livewire/pages/notifications.blade.php index 79912bba..67f7bfbb 100644 --- a/resources/views/livewire/pages/notifications.blade.php +++ b/resources/views/livewire/pages/notifications.blade.php @@ -1,225 +1,225 @@
    - -
    - - -

    - Notifications - -

    -
    + +
    + -
    -
    - @forelse ($notifications as $date => $record) -
    -
    -

    - - - - {{ $date }} -

    -
    +

    + Notifications + +

    +
    -
    -
      - @foreach ($record as $notification) - @includeIf("components.notifications.{$notification->data['type']}") - @endforeach -
    -
    -
    - @empty -
    -
    +
    +
    + @forelse ($notifications as $date => $record) +
    +
    +

    -

    - {{ __('pages/notification.empty') }} -

    -

    + {{ $date }} +
    -
    -

    - {{ __('pages/notification.new_content') }} -

    -

    - {{ __('pages/notification.choose_content') }} +

    +
      + @foreach ($record as $notification) + @includeIf("components.notifications.{$notification->data['type']}") + @endforeach +
    +
    +
    + @empty +
    +
    + + + +

    + {{ __('pages/notification.empty') }}

    -
    + -
  • -
    -
    - - - - - -
    -
    - -

    - {{ __('pages/notification.ask_help_description') }} -

    -
    -
    +
  • +
    +
    + - + + +
    +
    + +

    + {{ __('pages/notification.ask_help_description') }} +

    -
  • -
- - @endforelse - - - +
+ + + +
+ + + + + @endforelse + + + diff --git a/resources/views/livewire/pages/privacy.blade.php b/resources/views/pages/privacy.blade.php similarity index 100% rename from resources/views/livewire/pages/privacy.blade.php rename to resources/views/pages/privacy.blade.php diff --git a/resources/views/livewire/pages/rules.blade.php b/resources/views/pages/rules.blade.php similarity index 100% rename from resources/views/livewire/pages/rules.blade.php rename to resources/views/pages/rules.blade.php diff --git a/resources/views/livewire/pages/terms.blade.php b/resources/views/pages/terms.blade.php similarity index 100% rename from resources/views/livewire/pages/terms.blade.php rename to resources/views/pages/terms.blade.php diff --git a/routes/web.php b/routes/web.php index 83840a44..30f81613 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,9 +16,9 @@ // Static pages Volt::route('a-propos', 'pages.about')->name('about'); -Route::view('privacy', 'livewire.pages.privacy')->name('privacy'); -Route::view('rules', 'livewire.pages.rules')->name('rules'); -Route::view('terms', 'livewire.pages.terms')->name('terms'); +Route::view('privacy', 'pages.privacy')->name('privacy'); +Route::view('rules', 'pages.rules')->name('rules'); +Route::view('terms', 'pages.terms')->name('terms'); // Social authentication Route::get('auth/{provider}', [OAuthController::class, 'redirectToProvider'])->name('social.auth'); From 79797d8e4a52322714c18833269094381d920939 Mon Sep 17 00:00:00 2001 From: Chri$ Date: Tue, 24 Dec 2024 23:56:21 +0100 Subject: [PATCH 6/6] fix:[lar-144] test bug --- tests/Feature/Livewire/Components/NotificationCountTest.php | 4 ++-- .../Feature/Livewire/Components/NotificationIndicatorTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Feature/Livewire/Components/NotificationCountTest.php b/tests/Feature/Livewire/Components/NotificationCountTest.php index 8179bf18..0d4582e6 100644 --- a/tests/Feature/Livewire/Components/NotificationCountTest.php +++ b/tests/Feature/Livewire/Components/NotificationCountTest.php @@ -9,11 +9,11 @@ }); it('renders successfully', function (): void { - Volt::test('notification-count') + Volt::test('components.notification-count') ->assertStatus(200); }); it('can display user count notification', function (): void { - Volt::test('notification-count') + Volt::test('components.notification-count') ->assertSee($this->user->unreadNotifications()->count()); }); diff --git a/tests/Feature/Livewire/Components/NotificationIndicatorTest.php b/tests/Feature/Livewire/Components/NotificationIndicatorTest.php index 0791a500..5fdbf78a 100644 --- a/tests/Feature/Livewire/Components/NotificationIndicatorTest.php +++ b/tests/Feature/Livewire/Components/NotificationIndicatorTest.php @@ -9,11 +9,11 @@ }); it('renders successfully', function (): void { - Volt::test('notification-indicator') + Volt::test('components.notification-indicator') ->assertStatus(200); }); it('mask indicator if user can have unread notification', function (): void { - Volt::test('notification-indicator') + Volt::test('components.notification-indicator') ->assertSet('hasNotification', false); });