mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
Merge pull request #5197 from PaulAdamDavis/new-upgrade-notifications
Move upgrade notification to /settings/about/
This commit is contained in:
commit
96a3568c3d
12
core/client/app/controllers/settings/about.js
Normal file
12
core/client/app/controllers/settings/about.js
Normal 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;
|
@ -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;
|
||||
}
|
||||
}
|
@ -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">
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user