mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 12:33:22 +08:00
Default force
attr to true
on LinkButton
This retains beta 13 behavior.
This commit is contained in:
parent
2e1331b1fe
commit
b393b57160
|
@ -12,12 +12,14 @@ import Link from './Link';
|
|||
* active.
|
||||
* - `href` The URL to link to. If the current URL `m.route()` matches this,
|
||||
* the `active` prop will automatically be set to true.
|
||||
* - `force` Whether the page should be fully rerendered. Defaults to `true`.
|
||||
*/
|
||||
export default class LinkButton extends Button {
|
||||
static initAttrs(attrs) {
|
||||
super.initAttrs(attrs);
|
||||
|
||||
attrs.active = this.isActive(attrs);
|
||||
if (attrs.force === undefined) attrs.force = true;
|
||||
}
|
||||
|
||||
view(vnode) {
|
||||
|
|
|
@ -135,7 +135,7 @@ export default class UserPage extends Page {
|
|||
|
||||
items.add(
|
||||
'posts',
|
||||
<LinkButton href={app.route('user.posts', { username: user.username() })} force icon="far fa-comment">
|
||||
<LinkButton href={app.route('user.posts', { username: user.username() })} icon="far fa-comment">
|
||||
{app.translator.trans('core.forum.user.posts_link')} <span className="Button-badge">{user.commentCount()}</span>
|
||||
</LinkButton>,
|
||||
100
|
||||
|
@ -143,7 +143,7 @@ export default class UserPage extends Page {
|
|||
|
||||
items.add(
|
||||
'discussions',
|
||||
<LinkButton href={app.route('user.discussions', { username: user.username() })} force icon="fas fa-bars">
|
||||
<LinkButton href={app.route('user.discussions', { username: user.username() })} icon="fas fa-bars">
|
||||
{app.translator.trans('core.forum.user.discussions_link')} <span className="Button-badge">{user.discussionCount()}</span>
|
||||
</LinkButton>,
|
||||
90
|
||||
|
|
Loading…
Reference in New Issue
Block a user