Skip to content

Commit

Permalink
Release 0.1.0-beta.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyzerner committed Nov 5, 2015
1 parent 9bc873b commit e8ab2bc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
19 changes: 18 additions & 1 deletion js/forum/dist/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}]);
Expand Down Expand Up @@ -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'));
Expand Down

0 comments on commit e8ab2bc

Please sign in to comment.