Release 0.1.0-beta.4

This commit is contained in:
Toby Zerner 2015-11-05 16:42:25 +10:30
parent 5041428b8c
commit eefdb40f08
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,12 @@
# Change Log
All notable changes to the Embed extension will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [0.1.0-beta.4] - 2015-11-05
### Added
- Make the toolbar fixed to the top, add a comment count
### Fixed
- Fix incorrect post permalinks
[0.1.0-beta.4]: https://github.com/flarum/embed/compare/v0.1.0-beta.3...v0.1.0-beta.4

View File

@ -73,6 +73,23 @@ System.register('flarum/embed/components/DiscussionPage', ['flarum/components/Di
items.remove('scrubber');
var count = this.discussion.repliesCount();
items.add('replies', m(
'h3',
null,
m(
'a',
{ href: app.route.discussion(this.discussion).replace('/embed', '/d'), config: m.route },
count,
' comment',
count == 1 ? '' : 's'
)
), 100);
var props = items.get('controls').props;
props.className = props.className.replace('App-primaryControl', '');
return items;
}
}]);
@ -129,7 +146,7 @@ System.register('flarum/embed/main', ['flarum/extend', 'flarum/app', 'flarum/com
// Trim the /embed prefix off of post permalinks
override(PostMeta.prototype, 'getPermalink', function (original, post) {
return original(post).replace('/embed', '');
return original(post).replace('/embed', '/d');
});
app.pane = new Pane(document.getElementById('app'));