notification implementation into the toaster

This commit is contained in:
Čarodej
2022-03-12 08:40:35 +01:00
parent 0e45092795
commit 9e973b89ce
16 changed files with 294 additions and 209 deletions

View File

@@ -1,5 +1,4 @@
<?php
namespace App\Console\Commands;
use App\Users\Models\User;
@@ -27,7 +26,6 @@ class DemoNotificationDataCommand extends Command
*/
protected $description = 'Set up demo notifications data';
/**
* Execute the console command.
*/
@@ -74,7 +72,7 @@ class DemoNotificationDataCommand extends Command
'data' => json_encode([
'type' => 'team-invitation',
'title' => 'New Team Invitation',
'description' => "Jane Doe invite you to join into Team Folder.",
'description' => 'Jane Doe invite you to join into Team Folder.',
'action' => [
'type' => 'invitation',
'params' => [
@@ -119,7 +117,7 @@ class DemoNotificationDataCommand extends Command
'params' => [
'route' => 'Files',
'button' => 'Show Files',
'id' => $fileRequestFolder->id,
'id' => $fileRequestFolder->id,
],
],
]),
@@ -206,7 +204,7 @@ class DemoNotificationDataCommand extends Command
// Create thumbnail only if image is larger than predefined image sizes
if ($intervention->getWidth() > $size['size']) {
// Generate thumbnail
$intervention->resize($size['size'], null, fn($constraint) => $constraint->aspectRatio())->stream();
$intervention->resize($size['size'], null, fn ($constraint) => $constraint->aspectRatio())->stream();
// Store thumbnail to disk
Storage::put("files/$user->id/{$size['name']}-{$file_name}", $intervention);

View File

@@ -1,11 +1,11 @@
<?php
namespace App\Console;
use App\Console\Commands\DemoNotificationDataCommand;
use Illuminate\Console\Scheduling\Schedule;
use App\Console\Commands\SetupDevEnvironment;
use App\Console\Commands\SetupProdEnvironment;
use Support\Scheduler\Actions\ReportUsageAction;
use App\Console\Commands\DemoNotificationDataCommand;
use Support\Scheduler\Actions\DeleteFailedFilesAction;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Support\Scheduler\Actions\DeleteUnverifiedUsersAction;