[ui] Fix: New toast notifications no longer last forever (#16384)

* Removes an errant console.log and corrects a default sticky=true on toast notifications

* Default so no need to refault
This commit is contained in:
Phil Renaud 2023-03-08 14:50:18 -05:00 committed by GitHub
parent 35c17b2e56
commit b0124ee683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -74,7 +74,7 @@ export default class PoliciesPolicyController extends Controller {
});
yield newToken.save();
yield this.refreshTokens();
const thing = this.notifications.add({
this.notifications.add({
title: 'Example Token Created',
message: `${newToken.secret}`,
color: 'success',
@ -86,7 +86,6 @@ export default class PoliciesPolicyController extends Controller {
},
},
});
console.log('thing', thing);
} catch (err) {
this.error = {
title: 'Error creating new token',

View File

@ -28,10 +28,6 @@ export default class NotificationsService extends FlashService {
notificationObject.type = notificationObject.color || 'neutral';
}
if (!('sticky' in notificationObject)) {
notificationObject.sticky = true;
}
if (!('destroyOnClick' in notificationObject)) {
notificationObject.destroyOnClick = false;
}