mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Move upgrade notification to /settings/about/
Refs #5071 - Move the Upgrade notification from the top of the screen to the About page
This commit is contained in:
parent
18638d378e
commit
272f1eddaf
4 changed files with 28 additions and 5 deletions
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
|
// Hide extra space taken up by update notification
|
||||||
.update-available main {
|
.update-available main {
|
||||||
bottom: 56px;
|
bottom: 56px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-upgrade {
|
||||||
|
color: $red;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $red;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -11,7 +11,10 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="version blue">v{{model.version}}</span>
|
<span class="version blue">v{{model.version}}</span>
|
||||||
</h1>
|
</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-help clearfix">
|
||||||
<div class="about-environment">
|
<div class="about-environment">
|
||||||
|
|
|
@ -33,12 +33,11 @@ adminControllers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
var notification = {
|
var notification = {
|
||||||
type: 'success',
|
type: 'upgrade',
|
||||||
location: 'top',
|
location: 'settings-about-upgrade',
|
||||||
dismissible: false,
|
dismissible: false,
|
||||||
status: 'persistent',
|
status: 'persistent',
|
||||||
message: '<a href="https://ghost.org/download">Ghost ' + updateVersion +
|
message: 'Ghost ' + updateVersion + ' is available! Hot Damn. <a href="http://support.ghost.org/how-to-upgrade/" target="_blank">Click here</a> to upgrade.'
|
||||||
'</a> is available! Hot Damn. Please <a href="http://support.ghost.org/how-to-upgrade/" target="_blank">upgrade</a> now'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return api.notifications.browse({context: {internal: true}}).then(function (results) {
|
return api.notifications.browse({context: {internal: true}}).then(function (results) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue