Use icon instead of "Discussions" text, fix bugs

- Fix admin page crash
- Only show invisible pin button on desktop; hide it completely on ≤ tablet
This commit is contained in:
Toby Zerner
2015-11-03 15:53:38 +10:30
parent 25932cf7c4
commit 96b85f1330
4 changed files with 12 additions and 2 deletions

View File

@ -31,6 +31,7 @@ export default function boot(app) {
app.alerts = m.mount(document.getElementById('alerts'), AlertManager.component());
app.history = {
canGoBack: () => true,
getPrevious: () => {},
backUrl: () => app.forum.attribute('baseUrl'),
back: function() {
window.location = this.backUrl();

View File

@ -2,6 +2,7 @@ import { extend } from 'flarum/extend';
import Page from 'flarum/components/Page';
import ItemList from 'flarum/utils/ItemList';
import listItems from 'flarum/helpers/listItems';
import icon from 'flarum/helpers/icon';
import DiscussionList from 'flarum/components/DiscussionList';
import WelcomeHero from 'flarum/components/WelcomeHero';
import DiscussionComposer from 'flarum/components/DiscussionComposer';
@ -54,7 +55,7 @@ export default class IndexPage extends Page {
app.cache.discussionList = new DiscussionList({params});
}
app.history.push('index', app.translator.trans('core.forum.header.discussions_button'));
app.history.push('index', icon('bars'));
this.bodyClass = 'App--index';
}