2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Merge pull request #5197 from PaulAdamDavis/new-upgrade-notifications

Move upgrade notification to /settings/about/
This commit is contained in:
Hannah Wolfe 2015-05-13 16:47:46 +01:00
commit 96a3568c3d
4 changed files with 28 additions and 5 deletions

View file

@ -0,0 +1,12 @@
import Ember from 'ember';
var SettingsAboutController = Ember.Controller.extend({
updateNotificationCount: 0,
actions: {
updateNotificationChange: function (count) {
this.set('updateNotificationCount', count);
}
}
});
export default SettingsAboutController;

View file

@ -215,4 +215,13 @@
// Hide extra space taken up by update notification
.update-available main {
bottom: 56px;
}
.notification-upgrade {
color: $red;
a {
color: $red;
text-decoration: underline;
}
}

View file

@ -11,7 +11,10 @@
</span>
<span class="version blue">v{{model.version}}</span>
</h1>
<p>A free, open, simple publishing platform</p>
{{gh-notifications location="settings-about-upgrade" notify="updateNotificationChange"}}
{{#unless updateNotificationCount}}
<p>A free, open, simple publishing platform</p>
{{/unless}}
<div class="about-environment-help clearfix">
<div class="about-environment">

View file

@ -33,12 +33,11 @@ adminControllers = {
}
var notification = {
type: 'success',
location: 'top',
type: 'upgrade',
location: 'settings-about-upgrade',
dismissible: false,
status: 'persistent',
message: '<a href="https://ghost.org/download">Ghost ' + updateVersion +
'</a> is available! Hot Damn. Please <a href="http://support.ghost.org/how-to-upgrade/" target="_blank">upgrade</a> now'
message: 'Ghost ' + updateVersion + ' is available! Hot Damn. <a href="http://support.ghost.org/how-to-upgrade/" target="_blank">Click here</a> to upgrade.'
};
return api.notifications.browse({context: {internal: true}}).then(function (results) {