Add discussion list refresh button

Closes flarum/core#139. Haven’t done pull to refresh yet though, but
that can come later.
This commit is contained in:
Toby Zerner 2015-07-07 15:32:08 +09:30
parent d64e8746da
commit 85cd2663e3
2 changed files with 25 additions and 6 deletions

View File

@ -163,6 +163,15 @@ export default class IndexPage extends Component {
}) })
); );
items.add('refresh',
ActionButton.component({
title: 'Refresh',
icon: 'refresh',
className: 'btn btn-default btn-icon',
onclick: () => app.cache.discussionList.refresh()
})
);
return items; return items;
} }

View File

@ -16,17 +16,27 @@
.index-toolbar { .index-toolbar {
margin-bottom: 15px; margin-bottom: 15px;
} }
.index-toolbar-view { .index-toolbar-view, .index-toolbar-action {
&:extend(.list-inline);
display: inline-block; display: inline-block;
margin: 0; margin: 0;
list-style: none;
padding: 0;
& > li {
display: inline-block;
}
}
.index-toolbar-view {
& > li {
margin-right: 5px;
}
} }
.index-toolbar-action { .index-toolbar-action {
&:extend(.list-inline);
float: right; float: right;
margin: 0;
& > li {
margin-left: 5px;
}
} }
@media @phone, @tablet { @media @phone, @tablet {