mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fix upgrade notification type value (#7308)
refs #7305 * 🎨 display upgrade alerts with the correct "info" style * 💄 update use of notifications status/type/location attrs to reflect current usage
This commit is contained in:
parent
11436317c0
commit
0b6459cb91
4 changed files with 9 additions and 7 deletions
|
@ -46,9 +46,10 @@ notifications = {
|
|||
*
|
||||
* ```
|
||||
* msg = { notifications: [{
|
||||
* type: 'error', // this can be 'error', 'success', 'warn' and 'info'
|
||||
* status: 'alert', // A String. Can be 'alert' or 'notification'
|
||||
* type: 'error', // A String. Can be 'error', 'success', 'warn' or 'info'
|
||||
* message: 'This is an error', // A string. Should fit in one line.
|
||||
* location: 'bottom', // A string where this notification should appear. can be 'bottom' or 'top'
|
||||
* location: '', // A String. Should be unique key to the notification, usually takes the form of "noun.verb.message", eg: "user.invite.already-invited"
|
||||
* dismissible: true // A Boolean. Whether the notification is dismissible or not.
|
||||
* custom: true // A Boolean. Whether the notification is a custom message intended for particular Ghost versions.
|
||||
* }] };
|
||||
|
|
|
@ -40,10 +40,10 @@ adminControllers = {
|
|||
}
|
||||
|
||||
var notification = {
|
||||
type: 'upgrade',
|
||||
location: 'settings-about-upgrade',
|
||||
dismissible: false,
|
||||
status: 'alert',
|
||||
type: 'info',
|
||||
location: 'upgrade.new-version-available',
|
||||
dismissible: false,
|
||||
message: i18n.t('notices.controllers.newVersionAvailable',
|
||||
{version: updateVersion, link: '<a href="http://support.ghost.org/how-to-upgrade/" target="_blank">Click here</a>'})};
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ function createCustomNotification(message) {
|
|||
}
|
||||
|
||||
var notification = {
|
||||
status: 'alert',
|
||||
type: 'info',
|
||||
location: 'top',
|
||||
custom: true,
|
||||
uuid: message.id,
|
||||
dismissible: true,
|
||||
|
|
|
@ -152,8 +152,9 @@ describe('Notifications API', function () {
|
|||
|
||||
it('can destroy a custom notification and add its uuid to seenNotifications (owner)', function (done) {
|
||||
var customNotification = {
|
||||
status: 'alert',
|
||||
type: 'info',
|
||||
location: 'top',
|
||||
location: 'test.to-be-deleted',
|
||||
custom: true,
|
||||
uuid: uuid.v4(),
|
||||
dismissible: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue