Ghost/ghost/admin/app/models/notification.js
Kevin Ansfield 2a1584af16 🐛 fix duplicate server alerts + default alert bg color (#242)
closes https://github.com/TryGhost/Ghost/issues/7305

The `location` property of server-side notifications was being ignored by the client and so wasn't being used to de-duplicate alerts.

- adds `key` attribute to `Notification` model
- adds a serializer for notifications that renames the `location` key sent by the server to `key`
- set the default background color of alerts to white so that alerts with no `type` set do not inherit the background color (useful in Ghost Desktop which has a transparent background color set)
2016-09-01 11:01:54 -05:00

11 lines
250 B
JavaScript

import Model from 'ember-data/model';
import attr from 'ember-data/attr';
export default Model.extend({
dismissible: attr('boolean'),
status: attr('string'),
type: attr('string'),
message: attr('string'),
key: attr('string')
});