mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 22:59:57 +08: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user