mirror of
https://github.com/flarum/framework.git
synced 2025-02-08 02:03:59 +08:00
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:
parent
25932cf7c4
commit
96b85f1330
|
@ -31,6 +31,7 @@ export default function boot(app) {
|
||||||
app.alerts = m.mount(document.getElementById('alerts'), AlertManager.component());
|
app.alerts = m.mount(document.getElementById('alerts'), AlertManager.component());
|
||||||
app.history = {
|
app.history = {
|
||||||
canGoBack: () => true,
|
canGoBack: () => true,
|
||||||
|
getPrevious: () => {},
|
||||||
backUrl: () => app.forum.attribute('baseUrl'),
|
backUrl: () => app.forum.attribute('baseUrl'),
|
||||||
back: function() {
|
back: function() {
|
||||||
window.location = this.backUrl();
|
window.location = this.backUrl();
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { extend } from 'flarum/extend';
|
||||||
import Page from 'flarum/components/Page';
|
import Page from 'flarum/components/Page';
|
||||||
import ItemList from 'flarum/utils/ItemList';
|
import ItemList from 'flarum/utils/ItemList';
|
||||||
import listItems from 'flarum/helpers/listItems';
|
import listItems from 'flarum/helpers/listItems';
|
||||||
|
import icon from 'flarum/helpers/icon';
|
||||||
import DiscussionList from 'flarum/components/DiscussionList';
|
import DiscussionList from 'flarum/components/DiscussionList';
|
||||||
import WelcomeHero from 'flarum/components/WelcomeHero';
|
import WelcomeHero from 'flarum/components/WelcomeHero';
|
||||||
import DiscussionComposer from 'flarum/components/DiscussionComposer';
|
import DiscussionComposer from 'flarum/components/DiscussionComposer';
|
||||||
|
@ -54,7 +55,7 @@ export default class IndexPage extends Page {
|
||||||
app.cache.discussionList = new DiscussionList({params});
|
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';
|
this.bodyClass = 'App--index';
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,6 @@
|
||||||
@media @tablet-up {
|
@media @tablet-up {
|
||||||
.DiscussionPage-list {
|
.DiscussionPage-list {
|
||||||
left: -@pane-width - 6px;
|
left: -@pane-width - 6px;
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: @zindex-pane;
|
z-index: @zindex-pane;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
padding-left: 8px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.Navigation-pin {
|
.Navigation-pin {
|
||||||
|
display: none;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
margin-left: -5px !important;
|
margin-left: -5px !important;
|
||||||
border-radius: 0 @border-radius @border-radius 0;
|
border-radius: 0 @border-radius @border-radius 0;
|
||||||
|
@ -18,6 +24,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media @desktop-hd {
|
@media @desktop-hd {
|
||||||
|
.Navigation-pin {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
.hasPane.panePinned, .hasPane.paneShowing {
|
.hasPane.panePinned, .hasPane.paneShowing {
|
||||||
.Navigation-back {
|
.Navigation-back {
|
||||||
border-radius: @border-radius 0 0 @border-radius !important;
|
border-radius: @border-radius 0 0 @border-radius !important;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user