Simplified API for notifications based on promises ui-notification-ergonomics
authorAlexander Ebert <ebert@woltlab.com>
Wed, 4 May 2022 14:52:06 +0000 (16:52 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 4 May 2022 14:52:06 +0000 (16:52 +0200)
commit5374460b1d21a8e404a62fda76a7018c0d08d200
tree4fc4ecbf2646ea6104dfcea8c1a1d41d399aebd2
parent52c215bbcee5a6026094327b21785112de20dca4
Simplified API for notifications based on promises

The old API permitted arbitrary CSS class name that aren't guaranteed to work. Typical usage includes the default class names only therefore we can clamp the value to those.

Using promises cleans up the code flow when a “callback” is used.
ts/WoltLabSuite/Core/Ui/Notification.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Notification.js