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

Make the back button a functional link

This commit is contained in:
Toby Zerner
2015-08-02 17:26:57 +09:30
parent 025d8f691d
commit 8f4ef28475
3 changed files with 25 additions and 4 deletions

View File

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