Update "update banner" for 5.0
no refs. - "Update banner" needed to be improved to drive more traffic
This commit is contained in:
parent
e8548af861
commit
02851a671d
|
@ -16,6 +16,7 @@ export default class ApplicationController extends Controller {
|
||||||
@service router;
|
@service router;
|
||||||
@service session;
|
@service session;
|
||||||
@service settings;
|
@service settings;
|
||||||
|
@service store;
|
||||||
@service ui;
|
@service ui;
|
||||||
|
|
||||||
@reads('config.hostSettings.update.enabled')
|
@reads('config.hostSettings.update.enabled')
|
||||||
|
@ -47,6 +48,20 @@ export default class ApplicationController extends Controller {
|
||||||
&& !router.currentRouteName.match(/(signin|signup|setup|reset)/);
|
&& !router.currentRouteName.match(/(signin|signup|setup|reset)/);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get ownerUserNameOrEmail() {
|
||||||
|
let user = this.store.peekAll('user').findBy('isOwnerOnly', true);
|
||||||
|
|
||||||
|
if (user) {
|
||||||
|
if (user.name) {
|
||||||
|
return user.name;
|
||||||
|
} else if (user.email) {
|
||||||
|
return user.email;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
openUpdateTab() {
|
openUpdateTab() {
|
||||||
const updateWindow = window.open('', '_blank');
|
const updateWindow = window.open('', '_blank');
|
||||||
|
|
|
@ -2078,7 +2078,7 @@ section.gh-ds h2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: #15171A;
|
background: linear-gradient(90deg, var(--purple) 0%, var(--pink) 100%);;
|
||||||
color: rgba(255, 255, 255, 0.95);
|
color: rgba(255, 255, 255, 0.95);
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,24 @@
|
||||||
<GhApp>
|
<GhApp>
|
||||||
<GhSkipLink @anchor=".gh-main">Skip to main content</GhSkipLink>
|
<GhSkipLink @anchor=".gh-main">Skip to main content</GhSkipLink>
|
||||||
|
|
||||||
{{#if (and this.session.user.isOwnerOnly this.showUpdateLink)}}
|
{{#if (and this.session.user.isAdmin this.showUpdateLink)}}
|
||||||
<aside class="gh-update-banner">
|
<aside class="gh-update-banner">
|
||||||
<div class="gh-alert-content">
|
{{#if this.session.user.isOwnerOnly}}
|
||||||
Your site is ready for a major update!
|
<div class="gh-alert-content">
|
||||||
</div>
|
You're missing out on new features, update by January 31st.
|
||||||
<a href="#" {{on "click" this.openUpdateTab}}>Update to Ghost 5.0 →</a>
|
</div>
|
||||||
|
<a href="#" {{on "click" this.openUpdateTab}}>Update to Ghost 5.0 →</a>
|
||||||
|
{{else}}
|
||||||
|
<div class="gh-alert-content">
|
||||||
|
Your Ghost install is ready for a major update!
|
||||||
|
{{#if this.ownerUserNameOrEmail}}
|
||||||
|
{{this.ownerUserNameOrEmail}}
|
||||||
|
{{else}}
|
||||||
|
Your Site Owner
|
||||||
|
{{/if}}
|
||||||
|
will need to log in to do this.
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</aside>
|
</aside>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -65,4 +77,4 @@
|
||||||
<div id="unsplash-selector-wormhole"></div>
|
<div id="unsplash-selector-wormhole"></div>
|
||||||
|
|
||||||
<EpmModalContainer />
|
<EpmModalContainer />
|
||||||
<EmberLoadRemover />
|
<EmberLoadRemover />
|
||||||
|
|
Loading…
Reference in New Issue