1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 10:41:24 +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 262cfb84f0
commit 2f3d9402c9
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';