1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 08:56:38 +02:00

Simplify global back button

The behaviour is not overly intuitive, and the icon wasn't helping
(hamburger icon usually means "menu"). Now the back button always goes
back to the index, no matter where you are, and there's a tooltip that
says "Back to discussion list".
This commit is contained in:
Toby Zerner
2017-07-22 12:08:09 +09:30
parent 1af83fad99
commit 2516be8b22
3 changed files with 3 additions and 6 deletions

View File

@@ -50,10 +50,10 @@ export default class Navigation extends Component {
const previous = history.getPrevious() || {};
return LinkButton.component({
className: 'Button Navigation-back ' + (previous.title ? '' : 'Button--icon'),
className: 'Button Navigation-back Button--icon',
href: history.backUrl(),
icon: 'chevron-left',
children: previous.title,
title: previous.title,
config: () => {},
onclick: e => {
if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;