Skip to content

Commit 7a6c6a0

Browse files
committed
♻️ refactoring icon et correction des bugs
1 parent 58769f6 commit 7a6c6a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+71308
-359
lines changed

app/Http/Controllers/Cpanel/AnalyticsController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace App\Http\Controllers\Cpanel;
44

55
use App\Http\Controllers\Controller;
6-
use Illuminate\Http\Request;
76

87
class AnalyticsController extends Controller
98
{

app/Http/Kernel.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class Kernel extends HttpKernel
2222
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
2323
\App\Http\Middleware\TrimStrings::class,
2424
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
25-
\AndreasElia\Analytics\Http\Middleware\Analytics::class,
2625
];
2726

2827
/**

app/Http/Livewire/Discussions/Subscribe.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
use App\Models\Discussion;
66
use App\Models\Subscribe as SubscribeModel;
77
use App\Policies\DiscussionPolicy;
8+
use Illuminate\Contracts\View\View;
89
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
910
use Illuminate\Support\Facades\Auth;
1011
use Livewire\Component;
1112
use Ramsey\Uuid\Uuid;
12-
use WireUi\Traits\Actions;
1313

1414
class Subscribe extends Component
1515
{
16-
use Actions, AuthorizesRequests;
16+
use AuthorizesRequests;
1717

1818
public Discussion $discussion;
1919

@@ -28,7 +28,7 @@ public function subscribe()
2828
$subscribe->user()->associate(Auth::user());
2929
$this->discussion->subscribes()->save($subscribe);
3030

31-
$this->notification()->success('Abonnement', 'Vous êtes maintenant abonné à cette discussion.');
31+
// @ToDo Mettre un nouveau system de notification avec Livewire $this->notification()->success('Abonnement', 'Vous êtes maintenant abonné à cette discussion.');
3232
$this->emitSelf('refresh');
3333
}
3434

@@ -40,11 +40,11 @@ public function unsubscribe()
4040
->where('user_id', Auth::id())
4141
->delete();
4242

43-
$this->notification()->success('Désabonnement', 'Vous êtes maintenant désabonné de cette discussion.');
43+
// @ToDo Mettre un nouveau system de notification $this->notification()->success('Désabonnement', 'Vous êtes maintenant désabonné de cette discussion.');
4444
$this->emitSelf('refresh');
4545
}
4646

47-
public function render()
47+
public function render(): View
4848
{
4949
return view('livewire.discussions.subscribe');
5050
}

app/Http/Livewire/Forum/Reply.php

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use App\Models\Thread;
88
use App\Policies\ReplyPolicy;
99
use App\Policies\ThreadPolicy;
10+
use Illuminate\Contracts\View\View;
1011
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
1112
use Illuminate\Support\Facades\Auth;
1213
use Livewire\Component;
13-
use WireUi\Traits\Actions;
1414

1515
class Reply extends Component
1616
{
17-
use Actions, AuthorizesRequests;
17+
use AuthorizesRequests;
1818

1919
public ReplyModel $reply;
2020

@@ -53,10 +53,11 @@ public function edit()
5353

5454
$this->reply->update(['body' => $this->body]);
5555

56-
$this->notification()->success(
57-
'Réponse modifié',
58-
'Vous avez modifié cette solution avec succès.'
59-
);
56+
// @ToDo mettre un nouveau system de notification
57+
// $this->notification()->success(
58+
// 'Réponse modifié',
59+
// 'Vous avez modifié cette solution avec succès.'
60+
// );
6061

6162
$this->isUpdating = false;
6263

@@ -73,10 +74,11 @@ public function UnMarkAsSolution(): void
7374

7475
$this->emitSelf('refresh');
7576

76-
$this->notification()->success(
77-
'Réponse acceptée',
78-
'Vous avez retiré cette réponse comme solution pour ce sujet.'
79-
);
77+
// @ToDo mettre un nouveau system de notification
78+
// $this->notification()->success(
79+
// 'Réponse acceptée',
80+
// 'Vous avez retiré cette réponse comme solution pour ce sujet.'
81+
// );
8082
}
8183

8284
public function markAsSolution(): void
@@ -93,13 +95,14 @@ public function markAsSolution(): void
9395

9496
$this->emitSelf('refresh');
9597

96-
$this->notification()->success(
97-
'Réponse acceptée',
98-
'Vous avez accepté cette solution pour ce sujet.'
99-
);
98+
// @ToDo mettre un nouveau system de notification
99+
// $this->notification()->success(
100+
// 'Réponse acceptée',
101+
// 'Vous avez accepté cette solution pour ce sujet.'
102+
// );
100103
}
101104

102-
public function render()
105+
public function render(): View
103106
{
104107
return view('livewire.forum.reply');
105108
}

app/Http/Livewire/Forum/Subscribe.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
use App\Models\Subscribe as SubscribeModel;
66
use App\Models\Thread;
77
use App\Policies\ThreadPolicy;
8+
use Illuminate\Contracts\View\View;
89
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
910
use Illuminate\Support\Facades\Auth;
1011
use Livewire\Component;
1112
use Ramsey\Uuid\Uuid;
12-
use WireUi\Traits\Actions;
1313

1414
class Subscribe extends Component
1515
{
16-
use Actions, AuthorizesRequests;
16+
use AuthorizesRequests;
1717

1818
public Thread $thread;
1919

@@ -28,7 +28,8 @@ public function subscribe()
2828
$subscribe->user()->associate(Auth::user());
2929
$this->thread->subscribes()->save($subscribe);
3030

31-
$this->notification()->success('Abonnement', 'Vous êtes maintenant abonné à ce sujet.');
31+
// @ToDo mettre un nouveau system de notification
32+
//$this->notification()->success('Abonnement', 'Vous êtes maintenant abonné à ce sujet.');
3233
$this->emitSelf('refresh');
3334
}
3435

@@ -40,11 +41,12 @@ public function unsubscribe()
4041
->where('user_id', Auth::id())
4142
->delete();
4243

43-
$this->notification()->success('Désabonnement', 'Vous êtes maintenant désabonné de ce sujet.');
44+
// @ToDo mettre un nouveau system de notification
45+
// $this->notification()->success('Désabonnement', 'Vous êtes maintenant désabonné de ce sujet.');
4446
$this->emitSelf('refresh');
4547
}
4648

47-
public function render()
49+
public function render(): View
4850
{
4951
return view('livewire.forum.subscribe');
5052
}

app/Http/Livewire/Notifications.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
use App\Policies\NotificationPolicy;
66
use Carbon\Carbon;
7+
use Illuminate\Contracts\View\View;
78
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
89
use Illuminate\Notifications\DatabaseNotification;
910
use Illuminate\Support\Facades\Auth;
1011
use Livewire\Component;
11-
use WireUi\Traits\Actions;
1212

1313
class Notifications extends Component
1414
{
15-
use Actions, AuthorizesRequests;
15+
use AuthorizesRequests;
1616

1717
public $notificationId;
1818

@@ -36,12 +36,13 @@ public function markAsRead(string $notificationId): void
3636
// @phpstan-ignore-next-line
3737
$this->notification->markAsRead();
3838

39-
$this->notification()->success('Notification', 'Cette notification a été marquée comme lue.');
39+
// @ToDo mettre un nouveau system de notification
40+
// $this->notification()->success('Notification', 'Cette notification a été marquée comme lue.');
4041

4142
$this->emit('NotificationMarkedAsRead', Auth::user()->unreadNotifications()->count());
4243
}
4344

44-
public function render()
45+
public function render(): View
4546
{
4647
return view('livewire.notifications', [
4748
'notifications' => Auth::user()

app/Http/Livewire/Reactions.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77
use Illuminate\Contracts\View\View;
88
use Illuminate\Support\Facades\Auth;
99
use Livewire\Component;
10-
use WireUi\Traits\Actions;
1110

1211
class Reactions extends Component
1312
{
14-
use Actions;
15-
1613
public ReactableInterface $model;
1714

1815
public bool $withPlaceHolder = true;
@@ -24,12 +21,14 @@ class Reactions extends Component
2421
public function userReacted(string $reaction): void
2522
{
2623
if (Auth::guest()) {
27-
$this->notification()->error(
28-
'Oh Oh! Erreur',
29-
'Vous devez être connecté pour réagir à ce contenu!'
30-
);
24+
// @ToDo mettre un nouveau system de notification
25+
// $this->notification()->error(
26+
// 'Oh Oh! Erreur',
27+
// 'Vous devez être connecté pour réagir à ce contenu!'
28+
// );
3129
} else {
32-
$react = Reaction::where('name', $reaction)->first();
30+
/** @var Reaction $react */
31+
$react = Reaction::query()->where('name', $reaction)->first();
3332
Auth::user()->reactTo($this->model, $react);
3433
}
3534
}

app/Http/Livewire/User/Settings/Notifications.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
88
use Illuminate\Support\Facades\Auth;
99
use Livewire\Component;
10-
use WireUi\Traits\Actions;
1110

1211
class Notifications extends Component
1312
{
14-
use Actions, AuthorizesRequests;
13+
use AuthorizesRequests;
1514

1615
public $subscribeId;
1716

@@ -22,7 +21,8 @@ public function unsubscribe(string $subscribeId)
2221
// @phpstan-ignore-next-line
2322
$this->subscribe->delete();
2423

25-
$this->notification()->success('Désabonnement', 'Vous êtes maintenant désabonné de cet fil.');
24+
// @ToDo mettre un nouveau system de notification
25+
// $this->notification()->success('Désabonnement', 'Vous êtes maintenant désabonné de cet fil.');
2626
}
2727

2828
public function getSubscribeProperty(): Subscribe

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"php": "^8.0",
99
"ext-fileinfo": "*",
1010
"ext-json": "*",
11-
"andreaselia/analytics": "^1.5",
1211
"archtechx/laravel-seo": "^0.4.0",
1312
"arrilot/laravel-widgets": "^3.13",
1413
"blade-ui-kit/blade-heroicons": "^1.3",

composer.lock

Lines changed: 1 addition & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/app.css

Lines changed: 9479 additions & 11 deletions
Large diffs are not rendered by default.

public/js/app.js

Lines changed: 61438 additions & 2 deletions
Large diffs are not rendered by default.

public/mix-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/js/app.js": "/js/app.js?id=b1a7a2e198e9cbc10d82d5dacb642f89",
3-
"/css/app.css": "/css/app.css?id=335776d4413d0901ae664bb2f4044b0d"
2+
"/js/app.js": "/js/app.js",
3+
"/css/app.css": "/css/app.css"
44
}

resources/js/components/Comments.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { memo } from 'preact/compat'
22
import { useCallback, useEffect, useMemo, useRef, useState } from 'preact/hooks'
33
import ContentLoader from 'react-content-loader'
4-
import { ChatAltIcon } from '@heroicons/react/solid'
4+
import { ChatBubbleLeftIcon } from '@heroicons/react/24/solid'
55
import { findAllReplies, addReply, updateReply, deleteReply, likeReply } from '@api/comments';
66
import { DefaultButton, PrimaryButton } from '@components/Button';
77
import { Field } from '@components/Form'
@@ -429,13 +429,12 @@ function CommentForm ({ onSubmit, parent, isRoot = false, onCancel = null }) {
429429
<div className="flex-shrink-0">
430430
<div className="relative">
431431
<img
432-
className="h-10 w-10 rounded-full bg-skin-card-gray flex items-center justify-center ring-8 ring-body"
432+
className="h-10 w-10 rounded-full object-cover bg-skin-card-gray flex items-center justify-center ring-8 ring-body"
433433
src={`${currentUser().picture}`}
434-
alt=""
434+
alt={`${currentUser().name}`}
435435
/>
436-
437436
<span className="absolute -bottom-0.5 -right-1 bg-skin-body rounded-tl px-0.5 py-px">
438-
<ChatAltIcon className="h-5 w-5 text-skin-muted" aria-hidden="true" />
437+
<ChatBubbleLeftIcon className="h-5 w-5 text-skin-muted" aria-hidden="true" />
439438
</span>
440439
</div>
441440
</div>

0 commit comments

Comments
 (0)