Ghost/ghost/admin/app/templates/components/modal-whats-new.hbs
Kevin Ansfield 5225a3d30a Added "What's new" indicator and modal to highlight recent updates (#1292)
no issue

- adds `whats-new` service that fetches the changelog from ghost.org and exposes the latest changelog entries
- trigger a background fetch of the changelog from ghost.org when first loading the admin when logged in, or after signing in
- adds a "What's new" menu item next to the user popup menu
- adds an indicator to the user menu button and what's new menu item if there are unseen changelog entries
- closing the changelog modal will update the "last seen date", clearing both indicators
2019-08-23 10:01:27 +01:00

32 lines
1.2 KiB
Handlebars

<header class="modal-header gh-wn-header" data-test-modal="whats-new">
<img src="assets/img/whats-new-header-bg.svg" class="background-img" />
<span>{{svg-jar "gift" class="w5 h5 fill-white"}}</span>
<h2>What's new?</h2>
</header>
<button class="close gh-wn-close" href="" title="Close" {{on "click" this.closeModal}}>
{{svg-jar "close"}}
</button>
<div class="modal-body gh-wn-content">
{{#each this.whatsNew.entries as |entry|}}
<div class="gh-wn-entry">
<h4>{{moment-format entry.published_at "DD MMMM YYYY"}}</h4>
<h1 class="f1 fw6 ma0 pa0 mb3">{{entry.title}}</h1>
{{#if entry.feature_image}}
<img class="mb5" src={{entry.feature_image}}>
{{/if}}
{{#if entry.custom_excerpt}}
<p>{{entry.custom_excerpt}}</p>
<a href={{entry.url}} class="dib fw6 mb6" target="_blank" rel="noopener noreferrer">Read the full post →</a>
{{else}}
{{{entry.html}}}
{{/if}}
</div>
{{/each}}
</div>
<div class="modal-footer gh-wn-footer">
<a href={{this.whatsNew.changelogUrl}} target="_blank" rel="noopener noreferrer">
See all past updates
</a>
</div>