From fa16c025ba0f0b086f55337794f6e41d5ba0c34d Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 5 Jun 2024 08:07:42 -0500 Subject: [PATCH] Fix popup toast messages (Remove Flasher) (#16090) * Remove flasher Just use a bit of custom code to interface with toastr js This is able to retain our custom theme and work properly * Fix style issues * Missed reference rename * Remove test code :) * Fix a missed rename * Fix one more missed reference * Fix typo --- app/Checks.php | 16 +- .../Controllers/Auth/SocialiteController.php | 4 +- .../Controllers/Auth/TwoFactorController.php | 11 +- .../Controllers/DeviceGroupController.php | 14 +- app/Http/Controllers/PortGroupController.php | 12 +- app/Http/Controllers/ServiceController.php | 5 +- .../Controllers/ServiceTemplateController.php | 14 +- app/Http/Controllers/UserController.php | 20 +- app/Http/Interfaces/ToastInterface.php | 70 +++++++ app/Listeners/AuthEventListener.php | 2 +- app/Providers/LegacyUserProvider.php | 4 +- app/View/Components/Toast.php | 36 ++++ composer.json | 1 - composer.lock | 191 +----------------- config/flasher.php | 21 -- html/css/app.css | 4 +- html/js/boot.js | 10 +- html/js/flasher.min.js | 1 - html/js/toastr.min.js | 2 +- html/mix-manifest.json | 2 +- includes/helpers.php | 16 ++ includes/html/pages/alert-transports.inc.php | 4 +- .../html/pages/device/edit/device.inc.php | 10 +- includes/html/pages/device/edit/snmp.inc.php | 14 +- resources/css/app.css | 2 +- resources/css/{flasher.css => toast.css} | 24 ++- resources/views/components/toast.blade.php | 9 + .../layouts/flasher-notification.blade.php | 37 ---- resources/views/layouts/librenmsv1.blade.php | 3 +- tailwind.config.js | 1 + 30 files changed, 222 insertions(+), 338 deletions(-) create mode 100644 app/Http/Interfaces/ToastInterface.php create mode 100644 app/View/Components/Toast.php delete mode 100644 config/flasher.php delete mode 100644 html/js/flasher.min.js rename resources/css/{flasher.css => toast.css} (90%) create mode 100644 resources/views/components/toast.blade.php delete mode 100644 resources/views/layouts/flasher-notification.blade.php diff --git a/app/Checks.php b/app/Checks.php index 59bc8cc8c3..356447cd4d 100644 --- a/app/Checks.php +++ b/app/Checks.php @@ -54,32 +54,26 @@ class Checks if ($user->isAdmin()) { $notifications = Notification::isUnread($user)->where('severity', '>', Severity::Ok->value)->get(); foreach ($notifications as $notification) { - flash() - ->using('template.librenms') - ->title($notification->title) - ->addWarning("$notification->body"); + toast()->warning($notification->title, "$notification->body"); } $warn_sec = Config::get('rrd.step', 300) * 3; if (Device::isUp()->where('last_polled', '<=', Carbon::now()->subSeconds($warn_sec))->exists()) { $warn_min = $warn_sec / 60; - flash() - ->using('template.librenms') - ->title('Devices unpolled') - ->addWarning('It appears as though you have some devices that haven\'t completed polling within the last ' . $warn_min . ' minutes, you may want to check that out :)'); + toast()->warning('Devices unpolled', 'It appears as though you have some devices that haven\'t completed polling within the last ' . $warn_min . ' minutes, you may want to check that out :)'); } // Directory access checks $rrd_dir = Config::get('rrd_dir'); if (! is_dir($rrd_dir)) { - flash()->addError("RRD Directory is missing ($rrd_dir). Graphing may fail. Validate your install"); + toast()->error("Temp Directory is not writable ($temp_dir). Graphing may fail. Validate your install"); } } } diff --git a/app/Http/Controllers/Auth/SocialiteController.php b/app/Http/Controllers/Auth/SocialiteController.php index 023a3b9edf..a849d166df 100644 --- a/app/Http/Controllers/Auth/SocialiteController.php +++ b/app/Http/Controllers/Auth/SocialiteController.php @@ -74,7 +74,7 @@ class SocialiteController extends Controller if (array_key_exists('error', $request->query())) { $error = $request->query('error'); $error_description = $request->query('error_description'); - flash()->addError($error . ': ' . $error_description); + toast()->error($error . ': ' . $error_description); return redirect()->route('login'); } @@ -121,7 +121,7 @@ class SocialiteController extends Controller return redirect()->intended(); } catch (AuthenticationException $e) { - flash()->addError($e->getMessage()); + toast()->error($e->getMessage()); } return redirect()->route('login'); diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php index ad4720efcd..7312122f02 100644 --- a/app/Http/Controllers/Auth/TwoFactorController.php +++ b/app/Http/Controllers/Auth/TwoFactorController.php @@ -26,6 +26,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; +use App\Http\Interfaces\ToastInterface; use App\Models\User; use App\Models\UserPref; use Illuminate\Http\Request; @@ -37,14 +38,14 @@ use Session; class TwoFactorController extends Controller { - public function verifyTwoFactor(Request $request) + public function verifyTwoFactor(Request $request, ToastInterface $toast) { $this->validate($request, [ 'twofactor' => 'required|numeric', ]); try { - $this->checkToken($request->user(), $request->input('twofactor')); + $this->checkToken($request->user(), $request->input('twofactor'), $toast); } catch (AuthenticationException $e) { return redirect()->route('2fa.form')->withErrors($e->getMessage()); } @@ -54,7 +55,7 @@ class TwoFactorController extends Controller UserPref::forgetPref(auth()->user(), 'twofactor'); $request->session()->forget(['twofactor', 'twofactorremove']); - flash()->addInfo(__('TwoFactor auth removed.')); + $toast->info(__('TwoFactor auth removed.')); return redirect('preferences'); } @@ -153,7 +154,7 @@ class TwoFactorController extends Controller * * @throws AuthenticationException */ - private function checkToken($user, $token) + private function checkToken($user, $token, ToastInterface $toast) { if (! $token) { throw new AuthenticationException(__('No Two-Factor Token entered.')); @@ -192,7 +193,7 @@ class TwoFactorController extends Controller // notify if added if (Session::has('twofactoradd')) { - flash()->addSuccess(__('TwoFactor auth added.')); + $toast->success(__('TwoFactor auth added.')); Session::forget('twofactoradd'); } diff --git a/app/Http/Controllers/DeviceGroupController.php b/app/Http/Controllers/DeviceGroupController.php index 405aa73094..0cd480e568 100644 --- a/app/Http/Controllers/DeviceGroupController.php +++ b/app/Http/Controllers/DeviceGroupController.php @@ -2,8 +2,8 @@ namespace App\Http\Controllers; +use App\Http\Interfaces\ToastInterface; use App\Models\DeviceGroup; -use Flasher\Prime\FlasherInterface; use Illuminate\Http\Request; use Illuminate\Validation\Rule; use LibreNMS\Alerting\QueryBuilderFilter; @@ -49,7 +49,7 @@ class DeviceGroupController extends Controller * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request, FlasherInterface $flasher) + public function store(Request $request, ToastInterface $toast) { $this->validate($request, [ 'name' => 'required|string|unique:device_groups', @@ -67,7 +67,7 @@ class DeviceGroupController extends Controller $deviceGroup->devices()->sync($request->devices); } - $flasher->addSuccess(__('Device Group :name created', ['name' => htmlentities($deviceGroup->name)])); + $toast->success(__('Device Group :name created', ['name' => htmlentities($deviceGroup->name)])); return redirect()->route('device-groups.index'); } @@ -110,7 +110,7 @@ class DeviceGroupController extends Controller * @param \App\Models\DeviceGroup $deviceGroup * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, DeviceGroup $deviceGroup, FlasherInterface $flasher) + public function update(Request $request, DeviceGroup $deviceGroup, ToastInterface $toast) { $this->validate($request, [ 'name' => [ @@ -143,9 +143,9 @@ class DeviceGroupController extends Controller if ($deviceGroup->isDirty() || $devices_updated) { try { if ($deviceGroup->save() || $devices_updated) { - $flasher->addSuccess(__('Device Group :name updated', ['name' => htmlentities($deviceGroup->name)])); + $toast->success(__('Device Group :name updated', ['name' => htmlentities($deviceGroup->name)])); } else { - $flasher->addError(__('Failed to save')); + $toast->error(__('Failed to save')); return redirect()->back()->withInput(); } @@ -155,7 +155,7 @@ class DeviceGroupController extends Controller ]); } } else { - $flasher->addInfo(__('No changes made')); + $toast->info(__('No changes made')); } return redirect()->route('device-groups.index'); diff --git a/app/Http/Controllers/PortGroupController.php b/app/Http/Controllers/PortGroupController.php index ae0961206d..6302adafdd 100644 --- a/app/Http/Controllers/PortGroupController.php +++ b/app/Http/Controllers/PortGroupController.php @@ -2,8 +2,8 @@ namespace App\Http\Controllers; +use App\Http\Interfaces\ToastInterface; use App\Models\PortGroup; -use Flasher\Prime\FlasherInterface; use Illuminate\Http\Request; use Illuminate\Validation\Rule; @@ -39,7 +39,7 @@ class PortGroupController extends Controller * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request, FlasherInterface $flasher) + public function store(Request $request, ToastInterface $toast) { $this->validate($request, [ 'name' => 'required|string|unique:port_groups', @@ -48,7 +48,7 @@ class PortGroupController extends Controller $portGroup = PortGroup::make($request->only(['name', 'desc'])); $portGroup->save(); - $flasher->addSuccess(__('Port Group :name created', ['name' => $portGroup->name])); + $toast->success(__('Port Group :name created', ['name' => $portGroup->name])); return redirect()->route('port-groups.index'); } @@ -73,7 +73,7 @@ class PortGroupController extends Controller * @param \App\Models\PortGroup $portGroup * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, PortGroup $portGroup, FlasherInterface $flasher) + public function update(Request $request, PortGroup $portGroup, ToastInterface $toast) { $this->validate($request, [ 'name' => [ @@ -90,9 +90,9 @@ class PortGroupController extends Controller $portGroup->fill($request->only(['name', 'desc'])); if ($portGroup->save()) { - $flasher->addSuccess(__('Port Group :name updated', ['name' => $portGroup->name])); + $toast->success(__('Port Group :name updated', ['name' => $portGroup->name])); } else { - $flasher->addError(__('Failed to save')); + $toast->error(__('Failed to save')); return redirect()->back()->withInput(); } diff --git a/app/Http/Controllers/ServiceController.php b/app/Http/Controllers/ServiceController.php index e8af2a9f9f..613013cf30 100644 --- a/app/Http/Controllers/ServiceController.php +++ b/app/Http/Controllers/ServiceController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use App\Http\Interfaces\ToastInterface; use App\Models\Service; use Illuminate\Http\Request; @@ -13,7 +14,7 @@ class ServiceController extends Controller * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\View\View */ - public function store(Request $request) + public function store(Request $request, ToastInterface $toast) { $request = [ 'service_name' => 'required|string|unique:service', @@ -44,7 +45,7 @@ class ServiceController extends Controller ); $service->save(); - flash()->addSuccess(__('Service :name created', ['name' => $service->service_name])); + $toast->success(__('Service :name created', ['name' => $service->service_name])); return redirect()->route('services.templates.index'); } diff --git a/app/Http/Controllers/ServiceTemplateController.php b/app/Http/Controllers/ServiceTemplateController.php index 1b9660c238..badcb25cd6 100644 --- a/app/Http/Controllers/ServiceTemplateController.php +++ b/app/Http/Controllers/ServiceTemplateController.php @@ -2,11 +2,11 @@ namespace App\Http\Controllers; +use App\Http\Interfaces\ToastInterface; use App\Models\Device; use App\Models\DeviceGroup; use App\Models\Service; use App\Models\ServiceTemplate; -use Flasher\Prime\FlasherInterface; use Illuminate\Http\Request; use Illuminate\Validation\Rule; use LibreNMS\Alerting\QueryBuilderFilter; @@ -60,7 +60,7 @@ class ServiceTemplateController extends Controller * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\View\View */ - public function store(Request $request, FlasherInterface $flasher) + public function store(Request $request, ToastInterface $toast) { $this->validate( $request, [ @@ -105,7 +105,7 @@ class ServiceTemplateController extends Controller } $template->groups()->sync($request->groups); - $flasher->addSuccess(__('Service Template :name created', ['name' => $template->name])); + $toast->success(__('Service Template :name created', ['name' => $template->name])); return redirect()->route('services.templates.index'); } @@ -146,7 +146,7 @@ class ServiceTemplateController extends Controller * @param \App\Models\ServiceTemplate $template * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\View\View */ - public function update(Request $request, ServiceTemplate $template, FlasherInterface $flasher) + public function update(Request $request, ServiceTemplate $template, ToastInterface $toast) { $this->validate( $request, [ @@ -214,9 +214,9 @@ class ServiceTemplateController extends Controller if ($template->isDirty() || $devices_updated || isset($device_groups_updated)) { try { if ($template->save() || $devices_updated || isset($device_groups_updated)) { - $flasher->addSuccess(__('Service Template :name updated', ['name' => $template->name])); + $toast->success(__('Service Template :name updated', ['name' => $template->name])); } else { - $flasher->addError(__('Failed to save')); + $toast->error(__('Failed to save')); return redirect()->back()->withInput(); } @@ -226,7 +226,7 @@ class ServiceTemplateController extends Controller ]); } } else { - $flasher->addInfo(__('No changes made')); + $toast->info(__('No changes made')); } return redirect()->route('services.templates.index'); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index cd356a454d..1a91f6e8cf 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -25,6 +25,7 @@ namespace App\Http\Controllers; +use App\Http\Interfaces\ToastInterface; use App\Http\Requests\StoreUserRequest; use App\Http\Requests\UpdateUserRequest; use App\Models\AuthLog; @@ -32,7 +33,6 @@ use App\Models\Dashboard; use App\Models\User; use App\Models\UserPref; use Auth; -use Flasher\Prime\FlasherInterface; use Illuminate\Support\Str; use LibreNMS\Authentication\LegacyAuth; use LibreNMS\Config; @@ -90,7 +90,7 @@ class UserController extends Controller * @param StoreUserRequest $request * @return \Illuminate\Http\RedirectResponse */ - public function store(StoreUserRequest $request, FlasherInterface $flasher) + public function store(StoreUserRequest $request, ToastInterface $toast) { $user = $request->only(['username', 'realname', 'email', 'descr', 'can_modify_passwd']); $user['auth_type'] = LegacyAuth::getType(); @@ -105,12 +105,12 @@ class UserController extends Controller $this->updateTimezone($user, $request->get('timezone')); if ($user->save()) { - $flasher->addSuccess(__('User :username created', ['username' => $user->username])); + $toast->success(__('User :username created', ['username' => $user->username])); return redirect(route('users.index')); } - $flasher->addError(__('Failed to create user')); + $toast->error(__('Failed to create user')); return redirect()->back(); } @@ -169,7 +169,7 @@ class UserController extends Controller * @param User $user * @return \Illuminate\Http\RedirectResponse */ - public function update(UpdateUserRequest $request, User $user, FlasherInterface $flasher) + public function update(UpdateUserRequest $request, User $user, ToastInterface $toast) { if ($request->get('new_password') && $user->canSetPassword($request->user())) { $user->setPassword($request->new_password); @@ -191,24 +191,24 @@ class UserController extends Controller } if ($request->has('dashboard') && $this->updateDashboard($user, $request->get('dashboard'))) { - $flasher->addSuccess(__('Updated dashboard for :username', ['username' => $user->username])); + $toast->success(__('Updated dashboard for :username', ['username' => $user->username])); } if ($request->has('timezone') && $this->updateTimezone($user, $request->get('timezone'))) { if ($request->get('timezone') != 'default') { - $flasher->addSuccess(__('Updated timezone for :username', ['username' => $user->username])); + $toast->success(__('Updated timezone for :username', ['username' => $user->username])); } else { - $flasher->addSuccess(__('Cleared timezone for :username', ['username' => $user->username])); + $toast->success(__('Cleared timezone for :username', ['username' => $user->username])); } } if ($user->save()) { - $flasher->addSuccess(__('User :username updated', ['username' => $user->username])); + $toast->success(__('User :username updated', ['username' => $user->username])); return redirect(route(Str::contains(URL::previous(), 'preferences') ? 'preferences.index' : 'users.index')); } - $flasher->addError(__('Failed to update user :username', ['username' => $user->username])); + $toast->error(__('Failed to update user :username', ['username' => $user->username])); return redirect()->back(); } diff --git a/app/Http/Interfaces/ToastInterface.php b/app/Http/Interfaces/ToastInterface.php new file mode 100644 index 0000000000..92247e918e --- /dev/null +++ b/app/Http/Interfaces/ToastInterface.php @@ -0,0 +1,70 @@ +. + * + * @link https://www.librenms.org + * + * @copyright 2024 Tony Murray + * @author Tony Murray + */ + +namespace App\Http\Interfaces; + +use Illuminate\Session\SessionManager; + +class ToastInterface +{ + public function __construct( + private SessionManager $session + ) { + } + + public function info(string $title, ?string $message = null, ?array $options = null): static + { + return $this->message('info', $title, $message, $options); + } + + public function success(string $title, ?string $message = null, ?array $options = null): static + { + return $this->message('success', $title, $message, $options); + } + + public function error(string $title, ?string $message = null, ?array $options = null): static + { + return $this->message('error', $title, $message, $options); + } + + public function warning(string $title, ?string $message = null, ?array $options = null): static + { + return $this->message('warning', $title, $message, $options); + } + + public function message(string $level, string $title, ?string $message = null, ?array $options = null): static + { + $notifications = $this->session->get('toasts', []); + array_push($notifications, [ + 'level' => $level, + 'title' => $message === null ? '' : $title, + 'message' => $message ?? $title, + 'options' => $options ?? [], + ]); + $this->session->flash('toasts', $notifications); + + return $this; + } +} diff --git a/app/Listeners/AuthEventListener.php b/app/Listeners/AuthEventListener.php index d1dbf8ad71..53af3e62d6 100644 --- a/app/Listeners/AuthEventListener.php +++ b/app/Listeners/AuthEventListener.php @@ -33,7 +33,7 @@ class AuthEventListener DB::table('authlog')->insert(['user' => $user->username ?: '', 'address' => Request::ip(), 'result' => 'Logged In']); - flash()->addInfo('Welcome ' . ($user->realname ?: $user->username)); + toast()->info('Welcome ' . ($user->realname ?: $user->username)); } /** diff --git a/app/Providers/LegacyUserProvider.php b/app/Providers/LegacyUserProvider.php index e3a4a3106a..a5ebeee20f 100644 --- a/app/Providers/LegacyUserProvider.php +++ b/app/Providers/LegacyUserProvider.php @@ -136,7 +136,7 @@ class LegacyUserProvider implements UserProvider if (Debug::isEnabled()) { $auth_message .= '
' . $ae->getFile() . ': ' . $ae->getLine(); } - flash()->addError($auth_message); + toast()->error($auth_message); $username = $username ?? Session::get('username', $credentials['username']); @@ -183,7 +183,7 @@ class LegacyUserProvider implements UserProvider error_reporting(-1); } catch (AuthenticationException $ae) { - flash()->addError($ae->getMessage()); + toast()->error($ae->getMessage()); } if (empty($new_user)) { diff --git a/app/View/Components/Toast.php b/app/View/Components/Toast.php new file mode 100644 index 0000000000..9d11aa042c --- /dev/null +++ b/app/View/Components/Toast.php @@ -0,0 +1,36 @@ + 'a[href],b,i,ul,ol,li,h1,h2,h3,h4,br,p,pre', + 'URI.DisableExternal' => true, + ]; + public ?array $toasts; + + /** + * Create a new component instance. + */ + public function __construct(Request $request, SessionManager $session) + { + $this->purifier_config['URI.Host'] = $request->getHttpHost(); + $this->toasts = $session->get('toasts'); + $session->forget('toasts'); // to ward againsts double toasts + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + return view('components.toast'); + } +} diff --git a/composer.json b/composer.json index f4db7bcec5..ed3eae1f06 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,6 @@ "pear/console_table": "^1.3", "pear/net_dns2": "^1.5", "php-amqplib/php-amqplib": "^3.1", - "php-flasher/flasher-laravel": "^1.12", "phpmailer/phpmailer": "~6.0", "predis/predis": "^2.0", "silber/bouncer": "^1.0", diff --git a/composer.lock b/composer.lock index c861f2f8fb..3409316a1c 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": "dd407332d453e562b204848f9044161b", + "content-hash": "f4f2fd9863881ce9c624955837bcb192", "packages": [ { "name": "amenadiel/jpgraph", @@ -4283,195 +4283,6 @@ }, "time": "2024-02-07T17:21:26+00:00" }, - { - "name": "php-flasher/flasher", - "version": "v1.15.10", - "source": { - "type": "git", - "url": "https://github.com/php-flasher/flasher.git", - "reference": "33ae74e73f62814fff4e78e78f912d9b6ddf82d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-flasher/flasher/zipball/33ae74e73f62814fff4e78e78f912d9b6ddf82d0", - "reference": "33ae74e73f62814fff4e78e78f912d9b6ddf82d0", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Flasher\\Prime\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Younes KHOUBZA", - "email": "younes.khoubza@gmail.com", - "homepage": "https://www.linkedin.com/in/younes-khoubza", - "role": "Developer" - } - ], - "description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.", - "homepage": "https://php-flasher.io", - "keywords": [ - "custom-adapter", - "dark-mode", - "desktop-notifications", - "flash-messages", - "framework-agnostic", - "javascript", - "laravel", - "notification-system", - "noty", - "notyf", - "php", - "php-flasher", - "phpstorm-auto-complete", - "pnotify", - "rtl", - "sweetalert", - "symfony", - "toastr", - "user-experience", - "user-feedback", - "yoeunes" - ], - "support": { - "source": "https://github.com/php-flasher/flasher/tree/v1.15.10" - }, - "funding": [ - { - "url": "https://www.paypal.com/paypalme/yoeunes", - "type": "custom" - }, - { - "url": "https://github.com/yoeunes", - "type": "github" - }, - { - "url": "https://ko-fi.com/yoeunes", - "type": "ko_fi" - }, - { - "url": "https://opencollective.com/php-flasher", - "type": "open_collective" - }, - { - "url": "https://www.patreon.com/yoeunes", - "type": "patreon" - } - ], - "time": "2023-12-16T17:11:36+00:00" - }, - { - "name": "php-flasher/flasher-laravel", - "version": "v1.15.10", - "source": { - "type": "git", - "url": "https://github.com/php-flasher/flasher-laravel.git", - "reference": "18b6ed815a791d483dd90a4f4561abb1b4cdb099" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-flasher/flasher-laravel/zipball/18b6ed815a791d483dd90a4f4561abb1b4cdb099", - "reference": "18b6ed815a791d483dd90a4f4561abb1b4cdb099", - "shasum": "" - }, - "require": { - "illuminate/support": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", - "php": ">=5.3", - "php-flasher/flasher": "^1.15.9" - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "Flasher": "Flasher\\Laravel\\Facade\\Flasher" - }, - "providers": [ - "Flasher\\Laravel\\FlasherServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Flasher\\Laravel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Younes KHOUBZA", - "email": "younes.khoubza@gmail.com", - "homepage": "https://www.linkedin.com/in/younes-khoubza", - "role": "Developer" - } - ], - "description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.", - "homepage": "https://php-flasher.io", - "keywords": [ - "custom-adapter", - "dark-mode", - "desktop-notifications", - "flash-messages", - "framework-agnostic", - "javascript", - "laravel", - "notification-system", - "noty", - "notyf", - "php", - "php-flasher", - "phpstorm-auto-complete", - "pnotify", - "rtl", - "sweetalert", - "symfony", - "toastr", - "user-experience", - "user-feedback", - "yoeunes" - ], - "support": { - "source": "https://github.com/php-flasher/flasher-laravel/tree/v1.15.10" - }, - "funding": [ - { - "url": "https://www.paypal.com/paypalme/yoeunes", - "type": "custom" - }, - { - "url": "https://github.com/yoeunes", - "type": "github" - }, - { - "url": "https://ko-fi.com/yoeunes", - "type": "ko_fi" - }, - { - "url": "https://opencollective.com/php-flasher", - "type": "open_collective" - }, - { - "url": "https://www.patreon.com/yoeunes", - "type": "patreon" - } - ], - "time": "2024-01-21T17:30:21+00:00" - }, { "name": "php-http/client-common", "version": "2.7.1", diff --git a/config/flasher.php b/config/flasher.php deleted file mode 100644 index 2f81f08639..0000000000 --- a/config/flasher.php +++ /dev/null @@ -1,21 +0,0 @@ - 'template.librenms', - - 'root_script' => null, - - 'template_factory' => [ - 'templates' => [ - 'librenms' => [ - 'view' => 'layouts.flasher-notification', - 'options' => [ - 'timeout' => 12000, - 'style' => [ - 'top' => '55px', - ], - ], - ], - ], - ], -]; diff --git a/html/css/app.css b/html/css/app.css index 0225174cfe..d39581aa0e 100644 --- a/html/css/app.css +++ b/html/css/app.css @@ -1,2 +1,2 @@ -#flasher-container-top-right{position:fixed;right:12px;top:55px;z-index:999999}#flasher-container-top-right a{font-weight:700}#flasher-container-top-right>div{background-position:10px;background-repeat:no-repeat;min-height:50px;width:304px}.flasher-error{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bS02IDlhMSAxIDAgMCAxIC43MDcuMjkzTDE2IDE0LjU4Nmw1LjI5My01LjI5M2ExIDEgMCAwIDEgMS40MTQgMCAxIDEgMCAwIDEgMCAxLjQxNEwxNy40MTQgMTZsNS4yOTMgNS4yOTNhMSAxIDAgMCAxIDAgMS40MTQgMSAxIDAgMCAxLTEuNDE0IDBMMTYgMTcuNDE0bC01LjI5MyA1LjI5M2ExIDEgMCAwIDEtMS40MTQgMCAxIDEgMCAwIDEgMC0xLjQxNEwxNC41ODYgMTZsLTUuMjkzLTUuMjkzYTEgMSAwIDAgMSAwLTEuNDE0QTEgMSAwIDAgMSAxMCA5eiIgZmlsbD0iI2RjMjYyNiIvPjwvc3ZnPg==");background-size:32px}.flasher-info{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNmM1LjUxMSAwIDEwIDQuNDg5IDEwIDEwcy00LjQ4OSAxMC0xMCAxMFM2IDIxLjUxMSA2IDE2IDEwLjQ4OSA2IDE2IDZ6bTAgMmMtNC40MyAwLTggMy41Ny04IDhzMy41NyA4IDggOCA4LTMuNTcgOC04LTMuNTctOC04LTh6bTAgM2ExIDEgMCAwIDEgMSAxdjRhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi00YTEgMSAwIDAgMSAxLTF6bTAgOGguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiMyNTYzZWIiLz48L3N2Zz4=");background-size:32px}.flasher-success{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTcgMTBhMSAxIDAgMCAxIC43MDcuMjkzIDEgMSAwIDAgMSAwIDEuNDE0bC0xMCAxMGExIDEgMCAwIDEtMS40MTQgMGwtNC00YTEgMSAwIDAgMSAwLTEuNDE0IDEgMSAwIDAgMSAxLjQxNCAwTDEzIDE5LjU4Nmw5LjI5My05LjI5M0ExIDEgMCAwIDEgMjMgMTB6IiBmaWxsPSIjMDU5NjY5Ii8+PC9zdmc+");background-size:32px}.flasher-warning{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNi4xNTZjMS4wMTYgMCAyLjAzMi40OSAyLjU5OCAxLjQ2OWw2LjkyNyAxMmMxLjEzMSAxLjk1OC0uMzM2IDQuNS0yLjU5NyA0LjVIOS4wNzJjLTIuMjYxIDAtMy43MjgtMi41NDItMi41OTctNC41bDYuOTI3LTEyYy41NjYtLjk3OSAxLjU4Mi0xLjQ2OSAyLjU5OC0xLjQ2OXptMCAxLjkzOGMtLjMzIDAtLjY2LjE3Ny0uODY1LjUzMWwtNi45MyAxMmMtLjQwOS43MDguMDQ5IDEuNS44NjcgMS41aDEzLjg1NmMuODE4IDAgMS4yNzYtLjc5Mi44NjctMS41bC02LjkzLTEyYy0uMjA0LS4zNTQtLjUzNC0uNTMxLS44NjUtLjUzMXptMCA0LjAzMWExIDEgMCAwIDEgMSAxdjJhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi0yYTEgMSAwIDAgMSAxLTF6bTAgNmguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiNkOTc3MDYiLz48L3N2Zz4=");background-size:32px} -/*! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.tw-relative{position:relative}.tw-z-0{z-index:0}.tw-z-50{z-index:50}.tw-float-right{float:right}.tw-m-3{margin:.75rem}.tw-mx-10{margin-left:2.5rem;margin-right:2.5rem}.tw-mx-4{margin-left:1rem;margin-right:1rem}.tw-mx-auto{margin-left:auto;margin-right:auto}.\!tw-mb-0{margin-bottom:0!important}.-tw-mb-px{margin-bottom:-1px}.tw--ml-px{margin-left:-1px}.tw-mb-0{margin-bottom:0}.tw-mb-1{margin-bottom:.25rem}.tw-mb-2{margin-bottom:.5rem}.tw-me-2{margin-inline-end:.5rem}.tw-ml-2{margin-left:.5rem}.tw-ml-3{margin-left:.75rem}.tw-ml-auto{margin-left:auto}.tw-mr-0{margin-right:0}.tw-mr-0\.5{margin-right:.125rem}.tw-mr-1{margin-right:.25rem}.tw-mr-2{margin-right:.5rem}.tw-mr-3{margin-right:.75rem}.tw-mt-1{margin-top:.25rem}.tw-mt-10{margin-top:2.5rem}.tw-mt-2{margin-top:.5rem}.tw-mt-5{margin-top:1.25rem}.tw-block{display:block}.tw-inline-block{display:inline-block}.tw-flex{display:flex}.tw-inline-flex{display:inline-flex}.tw-grid{display:grid}.tw-hidden{display:none}.tw-h-1{height:.25rem}.tw-h-24{height:6rem}.tw-h-5{height:1.25rem}.\!tw-w-auto{width:auto!important}.tw-w-48{width:12rem}.tw-w-5{width:1.25rem}.tw-w-full{width:100%}.tw-max-w-screen-lg{max-width:992px}.tw-flex-1{flex:1 1 0%}.tw-flex-grow{flex-grow:1}.tw-cursor-crosshair{cursor:crosshair}.tw-cursor-default{cursor:default}.tw-cursor-pointer{cursor:pointer}.tw-list-none{list-style-type:none}.tw-flex-row-reverse{flex-direction:row-reverse}.tw-flex-col{flex-direction:column}.tw-flex-wrap{flex-wrap:wrap}.tw-place-items-center{place-items:center}.tw-items-center{align-items:center}.tw-items-baseline{align-items:baseline}.tw-justify-between{justify-content:space-between}.tw-overflow-hidden{overflow:hidden}.tw-overflow-y-hidden{overflow-y:hidden}.tw-whitespace-nowrap{white-space:nowrap}.tw-text-nowrap{text-wrap:nowrap}.tw-rounded{border-radius:.25rem}.tw-rounded-lg{border-radius:.5rem}.tw-rounded-md{border-radius:.375rem}.tw-rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.tw-rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.tw-rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.tw-border{border-width:1px}.tw-border-2{border-width:2px}.tw-border-b{border-bottom-width:1px}.tw-border-b-0{border-bottom-width:0}.tw-border-b-0\.5{border-bottom-width:.5px}.tw-border-b-2{border-bottom-width:2px}.tw-border-l-8{border-left-width:8px}.tw-border-r-0{border-right-width:0}.tw-border-r-0\.5{border-right-width:.5px}.tw-border-t-0{border-top-width:0}.tw-border-t-0\.5{border-top-width:.5px}.tw-border-solid{border-style:solid}.tw-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.tw-border-current{border-color:currentColor}.tw-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.tw-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.tw-border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.tw-border-transparent{border-color:transparent}.tw-bg-current{background-color:currentColor}.tw-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.tw-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.\!tw-p-0{padding:0!important}.tw-p-1{padding:.25rem}.tw-p-10{padding:2.5rem}.tw-p-2{padding:.5rem}.tw-p-2\.5{padding:.625rem}.tw-p-3{padding:.75rem}.tw-px-2{padding-left:.5rem;padding-right:.5rem}.tw-px-3{padding-left:.75rem;padding-right:.75rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-bottom:.5rem;padding-top:.5rem}.tw-py-4{padding-bottom:1rem;padding-top:1rem}.\!tw-pb-0{padding-bottom:0!important}.tw-pl-2{padding-left:.5rem}.tw-pl-20{padding-left:5rem}.tw-pr-1{padding-right:.25rem}.tw-pr-2{padding-right:.5rem}.tw-text-left{text-align:left}.tw-text-center{text-align:center}.tw-text-2xl{font-size:1.5rem;line-height:2rem}.tw-text-3xl{font-size:1.875rem;line-height:2.25rem}.tw-text-base{font-size:1rem;line-height:1.5rem}.tw-text-sm{font-size:.875rem;line-height:1.25rem}.tw-text-xl{font-size:1.25rem;line-height:1.75rem}.tw-font-bold{font-weight:700}.tw-font-medium{font-weight:500}.tw-font-normal{font-weight:400}.tw-font-semibold{font-weight:600}.tw-capitalize{text-transform:capitalize}.tw-leading-5{line-height:1.25rem}.tw-leading-6{line-height:1.5rem}.tw-leading-7{line-height:1.75rem}.tw-leading-normal{line-height:1.5}.tw-text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.tw-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.tw-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.tw-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.tw-text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.tw-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.tw-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.tw-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.tw-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.tw-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.tw-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.tw-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.tw-no-underline{text-decoration-line:none}.tw-opacity-0{opacity:0}.tw-opacity-100{opacity:1}.tw-opacity-80{opacity:.8}.tw-opacity-90{opacity:.9}.tw-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.tw-shadow-lg,.tw-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tw-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.tw-ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.tw-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tw-duration-150,.tw-transition{transition-duration:.15s}.tw-duration-700{transition-duration:.7s}.tw-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.tw-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.even\:tw-bg-gray-50:nth-child(2n){--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.visited\:tw-text-blue-900:visited{color:#1e3a8a}.visited\:tw-text-gray-400:visited{color:#9ca3af}.visited\:tw-text-red-600:visited{color:#dc2626}.hover\:tw-border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:tw-bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:tw-bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.hover\:tw-text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.hover\:tw-text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.hover\:tw-text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:tw-text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\:tw-opacity-100:hover{opacity:1}.hover\:tw-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:tw-z-10:focus{z-index:10}.focus\:tw-border-blue-300:focus{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.focus\:tw-border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.focus\:tw-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:tw-ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:tw-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.active\:tw-bg-gray-100:active{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.active\:tw-text-gray-500:active{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.active\:tw-text-gray-700:active{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.dark\:tw-border-blue-500:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.dark\:tw-border-dark-gray-200:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(62 68 76/var(--tw-border-opacity))}.dark\:tw-border-gray-600:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:tw-bg-dark-gray-300:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(53 58 65/var(--tw-bg-opacity))}.dark\:tw-bg-gray-700:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:tw-bg-gray-800:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:tw-text-blue-500:is(.tw-dark *){--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.dark\:tw-text-dark-white-100:is(.tw-dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.dark\:tw-text-gray-300:is(.tw-dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:tw-text-gray-400:is(.tw-dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:tw-text-gray-600:is(.tw-dark *){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.dark\:tw-text-white:is(.tw-dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:tw-placeholder-gray-400:is(.tw-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}.dark\:tw-placeholder-gray-400:is(.tw-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}.dark\:even\:tw-bg-zinc-900:nth-child(2n):is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}.dark\:visited\:tw-text-dark-white-100:visited:is(.tw-dark *){color:#f9fafb}.dark\:hover\:tw-bg-gray-600:hover:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.dark\:hover\:tw-text-gray-300:hover:is(.tw-dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:focus\:tw-border-blue-500:focus:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.dark\:focus\:tw-border-blue-700:focus:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}.dark\:focus\:tw-border-blue-800:focus:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity))}.dark\:active\:tw-bg-gray-700:active:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:active\:tw-text-gray-300:active:is(.tw-dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.select2-dropdown:is(.tw-dark *) {background-color: #2E3338;}.select2-results__group:is(.tw-dark *) {border: 1px solid #1f2225;}@media (min-width:576px){.sm\:tw-inline{display:inline}.sm\:tw-flex{display:flex}.sm\:tw-hidden{display:none}.sm\:tw-w-1\/2{width:50%}.sm\:tw-flex-1{flex:1 1 0%}.sm\:tw-items-center{align-items:center}.sm\:tw-justify-between{justify-content:space-between}.sm\:tw-px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:992px){.lg\:tw-w-1\/4{width:25%}}.rtl\:tw-flex-row-reverse:where([dir=rtl],[dir=rtl] *){flex-direction:row-reverse} +#toast-container-top-right{position:fixed;right:12px;top:55px;z-index:999999}#toast-container-top-right a{font-weight:700}#toast-container-top-right>div{background-position:10px;background-repeat:no-repeat;min-height:50px;width:304px}.toast-error{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bS02IDlhMSAxIDAgMCAxIC43MDcuMjkzTDE2IDE0LjU4Nmw1LjI5My01LjI5M2ExIDEgMCAwIDEgMS40MTQgMCAxIDEgMCAwIDEgMCAxLjQxNEwxNy40MTQgMTZsNS4yOTMgNS4yOTNhMSAxIDAgMCAxIDAgMS40MTQgMSAxIDAgMCAxLTEuNDE0IDBMMTYgMTcuNDE0bC01LjI5MyA1LjI5M2ExIDEgMCAwIDEtMS40MTQgMCAxIDEgMCAwIDEgMC0xLjQxNEwxNC41ODYgMTZsLTUuMjkzLTUuMjkzYTEgMSAwIDAgMSAwLTEuNDE0QTEgMSAwIDAgMSAxMCA5eiIgZmlsbD0iI2RjMjYyNiIvPjwvc3ZnPg==");background-size:32px}.toast-info{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNmM1LjUxMSAwIDEwIDQuNDg5IDEwIDEwcy00LjQ4OSAxMC0xMCAxMFM2IDIxLjUxMSA2IDE2IDEwLjQ4OSA2IDE2IDZ6bTAgMmMtNC40MyAwLTggMy41Ny04IDhzMy41NyA4IDggOCA4LTMuNTcgOC04LTMuNTctOC04LTh6bTAgM2ExIDEgMCAwIDEgMSAxdjRhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi00YTEgMSAwIDAgMSAxLTF6bTAgOGguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiMyNTYzZWIiLz48L3N2Zz4=");background-size:32px}.toast-success{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTcgMTBhMSAxIDAgMCAxIC43MDcuMjkzIDEgMSAwIDAgMSAwIDEuNDE0bC0xMCAxMGExIDEgMCAwIDEtMS40MTQgMGwtNC00YTEgMSAwIDAgMSAwLTEuNDE0IDEgMSAwIDAgMSAxLjQxNCAwTDEzIDE5LjU4Nmw5LjI5My05LjI5M0ExIDEgMCAwIDEgMjMgMTB6IiBmaWxsPSIjMDU5NjY5Ii8+PC9zdmc+");background-size:32px}.toast-warning{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNi4xNTZjMS4wMTYgMCAyLjAzMi40OSAyLjU5OCAxLjQ2OWw2LjkyNyAxMmMxLjEzMSAxLjk1OC0uMzM2IDQuNS0yLjU5NyA0LjVIOS4wNzJjLTIuMjYxIDAtMy43MjgtMi41NDItMi41OTctNC41bDYuOTI3LTEyYy41NjYtLjk3OSAxLjU4Mi0xLjQ2OSAyLjU5OC0xLjQ2OXptMCAxLjkzOGMtLjMzIDAtLjY2LjE3Ny0uODY1LjUzMWwtNi45MyAxMmMtLjQwOS43MDguMDQ5IDEuNS44NjcgMS41aDEzLjg1NmMuODE4IDAgMS4yNzYtLjc5Mi44NjctMS41bC02LjkzLTEyYy0uMjA0LS4zNTQtLjUzNC0uNTMxLS44NjUtLjUzMXptMCA0LjAzMWExIDEgMCAwIDEgMSAxdjJhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi0yYTEgMSAwIDAgMSAxLTF6bTAgNmguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiNkOTc3MDYiLz48L3N2Zz4=");background-size:32px}.toast-progress{background-color:#000;bottom:0;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40);height:4px;left:0;opacity:.4;position:absolute} +/*! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.tw-absolute{position:absolute}.tw-relative{position:relative}.tw-bottom-0{bottom:0}.tw-left-0{left:0}.tw-z-0{z-index:0}.tw-z-50{z-index:50}.tw-float-right{float:right}.tw-m-3{margin:.75rem}.tw-mx-10{margin-left:2.5rem;margin-right:2.5rem}.tw-mx-4{margin-left:1rem;margin-right:1rem}.tw-mx-auto{margin-left:auto;margin-right:auto}.\!tw-mb-0{margin-bottom:0!important}.-tw-mb-px{margin-bottom:-1px}.tw--ml-px{margin-left:-1px}.tw-mb-0{margin-bottom:0}.tw-mb-1{margin-bottom:.25rem}.tw-mb-2{margin-bottom:.5rem}.tw-me-2{margin-inline-end:.5rem}.tw-ml-2{margin-left:.5rem}.tw-ml-3{margin-left:.75rem}.tw-ml-auto{margin-left:auto}.tw-mr-0{margin-right:0}.tw-mr-0\.5{margin-right:.125rem}.tw-mr-1{margin-right:.25rem}.tw-mr-2{margin-right:.5rem}.tw-mr-3{margin-right:.75rem}.tw-mt-1{margin-top:.25rem}.tw-mt-10{margin-top:2.5rem}.tw-mt-2{margin-top:.5rem}.tw-mt-5{margin-top:1.25rem}.tw-block{display:block}.tw-inline-block{display:inline-block}.tw-flex{display:flex}.tw-inline-flex{display:inline-flex}.tw-grid{display:grid}.tw-hidden{display:none}.tw-h-1{height:.25rem}.tw-h-24{height:6rem}.tw-h-5{height:1.25rem}.\!tw-w-auto{width:auto!important}.tw-w-48{width:12rem}.tw-w-5{width:1.25rem}.tw-w-full{width:100%}.tw-max-w-screen-lg{max-width:992px}.tw-flex-1{flex:1 1 0%}.tw-flex-grow{flex-grow:1}.tw-cursor-crosshair{cursor:crosshair}.tw-cursor-default{cursor:default}.tw-cursor-pointer{cursor:pointer}.tw-list-none{list-style-type:none}.tw-flex-row-reverse{flex-direction:row-reverse}.tw-flex-col{flex-direction:column}.tw-flex-wrap{flex-wrap:wrap}.tw-place-items-center{place-items:center}.tw-items-center{align-items:center}.tw-items-baseline{align-items:baseline}.tw-justify-between{justify-content:space-between}.tw-overflow-hidden{overflow:hidden}.tw-overflow-y-hidden{overflow-y:hidden}.tw-whitespace-nowrap{white-space:nowrap}.tw-text-nowrap{text-wrap:nowrap}.tw-rounded{border-radius:.25rem}.tw-rounded-lg{border-radius:.5rem}.tw-rounded-md{border-radius:.375rem}.tw-rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.tw-rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.tw-rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.tw-border{border-width:1px}.tw-border-2{border-width:2px}.tw-border-b{border-bottom-width:1px}.tw-border-b-0{border-bottom-width:0}.tw-border-b-0\.5{border-bottom-width:.5px}.tw-border-b-2{border-bottom-width:2px}.tw-border-l-8{border-left-width:8px}.tw-border-r-0{border-right-width:0}.tw-border-r-0\.5{border-right-width:.5px}.tw-border-t-0{border-top-width:0}.tw-border-t-0\.5{border-top-width:.5px}.tw-border-solid{border-style:solid}.tw-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.tw-border-current{border-color:currentColor}.tw-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.tw-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.tw-border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.tw-border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity))}.tw-border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity))}.tw-border-transparent{border-color:transparent}.tw-border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity))}.tw-bg-current{background-color:currentColor}.tw-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.tw-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.\!tw-p-0{padding:0!important}.tw-p-1{padding:.25rem}.tw-p-10{padding:2.5rem}.tw-p-2{padding:.5rem}.tw-p-2\.5{padding:.625rem}.tw-p-3{padding:.75rem}.tw-px-2{padding-left:.5rem;padding-right:.5rem}.tw-px-3{padding-left:.75rem;padding-right:.75rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-bottom:.5rem;padding-top:.5rem}.tw-py-4{padding-bottom:1rem;padding-top:1rem}.\!tw-pb-0{padding-bottom:0!important}.tw-pl-2{padding-left:.5rem}.tw-pl-20{padding-left:5rem}.tw-pr-1{padding-right:.25rem}.tw-pr-2{padding-right:.5rem}.tw-text-left{text-align:left}.tw-text-center{text-align:center}.tw-text-2xl{font-size:1.5rem;line-height:2rem}.tw-text-3xl{font-size:1.875rem;line-height:2.25rem}.tw-text-base{font-size:1rem;line-height:1.5rem}.tw-text-sm{font-size:.875rem;line-height:1.25rem}.tw-text-xl{font-size:1.25rem;line-height:1.75rem}.tw-font-bold{font-weight:700}.tw-font-medium{font-weight:500}.tw-font-normal{font-weight:400}.tw-font-semibold{font-weight:600}.tw-capitalize{text-transform:capitalize}.tw-leading-5{line-height:1.25rem}.tw-leading-6{line-height:1.5rem}.tw-leading-7{line-height:1.75rem}.tw-leading-normal{line-height:1.5}.tw-text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.tw-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.tw-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.tw-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.tw-text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.tw-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.tw-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.tw-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.tw-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.tw-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.tw-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.tw-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.tw-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity))}.tw-no-underline{text-decoration-line:none}.tw-opacity-0{opacity:0}.tw-opacity-100{opacity:1}.tw-opacity-80{opacity:.8}.tw-opacity-90{opacity:.9}.tw-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.tw-shadow-lg,.tw-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tw-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.tw-ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.tw-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tw-duration-150,.tw-transition{transition-duration:.15s}.tw-duration-700{transition-duration:.7s}.tw-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.tw-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.even\:tw-bg-gray-50:nth-child(2n){--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.visited\:tw-text-blue-900:visited{color:#1e3a8a}.visited\:tw-text-gray-400:visited{color:#9ca3af}.visited\:tw-text-red-600:visited{color:#dc2626}.hover\:tw-border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:tw-bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:tw-bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.hover\:tw-text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.hover\:tw-text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.hover\:tw-text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:tw-text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\:tw-opacity-100:hover{opacity:1}.hover\:tw-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:tw-z-10:focus{z-index:10}.focus\:tw-border-blue-300:focus{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.focus\:tw-border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.focus\:tw-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:tw-ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:tw-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.active\:tw-bg-gray-100:active{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.active\:tw-text-gray-500:active{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.active\:tw-text-gray-700:active{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.dark\:tw-border-blue-500:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.dark\:tw-border-dark-gray-200:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(62 68 76/var(--tw-border-opacity))}.dark\:tw-border-gray-600:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:tw-bg-dark-gray-300:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(53 58 65/var(--tw-bg-opacity))}.dark\:tw-bg-gray-700:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:tw-bg-gray-800:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:tw-text-blue-500:is(.tw-dark *){--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.dark\:tw-text-dark-white-100:is(.tw-dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.dark\:tw-text-gray-300:is(.tw-dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:tw-text-gray-400:is(.tw-dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:tw-text-gray-600:is(.tw-dark *){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.dark\:tw-text-white:is(.tw-dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:tw-placeholder-gray-400:is(.tw-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}.dark\:tw-placeholder-gray-400:is(.tw-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}.dark\:even\:tw-bg-zinc-900:nth-child(2n):is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}.dark\:visited\:tw-text-dark-white-100:visited:is(.tw-dark *){color:#f9fafb}.dark\:hover\:tw-bg-gray-600:hover:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.dark\:hover\:tw-text-gray-300:hover:is(.tw-dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:focus\:tw-border-blue-500:focus:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.dark\:focus\:tw-border-blue-700:focus:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}.dark\:focus\:tw-border-blue-800:focus:is(.tw-dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity))}.dark\:active\:tw-bg-gray-700:active:is(.tw-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:active\:tw-text-gray-300:active:is(.tw-dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}@media (min-width:576px){.sm\:tw-inline{display:inline}.sm\:tw-flex{display:flex}.sm\:tw-hidden{display:none}.sm\:tw-w-1\/2{width:50%}.sm\:tw-flex-1{flex:1 1 0%}.sm\:tw-items-center{align-items:center}.sm\:tw-justify-between{justify-content:space-between}.sm\:tw-px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:992px){.lg\:tw-w-1\/4{width:25%}}.rtl\:tw-flex-row-reverse:where([dir=rtl],[dir=rtl] *){flex-direction:row-reverse} diff --git a/html/js/boot.js b/html/js/boot.js index 6d5cea7832..9896aff319 100644 --- a/html/js/boot.js +++ b/html/js/boot.js @@ -34,13 +34,13 @@ toastr.options = { titleClass: 'tw-text-xl tw-leading-7 tw-font-semibold tw-capitalize', messageClass: 'tw-mt-1 tw-text-base tw-leading-5 tw-text-gray-500 dark:tw-text-white', iconClasses: { - error: 'flasher-error tw-text-red-600 tw-border-red-600', - info: 'flasher-info tw-text-blue-600 tw-border-blue-600', - success: 'flasher-success tw-text-green-600 tw-border-green-600', - warning: 'flasher-warning tw-text-yellow-600 tw-border-yellow-600' + error: 'toast-error tw-text-red-600 tw-border-red-600', + info: 'toast-info tw-text-blue-600 tw-border-blue-600', + success: 'toast-success tw-text-green-600 tw-border-green-600', + warning: 'toast-warning tw-text-yellow-600 tw-border-yellow-600' }, timeOut: 12000, progressBar: true, progressClass: 'toast-progress tw-h-1 tw-bg-current tw-absolute tw-bottom-0 tw-left-0 tw-mr-0.5', - containerId: 'flasher-container-top-right' + containerId: 'toast-container-top-right' }; diff --git a/html/js/flasher.min.js b/html/js/flasher.min.js deleted file mode 100644 index 2ac8c4257f..0000000000 --- a/html/js/flasher.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Flasher=e()}(this,(function(){"use strict";var t=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var n=Object.prototype.toString.call(t);return"[object RegExp]"===n||"[object Date]"===n||function(t){return t.$$typeof===e}(t)}(t)};var e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function r(t,e,r){return t.concat(e).map((function(t){return n(t,r)}))}function o(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function i(t,e){try{return e in t}catch(t){return!1}}function s(t,e,r){var s={};return r.isMergeableObject(t)&&o(t).forEach((function(e){s[e]=n(t[e],r)})),o(e).forEach((function(o){(function(t,e){return i(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(i(t,o)&&r.isMergeableObject(e[o])?s[o]=function(t,e){if(!e.customMerge)return a;var n=e.customMerge(t);return"function"==typeof n?n:a}(o,r)(t[o],e[o],r):s[o]=n(e[o],r))})),s}function a(e,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||t,i.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(o);return a===Array.isArray(e)?a?i.arrayMerge(e,o,i):s(e,o,i):n(o,i)}a.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return a(t,n,e)}),{})};var c=a,u=function(){function t(){this.options={timeout:5e3,fps:30,position:"top-right",direction:"top",style:{position:"fixed",maxWidth:"304px",width:"100%",zIndex:999999,transition:"0.8s"}}}return t.prototype.render=function(e){var n=e.notification,r=t.stringToHTML(e.template||"");if(r){var o=JSON.parse(JSON.stringify(this.options));Array.isArray(n.options)||(o=c(o,n.options)),r.style.transition=o.style.transition,void 0!==n.options&&void 0!==n.options.position&&(o.position=n.options.position);var i=document.getElementById("flasher-container-"+o.position);if(null===i){switch((i=document.createElement("div")).id="flasher-container-"+o.position,Object.keys(o.style).forEach((function(t){i.style.setProperty(t,o.style[t])})),i.style.maxWidth=o.style.maxWidth,o.position){case"top-left":i.style.top=o.style.top||"0",i.style.left=o.style.left||"0.5em";break;case"top-right":i.style.top=o.style.top||"0",i.style.right=o.style.right||"0.5em";break;case"bottom-left":i.style.bottom=o.style.bottom||"0",i.style.left=o.style.left||"0.5em";break;case"bottom-right":default:i.style.bottom=o.style.bottom||"0",i.style.right=o.style.right||"0.5em"}document.getElementsByTagName("body")[0].appendChild(i)}switch(o.direction){case"top":i.insertBefore(r,i.firstChild);break;case"bottom":default:i.appendChild(r)}r.addEventListener("click",(function(){r.style.transform="scale(1.05)",setTimeout((function(){r.remove()}),200)}));var s=r.querySelector(".flasher-progress");if(s instanceof HTMLElement&&o.timeout>0){var a,u=0,l=1e3/o.fps,f=function(){var t=100*(1-l*((u+=1)/o.timeout));s.style.width=t+"%",t<=0&&(r.style.opacity="0",clearInterval(a),setTimeout((function(){r.remove()}),900))};a=setInterval(f,l),r.addEventListener("mouseover",(function(){clearInterval(a)})),r.addEventListener("mouseout",(function(){a=setInterval(f,l)}))}}},t.prototype.renderOptions=function(t){this.options=c(this.options,t)},t.stringToHTML=function(t){if(function(){if(!DOMParser)return!1;var t=new DOMParser;try{t.parseFromString("x","text/html")}catch(t){return!1}return!0}())return(new DOMParser).parseFromString(t,"text/html").body.firstChild;var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild},t}(),l=function(){function t(){this.factories=new Map}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.render=function(t){var e=this;this.addStyles(t.styles,(function(){e.addScripts(t.scripts,(function(){e.renderOptions(t.options),e.renderEnvelopes(t.envelopes,t.context)}))}))},t.prototype.addStyles=function(t,e){var n=this;if(0!==t.length)if(null===document.querySelector('link[href="'+t[0]+'"]')){var r=document.createElement("link");r.setAttribute("href",t[0]),r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.onload=function(){return n.addStyles(t.slice(1),e)},document.head.appendChild(r)}else this.addStyles(t.slice(1),e);else"function"==typeof e&&e()},t.prototype.addScripts=function(t,e){var n=this;if(0!==t.length)if(null===document.querySelector('script[src="'+t[0]+'"]')){var r=document.createElement("script");r.setAttribute("src",t[0]),r.setAttribute("type","text/javascript"),r.onload=function(){return n.addScripts(t.slice(1),e)},document.body.appendChild(r)}else this.addScripts(t.slice(1),e);else"function"==typeof e&&e()},t.prototype.renderOptions=function(t){var e=this;Object.entries(t).forEach((function(t){var n=t[0],r=t[1],o=e.create(n);void 0!==o&&o.renderOptions(r)}))},t.prototype.renderEnvelopes=function(e,n){var r=this,o=new Map;e.forEach((function(e){e.context=n;var i=r.create(e.handler);void 0!==i&&(t.isQueueable(i)?(o.get(e.handler)||i.resetQueue(),i.addEnvelope(e),o.set(e.handler,i)):i.render(e))})),o.forEach((function(t){t.renderQueue()}))},t.prototype.create=function(t){return 0!==t.indexOf("template.")||this.factories.has(t)||this.addFactory(t,new u),this.factories.get(t)},t.prototype.addFactory=function(t,e){this.factories.set(t,e)},t.isQueueable=function(t){return"function"==typeof t.addEnvelope&&"function"==typeof t.renderQueue},t}();return l.getInstance().addFactory("template",new u),l})); diff --git a/html/js/toastr.min.js b/html/js/toastr.min.js index e78169cb3d..e4a787f22f 100644 --- a/html/js/toastr.min.js +++ b/html/js/toastr.min.js @@ -1 +1 @@ -!function(a){a(["jquery"],function(a){return function(){function b(a,b,c){return o({type:u.error,iconClass:p().iconClasses.error,message:a,optionsOverride:c,title:b})}function c(b,c){return b||(b=p()),r=a("#"+b.containerId),r.length?r:(c&&(r=l(b)),r)}function d(a,b,c){return o({type:u.info,iconClass:p().iconClasses.info,message:a,optionsOverride:c,title:b})}function e(a){s=a}function f(a,b,c){return o({type:u.success,iconClass:p().iconClasses.success,message:a,optionsOverride:c,title:b})}function g(a,b,c){return o({type:u.warning,iconClass:p().iconClasses.warning,message:a,optionsOverride:c,title:b})}function h(a){var b=p();r||c(b),k(a,b)||j(b)}function i(b){var d=p();return r||c(d),b&&0===a(":focus",b).length?void q(b):void(r.children().length&&r.remove())}function j(b){for(var c=r.children(),d=c.length-1;d>=0;d--)k(a(c[d]),b)}function k(b,c){return b&&0===a(":focus",b).length?(b[c.hideMethod]({duration:c.hideDuration,easing:c.hideEasing,complete:function(){q(b)}}),!0):!1}function l(b){return r=a("
").attr("id",b.containerId).addClass(b.positionClass).attr("aria-live","polite").attr("role","alert"),r.appendTo(a(b.target)),r}function m(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:"",newestOnTop:!0}}function n(a){s&&s(a)}function o(b){function d(b){return!a(":focus",j).length||b?j[g.hideMethod]({duration:g.hideDuration,easing:g.hideEasing,complete:function(){q(j),g.onHidden&&"hidden"!==o.state&&g.onHidden(),o.state="hidden",o.endTime=new Date,n(o)}}):void 0}function e(){(g.timeOut>0||g.extendedTimeOut>0)&&(i=setTimeout(d,g.extendedTimeOut))}function f(){clearTimeout(i),j.stop(!0,!0)[g.showMethod]({duration:g.showDuration,easing:g.showEasing})}var g=p(),h=b.iconClass||g.iconClass;"undefined"!=typeof b.optionsOverride&&(g=a.extend(g,b.optionsOverride),h=b.optionsOverride.iconClass||h),t++,r=c(g,!0);var i=null,j=a("
"),k=a("
"),l=a("
"),m=a(g.closeHtml),o={toastId:t,state:"visible",startTime:new Date,options:g,map:b};return b.iconClass&&j.addClass(g.toastClass).addClass(h),b.title&&(k.append(b.title).addClass(g.titleClass),j.append(k)),b.message&&(l.append(b.message).addClass(g.messageClass),j.append(l)),g.closeButton&&(m.addClass("toast-close-button").attr("role","button"),j.prepend(m)),j.hide(),g.newestOnTop?r.prepend(j):r.append(j),j[g.showMethod]({duration:g.showDuration,easing:g.showEasing,complete:g.onShown}),g.timeOut>0&&(i=setTimeout(d,g.timeOut)),j.on("mouseenter",f).on("mouseleave",e),!g.onclick&&g.tapToDismiss&&j.on("click",d),g.closeButton&&m&&m.on("click",function(a){a.stopPropagation?a.stopPropagation():void 0!==a.cancelBubble&&a.cancelBubble!==!0&&(a.cancelBubble=!0),d(!0)}),g.onclick&&j.on("click", function(){g.onclick(),d()}),n(o),g.debug&&console&&console.log(o),j}function p(){return a.extend({},m(),v.options)}function q(a){r||(r=c()),a.is(":visible")||(a.remove(),a=null,0===r.children().length&&r.remove())}var r,s,t=0,u={error:"error",info:"info",success:"success",warning:"warning"},v={clear:h,remove:i,error:b,getContainer:c,info:d,options:{},subscribe:e,success:f,version:"2.0.3",warning:g};return v}()})}("function"==typeof define&&define.amd?define:function(a,b){"undefined"!=typeof module&&module.exports?module.exports=b(require("jquery")):window.toastr=b(window.jQuery)}); +!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return f({type:O.error,iconClass:g().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=g()),v=e("#"+t.containerId),v.length?v:(n&&(v=c(t)),v)}function i(e,t,n){return f({type:O.info,iconClass:g().iconClasses.info,message:e,optionsOverride:n,title:t})}function o(e){w=e}function s(e,t,n){return f({type:O.success,iconClass:g().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return f({type:O.warning,iconClass:g().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e){var t=g();v||n(t),l(e,t)||u(t)}function d(t){var i=g();return v||n(i),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function u(t){for(var n=v.children(),i=n.length-1;i>=0;i--)l(e(n[i]),t)}function l(t,n){return t&&0===e(":focus",t).length?(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0):!1}function c(t){return v=e("
").attr("id",t.containerId).addClass(t.positionClass).attr("aria-live","polite").attr("role","alert"),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:'',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function m(e){w&&w(e)}function f(t){function i(t){return!e(":focus",l).length||t?(clearTimeout(O.intervalId),l[r.hideMethod]({duration:r.hideDuration,easing:r.hideEasing,complete:function(){h(l),r.onHidden&&"hidden"!==b.state&&r.onHidden(),b.state="hidden",b.endTime=new Date,m(b)}})):void 0}function o(){(r.timeOut>0||r.extendedTimeOut>0)&&(u=setTimeout(i,r.extendedTimeOut),O.maxHideTime=parseFloat(r.extendedTimeOut),O.hideEta=(new Date).getTime()+O.maxHideTime)}function s(){clearTimeout(u),O.hideEta=0,l.stop(!0,!0)[r.showMethod]({duration:r.showDuration,easing:r.showEasing})}function a(){var e=(O.hideEta-(new Date).getTime())/O.maxHideTime*100;f.width(e+"%")}var r=g(),d=t.iconClass||r.iconClass;if("undefined"!=typeof t.optionsOverride&&(r=e.extend(r,t.optionsOverride),d=t.optionsOverride.iconClass||d),r.preventDuplicates){if(t.message===C)return;C=t.message}T++,v=n(r,!0);var u=null,l=e("
"),c=e("
"),p=e("
"),f=e("
"),w=e(r.closeHtml),O={intervalId:null,hideEta:null,maxHideTime:null},b={toastId:T,state:"visible",startTime:new Date,options:r,map:t};return t.iconClass&&l.addClass(r.toastClass).addClass(d),t.title&&(c.append(t.title).addClass(r.titleClass),l.append(c)),t.message&&(p.append(t.message).addClass(r.messageClass),l.append(p)),r.closeButton&&(w.addClass("toast-close-button").attr("role","button"),l.prepend(w)),r.progressBar&&(f.addClass("toast-progress"),l.prepend(f)),l.hide(),r.newestOnTop?v.prepend(l):v.append(l),l[r.showMethod]({duration:r.showDuration,easing:r.showEasing,complete:r.onShown}),r.timeOut>0&&(u=setTimeout(i,r.timeOut),O.maxHideTime=parseFloat(r.timeOut),O.hideEta=(new Date).getTime()+O.maxHideTime,r.progressBar&&(O.intervalId=setInterval(a,10))),l.hover(s,o),!r.onclick&&r.tapToDismiss&&l.click(i),r.closeButton&&w&&w.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),i(!0)}),r.onclick&&l.click(function(){r.onclick(),i()}),m(b),r.debug&&console&&console.log(b),l}function g(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),C=void 0))}var v,w,C,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:d,error:t,getContainer:n,info:i,options:{},subscribe:o,success:s,version:"2.1.0",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}); diff --git a/html/mix-manifest.json b/html/mix-manifest.json index ed2b5d592a..e893fa4901 100644 --- a/html/mix-manifest.json +++ b/html/mix-manifest.json @@ -2,7 +2,7 @@ "/js/app.js": "/js/app.js?id=1ecd9b13d60fe23a9729684f4d9dc663", "/js/manifest.js": "/js/manifest.js?id=2eb19d92c19953027907b72ff5963ebb", "/css/vendor.css": "/css/vendor.css?id=d520734ded0ec75b0a572aa8db1c2161", - "/css/app.css": "/css/app.css?id=0d16038c1a9e73edd6ffaa33b3c30683", + "/css/app.css": "/css/app.css?id=38985fa8ef06f355f2934f256b639666", "/js/vendor.js": "/js/vendor.js?id=3b22b85b4e5a64e37dd954c0b147b3f3", "/js/lang/de.js": "/js/lang/de.js?id=9a6f9c23a4b209504cce12ce85315a3c", "/js/lang/en.js": "/js/lang/en.js?id=43cfd926c2a415bdbb2e59676ab29875", diff --git a/includes/helpers.php b/includes/helpers.php index e902b87e17..27fd514d07 100644 --- a/includes/helpers.php +++ b/includes/helpers.php @@ -115,3 +115,19 @@ if (! function_exists('preg_match_any')) { return false; } } + +if (! function_exists('toast')) { + /** + * send a toastr popup or return ToastInterface + */ + function toast(?string $title = null, ?string $message = null, string $level = 'info', ?array $options = null) + { + $toast = app(\App\Http\Interfaces\ToastInterface::class); + + if (! is_null($message)) { + return $toast->message($title, $message, $level, $options); + } + + return $toast; + } +} diff --git a/includes/html/pages/alert-transports.inc.php b/includes/html/pages/alert-transports.inc.php index 84390ccdfc..9134c3de71 100644 --- a/includes/html/pages/alert-transports.inc.php +++ b/includes/html/pages/alert-transports.inc.php @@ -14,9 +14,9 @@ if (Auth::user()->hasGlobalAdmin()) { if (class_exists($class)) { $transport = app($class); if ($transport->handleOauth($request)) { - flash()->addSuccess("$transport_name added successfully."); + toast()->sucess("$transport_name added successfully."); } else { - flash()->addError("$transport_name was not added. Check the log for details."); + toast()->error("$transport_name was not added. Check the log for details."); } } } diff --git a/includes/html/pages/device/edit/device.inc.php b/includes/html/pages/device/edit/device.inc.php index 7e52901ca6..ede72bc137 100644 --- a/includes/html/pages/device/edit/device.inc.php +++ b/includes/html/pages/device/edit/device.inc.php @@ -48,9 +48,9 @@ if (! empty($_POST['editing'])) { if ($device_model->isDirty()) { if ($device_model->save()) { - flash()->addSuccess(__('Device record updated')); + toast()->sucess(__('Device record updated')); } else { - flash()->addError(__('Device record update error')); + toast()->error(__('Device record update error')); } } @@ -58,13 +58,13 @@ if (! empty($_POST['editing'])) { if (Auth::user()->hasGlobalAdmin()) { $result = renamehost($device['device_id'], trim($_POST['hostname']), 'webui'); if ($result == '') { - flash()->addSuccess("Hostname updated from {$device['hostname']} to {$_POST['hostname']}"); + toast()->success("Hostname updated from {$device['hostname']} to {$_POST['hostname']}"); $reload = true; } else { - flash()->addError($result . '. Does your web server have permission to modify the rrd files?'); + toast()->error($result . '. Does your web server have permission to modify the rrd files?'); } } else { - flash()->addError('Only administrative users may update the device hostname'); + toast()->error('Only administrative users may update the device hostname'); } } diff --git a/includes/html/pages/device/edit/snmp.inc.php b/includes/html/pages/device/edit/snmp.inc.php index 9dfecf2a35..2fd6fedfe6 100644 --- a/includes/html/pages/device/edit/snmp.inc.php +++ b/includes/html/pages/device/edit/snmp.inc.php @@ -159,31 +159,27 @@ $max_repeaters = $device->getAttrib('snmp_max_repeaters'); if (isset($update_message)) { if (is_array($update_message)) { foreach ($update_message as $message) { - flash()->addSuccess($message); + toast()->success($message); } } if (is_string($update_message)) { - flash()->addSuccess($update_message); + toast()->success($update_message); } unset($message, $update_message); } -// use flash()->addError to call attention to the problem; don't let it time out +// use flash()->error to call attention to the problem; don't let it time out if (isset($update_failed_message)) { if (is_array($update_failed_message)) { foreach ($update_failed_message as $error) { - flash() - ->option('timeout', 30000) - ->addError($error); + toast()->error($error, options: ['timeOut' => 30000]); } } if (is_string($update_failed_message)) { - flash() - ->option('timeout', 30000) - ->addError($update_failed_message); + toast()->error($update_failed_message, options: ['timeOut' => 30000]); } unset($error, $update_failed_message); diff --git a/resources/css/app.css b/resources/css/app.css index b486d5412b..dedf04498d 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -2,4 +2,4 @@ @tailwind components; @tailwind utilities; -@import 'flasher.css'; +@import 'toast.css'; diff --git a/resources/css/flasher.css b/resources/css/toast.css similarity index 90% rename from resources/css/flasher.css rename to resources/css/toast.css index 785366d74e..7dc233f7ce 100644 --- a/resources/css/flasher.css +++ b/resources/css/toast.css @@ -22,37 +22,47 @@ * @author Tony Murray */ -#flasher-container-top-right { +#toast-container-top-right { position: fixed; z-index: 999999; top: 55px; right: 12px; } -#flasher-container-top-right a { +#toast-container-top-right a { font-weight: bold; } -#flasher-container-top-right > div { +#toast-container-top-right > div { width: 304px; min-height: 50px; background-position: 10px center; background-repeat: no-repeat; } -.flasher-error { +.toast-error { background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bS02IDlhMSAxIDAgMCAxIC43MDcuMjkzTDE2IDE0LjU4Nmw1LjI5My01LjI5M2ExIDEgMCAwIDEgMS40MTQgMCAxIDEgMCAwIDEgMCAxLjQxNEwxNy40MTQgMTZsNS4yOTMgNS4yOTNhMSAxIDAgMCAxIDAgMS40MTQgMSAxIDAgMCAxLTEuNDE0IDBMMTYgMTcuNDE0bC01LjI5MyA1LjI5M2ExIDEgMCAwIDEtMS40MTQgMCAxIDEgMCAwIDEgMC0xLjQxNEwxNC41ODYgMTZsLTUuMjkzLTUuMjkzYTEgMSAwIDAgMSAwLTEuNDE0QTEgMSAwIDAgMSAxMCA5eiIgZmlsbD0iI2RjMjYyNiIvPjwvc3ZnPg=="); background-size: 32px; } -.flasher-info { +.toast-info { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNmM1LjUxMSAwIDEwIDQuNDg5IDEwIDEwcy00LjQ4OSAxMC0xMCAxMFM2IDIxLjUxMSA2IDE2IDEwLjQ4OSA2IDE2IDZ6bTAgMmMtNC40MyAwLTggMy41Ny04IDhzMy41NyA4IDggOCA4LTMuNTcgOC04LTMuNTctOC04LTh6bTAgM2ExIDEgMCAwIDEgMSAxdjRhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi00YTEgMSAwIDAgMSAxLTF6bTAgOGguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiMyNTYzZWIiIC8+PC9zdmc+"); background-size: 32px; } -.flasher-success { +.toast-success { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTcgMTBhMSAxIDAgMCAxIC43MDcuMjkzIDEgMSAwIDAgMSAwIDEuNDE0bC0xMCAxMGExIDEgMCAwIDEtMS40MTQgMGwtNC00YTEgMSAwIDAgMSAwLTEuNDE0IDEgMSAwIDAgMSAxLjQxNCAwTDEzIDE5LjU4Nmw5LjI5My05LjI5M0ExIDEgMCAwIDEgMjMgMTB6IiBmaWxsPSIjMDU5NjY5IiAvPjwvc3ZnPg=="); background-size: 32px; } -.flasher-warning { +.toast-warning { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNi4xNTZjMS4wMTYgMCAyLjAzMi40OSAyLjU5OCAxLjQ2OWw2LjkyNyAxMmMxLjEzMSAxLjk1OC0uMzM2IDQuNS0yLjU5NyA0LjVIOS4wNzJjLTIuMjYxIDAtMy43MjgtMi41NDItMi41OTctNC41bDYuOTI3LTEyYy41NjYtLjk3OSAxLjU4Mi0xLjQ2OSAyLjU5OC0xLjQ2OXptMCAxLjkzOGMtLjMzIDAtLjY2LjE3Ny0uODY1LjUzMWwtNi45MyAxMmMtLjQwOS43MDguMDQ5IDEuNS44NjcgMS41aDEzLjg1NmMuODE4IDAgMS4yNzYtLjc5Mi44NjctMS41bC02LjkzLTEyYy0uMjA0LS4zNTQtLjUzNC0uNTMxLS44NjUtLjUzMXptMCA0LjAzMWExIDEgMCAwIDEgMSAxdjJhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi0yYTEgMSAwIDAgMSAxLTF6bTAgNmguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiNkOTc3MDYiLz48L3N2Zz4="); background-size: 32px; } +.toast-progress { + position: absolute; + left: 0; + bottom: 0; + height: 4px; + background-color: #000000; + opacity: 0.4; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); + filter: alpha(opacity=40); +} diff --git a/resources/views/components/toast.blade.php b/resources/views/components/toast.blade.php new file mode 100644 index 0000000000..6dcc0013da --- /dev/null +++ b/resources/views/components/toast.blade.php @@ -0,0 +1,9 @@ +@if($toasts) + +@endif diff --git a/resources/views/layouts/flasher-notification.blade.php b/resources/views/layouts/flasher-notification.blade.php deleted file mode 100644 index c04a947391..0000000000 --- a/resources/views/layouts/flasher-notification.blade.php +++ /dev/null @@ -1,37 +0,0 @@ -getTitle(); -switch ($envelope->getType()) { - case 'success': - $color = 'tw-text-emerald-600'; - $class = 'flasher-success'; - break; - case 'error': - $color = 'tw-text-red-600'; - $class = 'flasher-error'; - break; - case 'warning': - $color = 'tw-text-amber-600'; - $class = 'flasher-warning'; - break; - case 'info': - default: - $color = 'tw-text-blue-600'; - $class = 'flasher-info'; - break; -} -?> -
-
- @if($title) -
- {{ $title }} -
- @endif -
- {!! clean(stripslashes($envelope->getMessage()), 'notifications') !!} -
-
-
- -
-
diff --git a/resources/views/layouts/librenmsv1.blade.php b/resources/views/layouts/librenmsv1.blade.php index 9975a83c98..a63e68c4d0 100644 --- a/resources/views/layouts/librenmsv1.blade.php +++ b/resources/views/layouts/librenmsv1.blade.php @@ -78,7 +78,6 @@ -