diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index b20f3b6f..0cdea233 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: main @@ -21,7 +21,7 @@ jobs: release-notes: ${{ github.event.release.body }} - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: main commit_message: Update CHANGELOG diff --git a/app/Filament/Resources/ArticleResource.php b/app/Filament/Resources/ArticleResource.php index 6558d56f..aeb80871 100644 --- a/app/Filament/Resources/ArticleResource.php +++ b/app/Filament/Resources/ArticleResource.php @@ -56,6 +56,9 @@ public static function table(Table $table): Table ->label('Auteur') ->sortable() ->searchable(), + Tables\Columns\TextColumn::make('created_at') + ->label(__('Date de création')) + ->date(), Tables\Columns\IconColumn::make('published_at') ->label('Publié') ->getStateUsing(fn (Article $record) => $record->isPublished()) diff --git a/app/Http/Controllers/Api/Auth/RegisterController.php b/app/Http/Controllers/Api/Auth/RegisterController.php index 324b787d..be359ca9 100644 --- a/app/Http/Controllers/Api/Auth/RegisterController.php +++ b/app/Http/Controllers/Api/Auth/RegisterController.php @@ -31,7 +31,7 @@ public function register(RegisterRequest $request): JsonResponse $user->assignRole('company'); - //TODO: Send new company registration notification on Slack + // TODO: Send new company registration notification on Slack event(new ApiRegistered($user)); return response()->json( @@ -81,9 +81,9 @@ public function googleAuthenticator(Request $request): JsonResponse 'avatar' => $socialUser['photoUrl'], ]); - //TODO: Send welcome email to user 1 hour after registration + // TODO: Send welcome email to user 1 hour after registration - //TODO: Send new company registration notification on Slack + // TODO: Send new company registration notification on Slack $user->last_login_at = Carbon::now(); $user->last_login_ip = $request->ip(); diff --git a/app/Livewire/Reactions.php b/app/Livewire/Components/Reactions.php similarity index 92% rename from app/Livewire/Reactions.php rename to app/Livewire/Components/Reactions.php index 0dd238a0..3685cda1 100644 --- a/app/Livewire/Reactions.php +++ b/app/Livewire/Components/Reactions.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Livewire; +namespace App\Livewire\Components; use App\Contracts\ReactableInterface; use App\Models\Reaction; @@ -40,6 +40,6 @@ public function userReacted(string $reaction): void public function render(): View { - return view('livewire.reactions'); + return view('livewire.components.reactions'); } } diff --git a/app/Livewire/ReportSpam.php b/app/Livewire/Components/ReportSpam.php similarity index 98% rename from app/Livewire/ReportSpam.php rename to app/Livewire/Components/ReportSpam.php index 707a017d..8a2caf54 100644 --- a/app/Livewire/ReportSpam.php +++ b/app/Livewire/Components/ReportSpam.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Livewire; +namespace App\Livewire\Components; use App\Actions\ReportSpamAction; use App\Contracts\SpamReportableContract; diff --git a/app/Livewire/Pages/Forum/Index.php b/app/Livewire/Pages/Forum/Index.php index 14ec2378..8a8d64f7 100644 --- a/app/Livewire/Pages/Forum/Index.php +++ b/app/Livewire/Pages/Forum/Index.php @@ -24,10 +24,10 @@ final class Index extends Component use WithoutUrlPagination; use WithPagination; - #[Url(as: 'channel')] + #[Url] public ?string $channel = null; - #[Url(as: 'solved')] + #[Url] public ?string $solved = null; #[Url(as: 'me')] @@ -36,7 +36,7 @@ final class Index extends Component #[Url(as: 'no-replies')] public ?string $unAnswered = null; - #[Url] + #[Url(as: 'follow')] public ?string $subscribe = null; public ?Channel $currentChannel = null; @@ -129,6 +129,12 @@ protected function applyChannel(Builder $query): Builder protected function applySubscribe(Builder $query): Builder { + if (Auth::check() && $this->subscribe) { + $query->whereHas('subscribes', function (Builder $query): void { + $query->where('user_id', Auth::id()); + }); + } + return $query; } diff --git a/app/Livewire/Pages/Forum/Leaderboard.php b/app/Livewire/Pages/Forum/Leaderboard.php new file mode 100644 index 00000000..2d63db9f --- /dev/null +++ b/app/Livewire/Pages/Forum/Leaderboard.php @@ -0,0 +1,49 @@ +take(30) + ->get() + ->reject(fn ($leaderboard) => $leaderboard->solutions_count === 0); // @phpstan-ignore-line + + if ($leaderboard->count() > 3) { + $leaders = $leaderboard->slice(0, 3); + $startPosition = 4; + } + + return view('livewire.pages.forum.leaderboard', [ + 'members' => Cache::remember( + key: 'members', + ttl: now()->addWeek(), + callback: fn () => $leaderboard->reject( + fn (User $user) => in_array($user->id, $leaders->pluck('id')->toArray()) // @phpstan-ignore-line + ) + ), + 'leaders' => Cache::remember( + key: 'leaders', + ttl: now()->addWeek(), + callback: fn () => $leaders + ), + 'startPosition' => $startPosition, + ]); + } +} diff --git a/app/Models/User.php b/app/Models/User.php index 9ab40437..f9b206ec 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -420,7 +420,7 @@ public function countThreads(): int public function scopeMostSolutions(Builder $query, ?int $inLastDays = null): Builder { return $query->withCount(['replyAble as solutions_count' => function ($query) use ($inLastDays) { - $query->where('replyable_type', 'threads') + $query->where('replyable_type', 'thread') ->join('threads', 'threads.solution_reply_id', '=', 'replies.id'); if ($inLastDays) { @@ -477,10 +477,8 @@ public function scopeWithCounts(Builder $query): Builder 'articles as articles_count', 'threads as threads_count', 'replyAble as replies_count', - 'replyAble as solutions_count' => function (Builder $query) { - return $query->join('threads', 'threads.solution_reply_id', '=', 'replies.id') - ->where('replyable_type', 'thread'); - }, + 'replyAble as solutions_count' => fn (Builder $query) => $query->join('threads', 'threads.solution_reply_id', '=', 'replies.id') + ->where('replyable_type', 'thread'), ]); } diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 15d8b419..587c599f 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -21,6 +21,7 @@ use Illuminate\Session\Middleware\StartSession; use Illuminate\Support\Facades\Blade; use Illuminate\View\Middleware\ShareErrorsFromSession; +use Vormkracht10\FilamentMails\FilamentMailsPlugin; final class AdminPanelProvider extends PanelProvider { @@ -51,6 +52,7 @@ public function panel(Panel $panel): Panel ->plugins([ SpatieLaravelTranslatablePlugin::make() ->defaultLocales(['fr', 'en']), + FilamentMailsPlugin::make(), ]) ->renderHook( 'body.start', diff --git a/app/View/Composers/TopMembersComposer.php b/app/View/Composers/TopMembersComposer.php deleted file mode 100644 index 73a0f954..00000000 --- a/app/View/Composers/TopMembersComposer.php +++ /dev/null @@ -1,24 +0,0 @@ -with( - 'topMembers', - Cache::remember( - key: 'topMembers', - ttl: now()->addWeek(), - callback: fn () => User::mostSolutionsInLastDays(365)->take(5)->get() - ) - ); - } -} diff --git a/app/Widgets/MostActiveUsersPerWeek.php b/app/Widgets/MostActiveUsersPerWeek.php index 7d37dffc..467b5ea7 100644 --- a/app/Widgets/MostActiveUsersPerWeek.php +++ b/app/Widgets/MostActiveUsersPerWeek.php @@ -33,12 +33,10 @@ public function run(): View $users = User::with('activities') ->withCount('activities') ->verifiedUsers() - ->whereHas('activities', function (Builder $query) { - return $query->whereBetween('created_at', [ - now()->startOfWeek(), - now()->endOfWeek(), - ]); - }) + ->whereHas('activities', fn (Builder $query) => $query->whereBetween('created_at', [ + now()->startOfWeek(), + now()->endOfWeek(), + ])) ->orderByDesc('activities_count') ->limit(5) ->get(); diff --git a/composer.json b/composer.json index 3d551980..1128de76 100644 --- a/composer.json +++ b/composer.json @@ -46,6 +46,7 @@ "symfony/http-client": "^7.1.8", "symfony/mailgun-mailer": "^7.1", "torchlight/torchlight-laravel": "^0.6", + "vormkracht10/filament-mails": "^1.0", "wire-elements/modal": "^2.0", "wire-elements/spotlight": "^2.0", "yarri/link-finder": "^2.7.10", diff --git a/composer.lock b/composer.lock index d2a35e46..9248b5bb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "231723be1478153245cd48c8cc81d53a", + "content-hash": "255123bf274b713735b09291084080af", "packages": [ { "name": "abraham/twitteroauth", @@ -2510,16 +2510,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" + "reference": "b115554301161fa21467629f1e1391c1936de517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", + "reference": "b115554301161fa21467629f1e1391c1936de517", "shasum": "" }, "require": { @@ -2565,7 +2565,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" }, "funding": [ { @@ -2573,7 +2573,7 @@ "type": "github" } ], - "time": "2023-10-06T06:47:41+00:00" + "time": "2024-12-27T00:36:43+00:00" }, { "name": "filament/actions", @@ -4416,6 +4416,74 @@ }, "time": "2017-11-25T19:51:26+00:00" }, + { + "name": "laravel-notification-channels/discord", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/laravel-notification-channels/discord.git", + "reference": "317117f22c6c2b9a4f78976f097c3082e40902da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel-notification-channels/discord/zipball/317117f22c6c2b9a4f78976f097c3082e40902da", + "reference": "317117f22c6c2b9a4f78976f097c3082e40902da", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/guzzle": "^6.3 || ^7.0", + "illuminate/console": "^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0", + "illuminate/notifications": "^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0", + "illuminate/queue": "^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0", + "illuminate/support": "^7.0 || ^8.0 || ^9.0 || ^10.0|^11.0", + "php": "^7.2|^8.0", + "textalk/websocket": "^1.2" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench": "^6.0 || ^7.0 || ^8.0|^9.0", + "phpunit/phpunit": "^8.5 || ^9.0|^10.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NotificationChannels\\Discord\\DiscordServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NotificationChannels\\Discord\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cody Scott", + "email": "cs475x@icloud.com", + "role": "Developer" + } + ], + "description": "Laravel notification driver for Discord.", + "homepage": "https://github.com/laravel-notification-channels/discord", + "keywords": [ + "channel", + "discord", + "driver", + "laravel", + "notification" + ], + "support": { + "issues": "https://github.com/laravel-notification-channels/discord/issues", + "source": "https://github.com/laravel-notification-channels/discord/tree/v1.6.0" + }, + "time": "2024-04-01T01:31:08+00:00" + }, { "name": "laravel-notification-channels/telegram", "version": "5.0.0", @@ -4765,6 +4833,63 @@ }, "time": "2024-12-17T22:32:08+00:00" }, + { + "name": "laravel/helpers", + "version": "v1.7.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/helpers.git", + "reference": "f28907033d7edf8a0525cfb781ab30ce6d531c35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/helpers/zipball/f28907033d7edf8a0525cfb781ab30ce6d531c35", + "reference": "f28907033d7edf8a0525cfb781ab30ce6d531c35", + "shasum": "" + }, + "require": { + "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "php": "^7.2.0|^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^7.0|^8.0|^9.0|^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries@laravel.com" + } + ], + "description": "Provides backwards compatibility for helpers in the latest Laravel release.", + "keywords": [ + "helpers", + "laravel" + ], + "support": { + "source": "https://github.com/laravel/helpers/tree/v1.7.1" + }, + "time": "2024-11-26T14:56:25+00:00" + }, { "name": "laravel/prompts", "version": "v0.3.2", @@ -4949,6 +5074,71 @@ }, "time": "2024-12-16T15:26:28+00:00" }, + { + "name": "laravel/slack-notification-channel", + "version": "v3.4.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/slack-notification-channel.git", + "reference": "282d52d70195283eb1b92e59d7bdc2d525361f4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/282d52d70195283eb1b92e59d7bdc2d525361f4b", + "reference": "282d52d70195283eb1b92e59d7bdc2d525361f4b", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^7.0", + "illuminate/http": "^9.0|^10.0|^11.0", + "illuminate/notifications": "^9.0|^10.0|^11.0", + "illuminate/support": "^9.0|^10.0|^11.0", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.0|^10.4" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Illuminate\\Notifications\\SlackChannelServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Slack Notification Channel for laravel.", + "keywords": [ + "laravel", + "notifications", + "slack" + ], + "support": { + "issues": "https://github.com/laravel/slack-notification-channel/issues", + "source": "https://github.com/laravel/slack-notification-channel/tree/v3.4.2" + }, + "time": "2024-11-29T14:59:32+00:00" + }, { "name": "laravel/socialite", "version": "v5.16.1", @@ -5234,16 +5424,16 @@ }, { "name": "league/commonmark", - "version": "2.6.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "d150f911e0079e90ae3c106734c93137c184f932" + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d150f911e0079e90ae3c106734c93137c184f932", - "reference": "d150f911e0079e90ae3c106734c93137c184f932", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d990688c91cedfb69753ffc2512727ec646df2ad", + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad", "shasum": "" }, "require": { @@ -5337,7 +5527,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T15:34:16+00:00" + "time": "2024-12-29T14:10:59+00:00" }, { "name": "league/config", @@ -6584,16 +6774,16 @@ }, { "name": "nesbot/carbon", - "version": "3.8.3", + "version": "3.8.4", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "f01cfa96468f4c38325f507ab81a4f1d2cd93cfe" + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f01cfa96468f4c38325f507ab81a4f1d2cd93cfe", - "reference": "f01cfa96468f4c38325f507ab81a4f1d2cd93cfe", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/129700ed449b1f02d70272d2ac802357c8c30c58", + "reference": "129700ed449b1f02d70272d2ac802357c8c30c58", "shasum": "" }, "require": { @@ -6686,7 +6876,7 @@ "type": "tidelift" } ], - "time": "2024-12-21T18:03:19+00:00" + "time": "2024-12-27T09:25:35+00:00" }, { "name": "nette/schema", @@ -6892,16 +7082,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.3.1", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -6944,9 +7134,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-10-08T18:51:32+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "notchpay/notchpay-php", @@ -7874,16 +8064,16 @@ }, { "name": "propaganistas/laravel-phone", - "version": "5.3.2", + "version": "5.3.3", "source": { "type": "git", "url": "https://github.com/Propaganistas/Laravel-Phone.git", - "reference": "44efd6edc181616c49f895fff97ad1cc0f3fecb2" + "reference": "2172362ae5714ddc397d9df96a44b82bd125631a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/44efd6edc181616c49f895fff97ad1cc0f3fecb2", - "reference": "44efd6edc181616c49f895fff97ad1cc0f3fecb2", + "url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/2172362ae5714ddc397d9df96a44b82bd125631a", + "reference": "2172362ae5714ddc397d9df96a44b82bd125631a", "shasum": "" }, "require": { @@ -7894,7 +8084,6 @@ "php": "^8.1" }, "require-dev": { - "larastan/larastan": "^2.9", "laravel/pint": "^1.14", "orchestra/testbench": "*", "phpunit/phpunit": "^10.5" @@ -7934,7 +8123,7 @@ ], "support": { "issues": "https://github.com/Propaganistas/Laravel-Phone/issues", - "source": "https://github.com/Propaganistas/Laravel-Phone/tree/5.3.2" + "source": "https://github.com/Propaganistas/Laravel-Phone/tree/5.3.3" }, "funding": [ { @@ -7942,7 +8131,7 @@ "type": "github" } ], - "time": "2024-04-24T09:18:58+00:00" + "time": "2024-12-27T11:45:47+00:00" }, { "name": "psr/cache", @@ -9110,16 +9299,16 @@ }, { "name": "spatie/browsershot", - "version": "5.0.3", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/spatie/browsershot.git", - "reference": "aae8a337f73f63fc41c4c759fc397ce725312367" + "reference": "c0fa14c2386df2b4444e803ddc11e592b16d3a20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/browsershot/zipball/aae8a337f73f63fc41c4c759fc397ce725312367", - "reference": "aae8a337f73f63fc41c4c759fc397ce725312367", + "url": "https://api.github.com/repos/spatie/browsershot/zipball/c0fa14c2386df2b4444e803ddc11e592b16d3a20", + "reference": "c0fa14c2386df2b4444e803ddc11e592b16d3a20", "shasum": "" }, "require": { @@ -9166,7 +9355,7 @@ "webpage" ], "support": { - "source": "https://github.com/spatie/browsershot/tree/5.0.3" + "source": "https://github.com/spatie/browsershot/tree/5.0.5" }, "funding": [ { @@ -9174,20 +9363,20 @@ "type": "github" } ], - "time": "2024-12-16T09:46:16+00:00" + "time": "2024-12-30T12:56:36+00:00" }, { "name": "spatie/color", - "version": "1.6.3", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/spatie/color.git", - "reference": "45c4354ffa7e65f05c502b009834ecac7928daa3" + "reference": "614f1e0674262c620db908998a11eacd16494835" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/color/zipball/45c4354ffa7e65f05c502b009834ecac7928daa3", - "reference": "45c4354ffa7e65f05c502b009834ecac7928daa3", + "url": "https://api.github.com/repos/spatie/color/zipball/614f1e0674262c620db908998a11eacd16494835", + "reference": "614f1e0674262c620db908998a11eacd16494835", "shasum": "" }, "require": { @@ -9225,7 +9414,7 @@ ], "support": { "issues": "https://github.com/spatie/color/issues", - "source": "https://github.com/spatie/color/tree/1.6.3" + "source": "https://github.com/spatie/color/tree/1.7.0" }, "funding": [ { @@ -9233,7 +9422,7 @@ "type": "github" } ], - "time": "2024-12-23T11:00:34+00:00" + "time": "2024-12-30T14:23:15+00:00" }, { "name": "spatie/crawler", @@ -9824,16 +10013,16 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "11.11.0", + "version": "11.11.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "fe3f17e8e5be30b056bd9fcc610e975d8199e154" + "reference": "1c4950237a5f2876102b36ded89a00bb6ea96c09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/fe3f17e8e5be30b056bd9fcc610e975d8199e154", - "reference": "fe3f17e8e5be30b056bd9fcc610e975d8199e154", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/1c4950237a5f2876102b36ded89a00bb6ea96c09", + "reference": "1c4950237a5f2876102b36ded89a00bb6ea96c09", "shasum": "" }, "require": { @@ -9917,7 +10106,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-medialibrary/issues", - "source": "https://github.com/spatie/laravel-medialibrary/tree/11.11.0" + "source": "https://github.com/spatie/laravel-medialibrary/tree/11.11.1" }, "funding": [ { @@ -9929,20 +10118,20 @@ "type": "github" } ], - "time": "2024-12-09T16:19:56+00:00" + "time": "2024-12-30T10:16:02+00:00" }, { "name": "spatie/laravel-package-tools", - "version": "1.17.0", + "version": "1.18.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "9ab30fd24f677e5aa370ea4cf6b41c517d16cf85" + "reference": "8332205b90d17164913244f4a8e13ab7e6761d29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/9ab30fd24f677e5aa370ea4cf6b41c517d16cf85", - "reference": "9ab30fd24f677e5aa370ea4cf6b41c517d16cf85", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/8332205b90d17164913244f4a8e13ab7e6761d29", + "reference": "8332205b90d17164913244f4a8e13ab7e6761d29", "shasum": "" }, "require": { @@ -9981,7 +10170,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.17.0" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.18.0" }, "funding": [ { @@ -9989,7 +10178,7 @@ "type": "github" } ], - "time": "2024-12-09T16:29:14+00:00" + "time": "2024-12-30T13:13:39+00:00" }, { "name": "spatie/laravel-permission", @@ -10149,16 +10338,16 @@ }, { "name": "spatie/laravel-sluggable", - "version": "3.7.1", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-sluggable.git", - "reference": "23dcb4cb9306f235a1eb20f170978afde82d0221" + "reference": "cfe8440ebce367b66bdfec6e1a7c8e33879092fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-sluggable/zipball/23dcb4cb9306f235a1eb20f170978afde82d0221", - "reference": "23dcb4cb9306f235a1eb20f170978afde82d0221", + "url": "https://api.github.com/repos/spatie/laravel-sluggable/zipball/cfe8440ebce367b66bdfec6e1a7c8e33879092fc", + "reference": "cfe8440ebce367b66bdfec6e1a7c8e33879092fc", "shasum": "" }, "require": { @@ -10196,7 +10385,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/laravel-sluggable/tree/3.7.1" + "source": "https://github.com/spatie/laravel-sluggable/tree/3.7.2" }, "funding": [ { @@ -10204,7 +10393,7 @@ "type": "github" } ], - "time": "2024-12-23T09:54:10+00:00" + "time": "2024-12-30T09:06:04+00:00" }, { "name": "spatie/laravel-translatable", @@ -10810,12 +10999,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -11100,12 +11289,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -12839,12 +13028,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -13099,12 +13288,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -13315,6 +13504,55 @@ ], "time": "2024-11-08T15:48:14+00:00" }, + { + "name": "textalk/websocket", + "version": "1.5.8", + "source": { + "type": "git", + "url": "https://github.com/Textalk/websocket-php.git", + "reference": "d05dbaa97500176447ffb1f1800573f23085ab13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/d05dbaa97500176447ffb1f1800573f23085ab13", + "reference": "d05dbaa97500176447ffb1f1800573f23085ab13", + "shasum": "" + }, + "require": { + "php": "^7.2 | ^8.0", + "psr/log": "^1 | ^2 | ^3" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.0", + "phpunit/phpunit": "^8.0|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "WebSocket\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Fredrik Liljegren" + }, + { + "name": "Sören Jensen", + "email": "soren@abicart.se" + } + ], + "description": "WebSocket client and server", + "support": { + "issues": "https://github.com/Textalk/websocket-php/issues", + "source": "https://github.com/Textalk/websocket-php/tree/1.5.8" + }, + "time": "2022-04-26T06:28:24+00:00" + }, { "name": "tijsverkoyen/css-to-inline-styles", "version": "v2.3.0", @@ -13593,6 +13831,164 @@ ], "time": "2024-11-21T01:49:47+00:00" }, + { + "name": "vormkracht10/filament-mails", + "version": "v1.0.5", + "source": { + "type": "git", + "url": "https://github.com/vormkracht10/filament-mails.git", + "reference": "ab13d2b90daad93943248f7888808f78a2ab6d09" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vormkracht10/filament-mails/zipball/ab13d2b90daad93943248f7888808f78a2ab6d09", + "reference": "ab13d2b90daad93943248f7888808f78a2ab6d09", + "shasum": "" + }, + "require": { + "filament/filament": "^3.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.15.0", + "vormkracht10/laravel-mails": "^1.0" + }, + "require-dev": { + "laravel/pint": "^1.0", + "nunomaduro/collision": "^7.9", + "nunomaduro/larastan": "^2.0.1", + "orchestra/testbench": "^8.0", + "pestphp/pest": "^2.1", + "pestphp/pest-plugin-arch": "^2.0", + "pestphp/pest-plugin-laravel": "^2.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "FilamentMails": "Vormkracht10\\FilamentMails\\Facades\\FilamentMails" + }, + "providers": [ + "Vormkracht10\\FilamentMails\\FilamentMailsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Vormkracht10\\FilamentMails\\": "src/", + "Vormkracht10\\FilamentMails\\Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Baspa", + "email": "hello@baspa.dev", + "role": "Developer" + } + ], + "description": "View logged mails and events in a beautiful Filament UI.", + "homepage": "https://github.com/vormkracht10/filament-mails", + "keywords": [ + "filament-mails", + "laravel", + "vormkracht10" + ], + "support": { + "issues": "https://github.com/vormkracht10/filament-mails/issues", + "source": "https://github.com/vormkracht10/filament-mails" + }, + "funding": [ + { + "url": "https://github.com/vormkracht10", + "type": "github" + } + ], + "time": "2024-12-27T09:22:16+00:00" + }, + { + "name": "vormkracht10/laravel-mails", + "version": "v1.0.5", + "source": { + "type": "git", + "url": "https://github.com/vormkracht10/laravel-mails.git", + "reference": "d18af5c155a89ae5698b8a289a4b17db0db5cf4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vormkracht10/laravel-mails/zipball/d18af5c155a89ae5698b8a289a4b17db0db5cf4a", + "reference": "d18af5c155a89ae5698b8a289a4b17db0db5cf4a", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^10.8.0|^11.22.0", + "laravel-notification-channels/discord": "^1.6", + "laravel-notification-channels/telegram": "^4.0|5.0", + "laravel/helpers": "^1.7.0", + "laravel/slack-notification-channel": "^2.5|^3.3.2", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.14.0" + }, + "require-dev": { + "larastan/larastan": "^2.9.8", + "laravel/pint": "^1.17.0", + "nunomaduro/collision": "^7.5.0|^8.4", + "orchestra/testbench": "^8.5.0|^9.4.0", + "pestphp/pest": "^2.35.1", + "pestphp/pest-plugin-laravel": "^2.4.0", + "phpstan/extension-installer": "^1.4.2", + "phpstan/phpstan-deprecation-rules": "^1.2.0", + "phpstan/phpstan-phpunit": "^1.3.11", + "phpunit/phpunit": "^10.5.17" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Vormkracht10\\Mails\\MailsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Vormkracht10\\Mails\\": "src", + "Vormkracht10\\Mails\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark van Eijk", + "email": "mark@vormkracht10.nl", + "role": "Developer" + } + ], + "description": "Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.", + "homepage": "https://github.com/vormkracht10/laravel-mails", + "keywords": [ + "laravel", + "laravel-mails", + "vormkracht10" + ], + "support": { + "issues": "https://github.com/vormkracht10/laravel-mails/issues", + "source": "https://github.com/vormkracht10/laravel-mails/tree/v1.0.5" + }, + "funding": [ + { + "url": "https://github.com/vormkracht10", + "type": "github" + } + ], + "time": "2024-12-24T07:21:25+00:00" + }, { "name": "webmozart/assert", "version": "1.11.0", @@ -14403,16 +14799,16 @@ }, { "name": "laravel/pint", - "version": "v1.18.3", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "cef51821608239040ab841ad6e1c6ae502ae3026" + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/cef51821608239040ab841ad6e1c6ae502ae3026", - "reference": "cef51821608239040ab841ad6e1c6ae502ae3026", + "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", + "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", "shasum": "" }, "require": { @@ -14423,10 +14819,10 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.65.0", - "illuminate/view": "^10.48.24", - "larastan/larastan": "^2.9.11", - "laravel-zero/framework": "^10.4.0", + "friendsofphp/php-cs-fixer": "^3.66.0", + "illuminate/view": "^10.48.25", + "larastan/larastan": "^2.9.12", + "laravel-zero/framework": "^10.48.25", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.17.0", "pestphp/pest": "^2.36.0" @@ -14465,7 +14861,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-11-26T15:34:00+00:00" + "time": "2024-12-30T16:20:10+00:00" }, { "name": "mockery/mockery", diff --git a/config/filament-mails.php b/config/filament-mails.php new file mode 100644 index 00000000..73b8a3be --- /dev/null +++ b/config/filament-mails.php @@ -0,0 +1,13 @@ + [ + 'mail' => MailResource::class, + 'event' => EventResource::class, + ], +]; diff --git a/config/mails.php b/config/mails.php new file mode 100644 index 00000000..b2ff2a31 --- /dev/null +++ b/config/mails.php @@ -0,0 +1,145 @@ + [ + 'mail' => Mail::class, + 'event' => MailEvent::class, + 'attachment' => MailAttachment::class, + ], + + // Table names for saving sent emails and polymorphic relations to database + + 'database' => [ + 'tables' => [ + 'mails' => 'mails', + 'attachments' => 'mail_attachments', + 'events' => 'mail_events', + 'polymorph' => 'mailables', + ], + + 'pruning' => [ + 'enabled' => true, + 'after' => 30, // days + ], + ], + + 'headers' => [ + 'uuid' => 'X-Mails-UUID', + + 'associate' => 'X-Mails-Associated-Models', + ], + + 'webhooks' => [ + 'routes' => [ + 'prefix' => 'webhooks/mails', + ], + + 'queue' => env('MAILS_QUEUE_WEBHOOKS', false), + ], + + // Logging mails + 'logging' => [ + + // Enable logging of all sent mails to database + + 'enabled' => env('MAILS_LOGGING_ENABLED', true), + + // Specify attributes to log in database + + 'attributes' => [ + 'subject', + 'from', + 'to', + 'reply_to', + 'cc', + 'bcc', + 'html', + 'text', + ], + + // Encrypt all attributes saved to database + + 'encrypted' => env('MAILS_ENCRYPTED', true), + + // Track following events using webhooks from email provider + + 'tracking' => [ + 'bounces' => true, + 'clicks' => true, + 'complaints' => true, + 'deliveries' => true, + 'opens' => true, + 'unsubscribes' => true, + ], + + // Enable saving mail attachments to disk + + 'attachments' => [ + 'enabled' => env('MAILS_LOGGING_ATTACHMENTS_ENABLED', true), + 'disk' => env('FILESYSTEM_DISK', 'local'), + 'root' => 'mails/attachments', + ], + ], + + // Notifications for important mail events + + 'notifications' => [ + 'mail' => [ + 'to' => [ + env('MAIL_SUPPORT'), + ], + ], + + 'discord' => [ + // 'to' => ['1234567890'], + ], + + 'slack' => [ + // 'to' => ['https://hooks.slack.com/services/...'], + ], + + 'telegram' => [ + // 'to' => ['1234567890'], + ], + ], + + 'events' => [ + 'soft_bounced' => [ + 'notify' => ['mail'], + ], + + 'hard_bounced' => [ + 'notify' => ['mail'], + ], + + 'bouncerate' => [ + 'notify' => [], + + 'retain' => 30, // days + + 'treshold' => 1, // % + ], + + 'deliveryrate' => [ + 'treshold' => 99, + ], + + 'complained' => [ + // + ], + + 'unsent' => [ + // + ], + ], + +]; diff --git a/config/permission.php b/config/permission.php index 18e8bfac..8298e3a8 100644 --- a/config/permission.php +++ b/config/permission.php @@ -77,8 +77,8 @@ /* * Change this if you want to name the related pivots other than defaults */ - 'role_pivot_key' => null, //default 'role_id', - 'permission_pivot_key' => null, //default 'permission_id', + 'role_pivot_key' => null, // default 'role_id', + 'permission_pivot_key' => null, // default 'permission_id', /* * Change this if you want to name the related model primary key other than diff --git a/database/factories/ArticleFactory.php b/database/factories/ArticleFactory.php index 94da615f..bc092f52 100644 --- a/database/factories/ArticleFactory.php +++ b/database/factories/ArticleFactory.php @@ -25,22 +25,18 @@ public function definition(): array public function approved(): self { - return $this->state(function (array $attributes): array { - return [ - 'published_at' => now()->addDays(2), - 'submitted_at' => now(), - 'approved_at' => now(), - ]; - }); + return $this->state(fn (array $attributes): array => [ + 'published_at' => now()->addDays(2), + 'submitted_at' => now(), + 'approved_at' => now(), + ]); } public function submitted(): self { - return $this->state(function (array $attributes): array { - return [ - 'submitted_at' => now(), - 'published_at' => now()->addDay(), - ]; - }); + return $this->state(fn (array $attributes): array => [ + 'submitted_at' => now(), + 'published_at' => now()->addDay(), + ]); } } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 6f47cea9..394f2f8f 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -26,39 +26,31 @@ public function definition(): array public function unverified(): self { - return $this->state(function (array $attributes) { - return [ - 'email_verified_at' => null, - ]; - }); + return $this->state(fn (array $attributes) => [ + 'email_verified_at' => null, + ]); } public function lastMonth(): self { - return $this->state(function (array $attributes) { - return [ - 'created_at' => now()->subMonth(), - ]; - }); + return $this->state(fn (array $attributes) => [ + 'created_at' => now()->subMonth(), + ]); } public function banned(): self { - return $this->state(function (array $attributes) { - return [ - 'banned_at' => now(), - 'banned_reason' => 'Violation des règles de la communauté', - ]; - }); + return $this->state(fn (array $attributes) => [ + 'banned_at' => now(), + 'banned_reason' => 'Violation des règles de la communauté', + ]); } public function unbanned(): self { - return $this->state(function (array $attributes) { - return [ - 'banned_at' => null, - 'banned_reason' => null, - ]; - }); + return $this->state(fn (array $attributes) => [ + 'banned_at' => null, + 'banned_reason' => null, + ]); } } diff --git a/database/migrations/2024_12_31_093231_1_create_mails_table.php b/database/migrations/2024_12_31_093231_1_create_mails_table.php new file mode 100644 index 00000000..d74b4b3c --- /dev/null +++ b/database/migrations/2024_12_31_093231_1_create_mails_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('uuid')->nullable()->index(); + $table->string('mail_class')->nullable()->index(); + $table->string('subject')->nullable(); + $table->json('from')->nullable(); + $table->json('reply_to')->nullable(); + $table->json('to')->nullable(); + $table->json('cc')->nullable(); + $table->json('bcc')->nullable(); + $table->text('html')->nullable(); + $table->text('text')->nullable(); + $table->unsignedBigInteger('opens')->default(0); + $table->unsignedBigInteger('clicks')->default(0); + $table->timestamp('sent_at')->nullable(); + $table->timestamp('resent_at')->nullable(); + $table->timestamp('accepted_at')->nullable(); + $table->timestamp('delivered_at')->nullable(); + $table->timestamp('last_opened_at')->nullable(); + $table->timestamp('last_clicked_at')->nullable(); + $table->timestamp('complained_at')->nullable(); + $table->timestamp('soft_bounced_at')->nullable(); + $table->timestamp('hard_bounced_at')->nullable(); + $table->timestamp('unsubscribed_at')->nullable(); + $table->timestamps(); + }); + } +}; diff --git a/database/migrations/2024_12_31_093232_2_create_mail_attachments_table.php b/database/migrations/2024_12_31_093232_2_create_mail_attachments_table.php new file mode 100644 index 00000000..4a48d454 --- /dev/null +++ b/database/migrations/2024_12_31_093232_2_create_mail_attachments_table.php @@ -0,0 +1,27 @@ +id(); + $table->foreignIdFor(config('mails.models.mail')) + ->constrained() + ->cascadeOnDelete(); + $table->string('disk'); + $table->string('uuid'); + $table->string('filename'); + $table->string('mime'); + $table->boolean('inline', false); + $table->bigInteger('size'); + $table->timestamps(); + }); + } +}; diff --git a/database/migrations/2024_12_31_093233_2_create_mail_events_table.php b/database/migrations/2024_12_31_093233_2_create_mail_events_table.php new file mode 100644 index 00000000..b6d31920 --- /dev/null +++ b/database/migrations/2024_12_31_093233_2_create_mail_events_table.php @@ -0,0 +1,34 @@ +id(); + $table->foreignIdFor(config('mails.models.mail')) + ->constrained() + ->cascadeOnDelete(); + $table->string('type'); + $table->string('ip_address')->nullable(); + $table->string('hostname')->nullable(); + $table->string('platform')->nullable(); + $table->string('os')->nullable(); + $table->string('browser')->nullable(); + $table->string('user_agent')->nullable(); + $table->string('city')->nullable(); + $table->char('country_code', 2)->nullable(); + $table->string('link')->nullable(); + $table->string('tag')->nullable(); + $table->json('payload')->nullable(); + $table->timestamps(); + $table->timestamp('occurred_at')->nullable(); + }); + } +}; diff --git a/database/migrations/2024_12_31_093234_2_create_mailables_table.php b/database/migrations/2024_12_31_093234_2_create_mailables_table.php new file mode 100644 index 00000000..7cf22afb --- /dev/null +++ b/database/migrations/2024_12_31_093234_2_create_mailables_table.php @@ -0,0 +1,21 @@ +id(); + $table->foreignIdFor(config('mails.models.mail')) + ->constrained() + ->cascadeOnDelete(); + $table->morphs('mailable'); + }); + } +}; diff --git a/lang/en/global.php b/lang/en/global.php index 3bfe4144..0898967f 100644 --- a/lang/en/global.php +++ b/lang/en/global.php @@ -107,5 +107,13 @@ 'language' => 'Language', 'french' => 'French', 'english' => 'English', + 'experience' => 'Experience', + 'last_active' => 'Last active', + 'first_place' => '1st place', + 'second_place' => '2nd place', + 'third_place' => '3rd place', + 'ranking_updated' => 'The rankings are updated weekly.', + 'place' => 'Place', + 'user' => 'User', ]; diff --git a/lang/en/pages/account.php b/lang/en/pages/account.php index c3aa16e5..e2ad1f3c 100644 --- a/lang/en/pages/account.php +++ b/lang/en/pages/account.php @@ -46,12 +46,21 @@ 'bio_description' => 'Write a few sentences about yourself.', 'avatar_description' => 'This will be displayed on your profile.', 'twitter_helper_text' => 'Enter your Twitter handle without the @ symbol at the top.', - 'linkedin_helper_text' => 'Enter what is in place of {votre-pseudo}', + 'linkedin_helper_text' => 'Enter what is in place of {your-username}', 'personal_information_title' => 'Personal information', 'personal_information_description' => 'Update your personal information. Your address will never be accessible to the public.', 'unverified_mail' => 'This e-mail address is not verified.', - 'social_network_title' => 'social networks', + 'social_network_title' => 'Social networks', 'social_network_description' => 'Let everyone know where they can find you.', + + 'notification' => [ + 'tip' => 'Tip:', + 'first_text' => 'Visit any forum thread and click on the', + 'subscribe' => 'Subscribe', + 'second_text' => 'in the sidebar. Once clicked, you will receive an e-mail each time a response + is published. The same applies to any type of content that offers this + this option.', + ], ], ]; diff --git a/lang/en/pages/article.php b/lang/en/pages/article.php index fd20d871..5b0bdff4 100644 --- a/lang/en/pages/article.php +++ b/lang/en/pages/article.php @@ -29,5 +29,6 @@ 'draft' => 'Draft', 'my_article' => 'My articles', 'not_article_created' => "You haven't created any articles yet", - + 'awaiting_text' => 'Waiting for approval', + 'write' => 'Written', ]; diff --git a/lang/en/pages/channel.php b/lang/en/pages/channel.php new file mode 100644 index 00000000..63b6f5e0 --- /dev/null +++ b/lang/en/pages/channel.php @@ -0,0 +1,10 @@ + 'The biggest channels', + 'subtitle' => 'Other channels', + +]; diff --git a/lang/en/pages/discussion.php b/lang/en/pages/discussion.php index ef86fe5c..2e7ce3b7 100644 --- a/lang/en/pages/discussion.php +++ b/lang/en/pages/discussion.php @@ -41,5 +41,5 @@ 'min_discussion_length' => '160 characters maximum', 'placeholder' => 'Your comment here...', 'my_discussion' => 'My discussions', - + 'empty_discussion' => 'You haven\'t created any discussions yet.', ]; diff --git a/lang/en/pages/forum.php b/lang/en/pages/forum.php index 6c5c5ea4..fabb32bb 100644 --- a/lang/en/pages/forum.php +++ b/lang/en/pages/forum.php @@ -43,5 +43,10 @@ 'my_thread' => 'My threads', 'not_thread_created' => "You haven't created any topic yet", 'subject' => 'Subject', + 'reply_message' => 'Leave your answer', + 'prevent_text_one' => 'Make sure you\'ve read our', + 'rules' => 'rules of conduct', + 'prevent_text_two' => 'before replying to this thread.', + 'leaderboard_empty' => 'No ranking available', ]; diff --git a/lang/fr/global.php b/lang/fr/global.php index f98b8444..9dbad24c 100644 --- a/lang/fr/global.php +++ b/lang/fr/global.php @@ -107,4 +107,13 @@ 'language' => 'Langue', 'french' => 'Français', 'english' => 'Anglais', + 'experience' => 'Expérience', + 'last_active' => 'Dernière activité', + 'first_place' => '1ere place', + 'second_place' => '2e place', + 'third_place' => '3e place', + 'ranking_updated' => 'Ce classement est mis à jour toutes les semaines.', + 'place' => 'Position', + 'user' => 'Utilisateur', + ]; diff --git a/lang/fr/pages/account.php b/lang/fr/pages/account.php index 8d65f849..790ec864 100644 --- a/lang/fr/pages/account.php +++ b/lang/fr/pages/account.php @@ -53,6 +53,14 @@ 'social_network_title' => 'Réseaux sociaux', 'social_network_description' => 'Faites savoir à tout le monde où ils peuvent vous trouver.', + 'notification' => [ + 'tip' => 'Astuce:', + 'first_text' => 'Visitez n\'importe quel fil de discussion du forum et cliquez sur le bouton', + 'subscribe' => 'S\'abonner', + 'second_text' => 'dans la barre latérale. Une fois cliqué, vous recevrez un e-mail chaque fois qu\'une réponse + sera publiée. Il en va de même pour n\'importe quel type de contenu qui offre cette + possibilité.', + ], ], ]; diff --git a/lang/fr/pages/article.php b/lang/fr/pages/article.php index a101a874..a53536dd 100644 --- a/lang/fr/pages/article.php +++ b/lang/fr/pages/article.php @@ -29,5 +29,7 @@ 'draft' => 'Brouillon', 'my_article' => 'Mes articles', 'not_article_created' => "Vous n'avez pas encore créé d'articles", + 'awaiting_text' => 'En attente d\'approbation', + 'write' => 'Rédigé', ]; diff --git a/lang/fr/pages/channel.php b/lang/fr/pages/channel.php new file mode 100644 index 00000000..40d698fd --- /dev/null +++ b/lang/fr/pages/channel.php @@ -0,0 +1,10 @@ + ' Les plus gros channels', + 'subtitle' => 'Les autres channels', + +]; diff --git a/lang/fr/pages/discussion.php b/lang/fr/pages/discussion.php index 7231e92d..0ef633c7 100644 --- a/lang/fr/pages/discussion.php +++ b/lang/fr/pages/discussion.php @@ -41,5 +41,6 @@ 'min_discussion_length' => 'Maximum de 160 caractères.', 'placeholder' => 'Votre commentaire', 'my_discussion' => 'Mes discussions', + 'empty_discussion' => 'Vous n\'avez pas encore créé de discussions.', ]; diff --git a/lang/fr/pages/forum.php b/lang/fr/pages/forum.php index 78c901d1..a0991435 100644 --- a/lang/fr/pages/forum.php +++ b/lang/fr/pages/forum.php @@ -43,5 +43,10 @@ 'my_thread' => 'Mes Sujets', 'not_thread_created' => "Vous n'avez pas encore créé de sujet", 'subject' => 'Sujets', + 'reply_message' => 'Laissez votre réponse', + 'prevent_text_one' => 'Assurez-vous d\'avoir lu nos', + 'rules' => 'règles de conduite', + 'prevent_text_two' => 'avant de répondre à ce thread.', + 'leaderboard_empty' => 'Aucun classement disponible', ]; diff --git a/resources/css/app.css b/resources/css/app.css index b0d4a4dc..4e4a288a 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -6,9 +6,15 @@ @import 'tag.css'; @import 'forms.css'; @import 'torchlight.css'; -@import 'toc.css'; +@import 'forum.css'; @import 'header.css'; +@property --border-angle { + inherits: false; + initial-value: 0deg; + syntax: ''; +} + :root { --laravel: #F56857; --livewire: #fb70a9; diff --git a/resources/css/file-upload.css b/resources/css/file-upload.css deleted file mode 100644 index 60314a39..00000000 --- a/resources/css/file-upload.css +++ /dev/null @@ -1,69 +0,0 @@ -.filepond--root { - @apply mb-0 overflow-hidden; -} - -.filepond--panel-root { - @apply rounded-lg border border-gray-300 bg-gray-200 shadow-sm; -} - -.filepond--drip-blob { - @apply bg-white; -} - -.filepond--drop-label { - @apply text-gray-400 dark:text-gray-500; -} - -/* Compact-only styles, excluding compact circle layouts */ - -.filepond--root[data-style-panel-layout='compact'] .filepond--item { - @apply mb-0.5; -} - -.filepond--root[data-style-panel-layout='compact'] .filepond--drop-label label { - @apply text-sm; -} - -.filepond--root[data-style-panel-layout='compact'] .filepond--drop-label { - min-height: 2.625em; -} - -.filepond--root[data-style-panel-layout='compact'] .filepond--file { - padding-top: 0.5em; - padding-bottom: 0.5em; -} - -/* Grid styles */ - -.filepond--root[data-style-panel-layout='grid'] .filepond--item { - width: calc(50% - 0.5em); - display: inline; -} - -@media screen(lg) { - .filepond--root[data-style-panel-layout='grid'] .filepond--item { - width: calc(33.33% - 0.5em); - } -} - -/* Download button styles */ - -.filepond--download-icon { - @apply pointer-events-auto mr-1 inline-block size-4 bg-white align-bottom hover:bg-white/70; - -webkit-mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZG93bmxvYWQiPjxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iNyAxMCAxMiAxNSAxNyAxMCI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIxNSIgeDI9IjEyIiB5Mj0iMyI+PC9saW5lPjwvc3ZnPg=='); - mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZG93bmxvYWQiPjxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iNyAxMCAxMiAxNSAxNyAxMCI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIxNSIgeDI9IjEyIiB5Mj0iMyI+PC9saW5lPjwvc3ZnPg=='); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - -webkit-mask-size: 100%; - mask-size: 100%; -} - -.filepond--open-icon { - @apply pointer-events-auto mr-1 inline-block size-4 bg-white align-bottom hover:bg-white/70; - -webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwMC0yIDJ2MTBhMiAyIDAgMDAyIDJoMTBhMiAyIDAgMDAyLTJ2LTRNMTQgNGg2bTAgMHY2bTAtNkwxMCAxNCIgLz4KPC9zdmc+Cg==); - mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwMC0yIDJ2MTBhMiAyIDAgMDAyIDJoMTBhMiAyIDAgMDAyLTJ2LTRNMTQgNGg2bTAgMHY2bTAtNkwxMCAxNCIgLz4KPC9zdmc+Cg==); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - -webkit-mask-size: 100%; - mask-size: 100%; -} diff --git a/resources/css/forum.css b/resources/css/forum.css new file mode 100644 index 00000000..27468651 --- /dev/null +++ b/resources/css/forum.css @@ -0,0 +1,22 @@ +#leaderboard { + *, *::before, *::after { + box-sizing: border-box; + transform-style: preserve-3d; + } + + .leaderboard { + place-items: center; + transform: perspective(400px); + transform-style: preserve-3d; + } + + .leaderboard > .stage { + @apply relative w-full rounded-t-lg; + transform: rotateX(70deg); + } + + .leaderboard > .stage > .stage-front { + @apply absolute w-full rounded-b-lg origin-top top-full; + transform: rotateX(-80deg); + } +} diff --git a/resources/css/toc.css b/resources/css/toc.css deleted file mode 100644 index 7cfbf87e..00000000 --- a/resources/css/toc.css +++ /dev/null @@ -1,18 +0,0 @@ -.toc li a { - @apply relative flex items-center rounded-md py-1.5 text-sm font-medium leading-5 text-gray-500 transition duration-150 ease-in-out dark:text-gray-400; -} -.toc li a:hover { - @apply text-gray-700; -} -.toc li a:focus { - @apply outline-none; -} -.toc li > ul > li { - @apply pl-4; -} -.toc li.active > a { - @apply text-primary-500; -} -.toc li:not(.active) > ul > li.active a { - @apply text-primary-500; -} diff --git a/resources/views/components/ads.blade.php b/resources/views/components/ads.blade.php index 1f0eef31..468dae02 100644 --- a/resources/views/components/ads.blade.php +++ b/resources/views/components/ads.blade.php @@ -3,6 +3,7 @@
{{ $ads['alt'] }}
{{ $article->title }} {{ $article->title }}
{{ $article->title }} @foreach ($discussion->getReactionsSummary() as $reaction) name}.svg") }}" alt="{{ $reaction->name }} emoji" diff --git a/resources/views/components/dropdown-profile.blade.php b/resources/views/components/dropdown-profile.blade.php index 486a7120..b219f113 100644 --- a/resources/views/components/dropdown-profile.blade.php +++ b/resources/views/components/dropdown-profile.blade.php @@ -60,8 +60,8 @@ class="group flex items-center gap-2 py-1.5 text-sm font-medium text-gray-500 da role="menuitem" tabindex="-1" > - Filament icon - Administration + Filament icon + {{ __('Administration') }}
@endif diff --git a/resources/views/components/feeds/comment.blade.php b/resources/views/components/feeds/comment.blade.php index 7673293a..8ec00768 100644 --- a/resources/views/components/feeds/comment.blade.php +++ b/resources/views/components/feeds/comment.blade.php @@ -2,6 +2,7 @@
Avatar de {{ $user->username }} 'icon.trophies.first', + 2 => 'icon.trophies.second', + 3 => 'icon.trophies.third', + default => 'phosphor-trophy-duotone', + }; + + $ranking = match ($position) { + 1 => __('global.first_place'), + 2 => __('global.second_place'), + 3 => __('global.third_place'), + default => 'N/A', + }; + + $color = match ($position) { + 1 => 'success', + 2 => 'warning', + 3 => 'danger', + default => 'gray', + }; +@endphp + +
+
+
+ + {{ $ranking }} + + +
+
+ {{ $user->name }} +
+ + {{ '@' . $user->username }} + +
+
+
+
+
+
+
+ + {{ __('global.experience') }} + + + {{ $user->getPoints() }} + +
+
+ + {{ __('global.answers') }} + + + {{ $user->solutions_count }} + +
+
$position !== 1, + ])> + + {{ __('global.last_active') }} + + + + {{ $user->last_active_at?->diffForHumans() }} + +
+
+
diff --git a/resources/views/components/forum/thread.blade.php b/resources/views/components/forum/thread.blade.php index 2f1e77f5..ffeaa4b7 100644 --- a/resources/views/components/forum/thread.blade.php +++ b/resources/views/components/forum/thread.blade.php @@ -36,7 +36,7 @@ class="inline-flex items-center rounded-xl gap-1 px-2 py-0.5 font-medium bg-prim - {{ __('global.ask') }} + diff --git a/resources/views/components/icon/trophies/first.blade.php b/resources/views/components/icon/trophies/first.blade.php new file mode 100644 index 00000000..3f009137 --- /dev/null +++ b/resources/views/components/icon/trophies/first.blade.php @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/components/icon/trophies/second.blade.php b/resources/views/components/icon/trophies/second.blade.php new file mode 100644 index 00000000..4b26519a --- /dev/null +++ b/resources/views/components/icon/trophies/second.blade.php @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/components/icon/trophies/third.blade.php b/resources/views/components/icon/trophies/third.blade.php new file mode 100644 index 00000000..0488e2cb --- /dev/null +++ b/resources/views/components/icon/trophies/third.blade.php @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/views/components/join-sponsors.blade.php b/resources/views/components/join-sponsors.blade.php index fb0c1b63..b7592021 100644 --- a/resources/views/components/join-sponsors.blade.php +++ b/resources/views/components/join-sponsors.blade.php @@ -10,11 +10,13 @@
@endif diff --git a/resources/views/components/notifications/new_comment.blade.php b/resources/views/components/notifications/new_comment.blade.php deleted file mode 100644 index 570572e0..00000000 --- a/resources/views/components/notifications/new_comment.blade.php +++ /dev/null @@ -1,44 +0,0 @@ -@php $data = $notification->data @endphp - -
  • -
    - -
    -
    -
    - - -
    -

    - Un commentaire a été ajoutée dans la conversation - - "{{ $data['replyable_subject'] }}" - - . -

    -

    - -

    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
  • diff --git a/resources/views/components/notifications/new_mention.blade.php b/resources/views/components/notifications/new_mention.blade.php deleted file mode 100644 index 757c6fe0..00000000 --- a/resources/views/components/notifications/new_mention.blade.php +++ /dev/null @@ -1,50 +0,0 @@ -@php $data = $notification->data @endphp - -
  • -
    - -
    -
    -
    - - -
    -

    - - {{ $data['author_name'] }} - - vous a mentionné dans - - "{{ $data['replyable_subject'] }}" - - . -

    -

    - -

    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
  • diff --git a/resources/views/components/notifications/new_reply.blade.php b/resources/views/components/notifications/new_reply.blade.php deleted file mode 100644 index cb9e2f20..00000000 --- a/resources/views/components/notifications/new_reply.blade.php +++ /dev/null @@ -1,43 +0,0 @@ -@php $data = $notification->data @endphp - -
  • -
    - -
    -
    -
    - - -
    -

    - Une nouvelle réponse a été ajoutée au sujet - - "{{ $data['replyable_subject'] }}" - -

    -

    - -

    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
  • diff --git a/resources/views/components/profile-users.blade.php b/resources/views/components/profile-users.blade.php index 2ca2137e..aee4fce0 100644 --- a/resources/views/components/profile-users.blade.php +++ b/resources/views/components/profile-users.blade.php @@ -1,6 +1,7 @@
    diff --git a/resources/views/components/sponsors.blade.php b/resources/views/components/sponsors.blade.php index 22b309de..c6cebcc2 100644 --- a/resources/views/components/sponsors.blade.php +++ b/resources/views/components/sponsors.blade.php @@ -5,11 +5,13 @@ diff --git a/resources/views/livewire/components/forum/reply-form.blade.php b/resources/views/livewire/components/forum/reply-form.blade.php index 4f442293..4b2eb704 100644 --- a/resources/views/livewire/components/forum/reply-form.blade.php +++ b/resources/views/livewire/components/forum/reply-form.blade.php @@ -8,16 +8,16 @@ class="size-10 ring-4 ring-white dark:ring-white/20" span="-right-1 size-3.5 -top-1" /> - {{ __('Laissez votre réponse') }} + {{ __('pages/forum.reply_message') }}

    - Assurez-vous d'avoir lu nos + {{ __('pages/forum.prevent_text_one') }} - règles de conduite + {{ __('pages/forum.rules') }} - avant de répondre à ce thread. + {{ __('pages/forum.prevent_text_two') }}

    diff --git a/resources/views/livewire/components/forum/reply.blade.php b/resources/views/livewire/components/forum/reply.blade.php index f59e4627..c5db092a 100644 --- a/resources/views/livewire/components/forum/reply.blade.php +++ b/resources/views/livewire/components/forum/reply.blade.php @@ -66,7 +66,7 @@ class="mt-5 prose prose-green !prose-heading-off max-w-none space-y-3 text-gray- @endcan @can('report', $reply) - + @endcan @endif
    diff --git a/resources/views/livewire/reactions.blade.php b/resources/views/livewire/components/reactions.blade.php similarity index 80% rename from resources/views/livewire/reactions.blade.php rename to resources/views/livewire/components/reactions.blade.php index 64f059e2..a9280823 100644 --- a/resources/views/livewire/reactions.blade.php +++ b/resources/views/livewire/components/reactions.blade.php @@ -44,6 +44,7 @@ class="size-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-600 dark:gr
    @foreach ($model->getReactionsSummary() as $reaction) name}.svg") }}" alt="{{ $reaction->name }} emoji" @@ -73,28 +74,28 @@ class="absolute z-30 left-6 w-auto origin-top-left"
    diff --git a/resources/views/livewire/components/user/articles.blade.php b/resources/views/livewire/components/user/articles.blade.php index a6bbcd6b..f7b6bd56 100644 --- a/resources/views/livewire/components/user/articles.blade.php +++ b/resources/views/livewire/components/user/articles.blade.php @@ -56,17 +56,17 @@ @else @if ($article->isAwaitingApproval()) - En attente d'approbation + {{ __('pages/article.awaiting_text') }} @else @endif @endif · - {{ $article->readTime() }} min de lecture + {{ __('global.read_time', ['time' => $article->readTime()]) }}
    diff --git a/resources/views/livewire/components/user/discussions.blade.php b/resources/views/livewire/components/user/discussions.blade.php index 4de1e9f7..846719a9 100644 --- a/resources/views/livewire/components/user/discussions.blade.php +++ b/resources/views/livewire/components/user/discussions.blade.php @@ -26,7 +26,7 @@ @empty

    - Vous n'avez pas encore créé de discussions. + {{ __('pages/discussion.empty_discussion') }}

    @endforelse
    diff --git a/resources/views/livewire/components/user/notifications.blade.php b/resources/views/livewire/components/user/notifications.blade.php index f827fec5..10ce7ef5 100644 --- a/resources/views/livewire/components/user/notifications.blade.php +++ b/resources/views/livewire/components/user/notifications.blade.php @@ -32,12 +32,10 @@ class="inline-flex items-start rounded-lg bg-red-100 px-2.5 py-1.5 text-xs font-
    - Astuce: - Visitez n'importe quel fil de discussion du forum et cliquez sur le bouton - "S'abonner" - dans la barre latérale. Une fois cliqué, vous recevrez un e-mail chaque fois qu'une réponse - sera publiée. Il en va de même pour n'importe quel type de contenu qui offre cette - possibilité. + {{ __('pages/account.settings.notification.tip') }} + {{ __('pages/account.settings.notification.first_text') }} + "{{ __('pages/account.settings.notification.subscribe') }}" + {{ __('pages/account.settings.notification.second_text') }}
    diff --git a/resources/views/livewire/pages/about.blade.php b/resources/views/livewire/pages/about.blade.php index 26f4c98f..f83b273a 100644 --- a/resources/views/livewire/pages/about.blade.php +++ b/resources/views/livewire/pages/about.blade.php @@ -150,6 +150,7 @@ class="mt-2 block text-2xl font-extrabold tracking-tight sm:text-3xl xl:text-4xl
    - {{ $profile['name'] }} + {{ $profile['name'] }}

    {{ $profile['name'] }}

    {{ $profile['title'] }}

    diff --git a/resources/views/livewire/pages/articles/single-post.blade.php b/resources/views/livewire/pages/articles/single-post.blade.php index ea189150..43880e2f 100644 --- a/resources/views/livewire/pages/articles/single-post.blade.php +++ b/resources/views/livewire/pages/articles/single-post.blade.php @@ -97,6 +97,7 @@ class="size-6 ring-1 ring-offset-2 ring-gray-200 ring-offset-gray-50 dark:ring-w
    {{ $article->title }} - + @endcan
    diff --git a/resources/views/livewire/pages/forum/channels.blade.php b/resources/views/livewire/pages/forum/channels.blade.php index 6ece67ed..22db2d91 100644 --- a/resources/views/livewire/pages/forum/channels.blade.php +++ b/resources/views/livewire/pages/forum/channels.blade.php @@ -15,13 +15,13 @@ class="gap-2 w-full justify-center py-2.5"

    - {{ __('Les plus gros channels') }} + {{ __('pages/channel.title') }}

    - {{ __('Les autres channels') }} + {{ __('pages/channel.subtitle') }}

    diff --git a/resources/views/livewire/pages/forum/detail-thread.blade.php b/resources/views/livewire/pages/forum/detail-thread.blade.php index d087808c..e235fb56 100644 --- a/resources/views/livewire/pages/forum/detail-thread.blade.php +++ b/resources/views/livewire/pages/forum/detail-thread.blade.php @@ -28,7 +28,7 @@ class="size-10 ring-4 ring-white dark:ring-white/20" span="-right-1 size-3.5 -top-1" />
    - + @endcan
    diff --git a/resources/views/livewire/pages/forum/index.blade.php b/resources/views/livewire/pages/forum/index.blade.php index badfb3ff..cfb902fe 100644 --- a/resources/views/livewire/pages/forum/index.blade.php +++ b/resources/views/livewire/pages/forum/index.blade.php @@ -12,31 +12,35 @@ class="gap-2 w-full justify-center py-2.5" -
    +
    +
    - +
    +
    + - - - -
    + + + +
    - - - - - + + + + + +
    diff --git a/resources/views/livewire/pages/forum/leaderboard.blade.php b/resources/views/livewire/pages/forum/leaderboard.blade.php new file mode 100644 index 00000000..1108f511 --- /dev/null +++ b/resources/views/livewire/pages/forum/leaderboard.blade.php @@ -0,0 +1,117 @@ +
    + + + {{ __('pages/forum.new_thread') }} + + + + + +
    + @if($leaders->isNotEmpty()) + @php + $first = $leaders->first(); + $second = $leaders->get(1); + $third = $leaders->last(); + @endphp + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    +
    +
    +

    +

    +
    +
    +
    +
    + @endif + +
    +
    +
    +
    + {{ __('global.place') }} +
    +
    + {{ __('global.user') }} +
    + +
    + {{ __('global.answers') }} +
    + +
    + + @forelse($members as $user) +
    +
    +
    +
    + + + {{ '@' . $user->username }} + +
    + +
    + {{ $user->solutions_count }} +
    + +
    + @empty +
    + {{ __('pages/forum.leaderboard_empty') }} +
    + @endforelse +
    +
    +
    +
    diff --git a/resources/views/livewire/pages/home.blade.php b/resources/views/livewire/pages/home.blade.php index b896cb1b..a461c911 100644 --- a/resources/views/livewire/pages/home.blade.php +++ b/resources/views/livewire/pages/home.blade.php @@ -174,6 +174,7 @@ class="font-medium text-flag-green hover:text-green-500 hover:underline"
    Developer working on laptop - Notifications + {{ __('Notifications') }}
    diff --git a/resources/views/livewire/pages/sponsoring.blade.php b/resources/views/livewire/pages/sponsoring.blade.php index 60e027f5..fe92f5f3 100644 --- a/resources/views/livewire/pages/sponsoring.blade.php +++ b/resources/views/livewire/pages/sponsoring.blade.php @@ -59,11 +59,13 @@
    Laravel Shopper @if (trim($slot) === 'Laravel') - + @else {{ $slot }} @endif diff --git a/routes/features/forum.php b/routes/features/forum.php index 7d97be21..924800ab 100644 --- a/routes/features/forum.php +++ b/routes/features/forum.php @@ -7,4 +7,5 @@ Route::get('/', Forum\Index::class)->name('index'); Route::get('/channels', Forum\Channels::class)->name('channels'); +Route::get('/leaderboard', Forum\Leaderboard::class)->name('leaderboard'); Route::get('/{thread}', Forum\DetailThread::class)->name('show'); diff --git a/tailwind.config.js b/tailwind.config.js index 0f1e6bb8..ca474d76 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -37,6 +37,7 @@ export default { 'spin-reverse-slow': 'spin-reverse 4s linear infinite', 'spin-reverse-slower': 'spin-reverse 6s linear infinite', 'scroll-slow': 'scroll 30s linear infinite', + rotate: "rotate 8s linear infinite", }, keyframes: { 'fade-in': { @@ -64,7 +65,11 @@ export default { to: { transform: 'translateX(-100%)', } - } + }, + rotate: { + "0%": { transform: "rotate(0deg) scale(10)" }, + "100%": { transform: "rotate(-360deg) scale(10)" }, + }, }, colors: { flag: { @@ -121,7 +126,7 @@ export default { }, }, }, - }) + }), }, }, plugins: [ diff --git a/tests/Feature/Livewire/ReportSpamTest.php b/tests/Feature/Livewire/ReportSpamTest.php index a7eb76b6..fafb8b9d 100644 --- a/tests/Feature/Livewire/ReportSpamTest.php +++ b/tests/Feature/Livewire/ReportSpamTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -use App\Livewire\ReportSpam; +use App\Livewire\Components\ReportSpam; use App\Models\SpamReport; use App\Models\Thread; use App\Notifications\ReportedSpamToTelegram;