1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 02:31:17 +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

@@ -85,6 +85,17 @@ export default class History {
m.route(this.getTop().url);
}
/**
* Get the URL of the previous page.
*
* @public
*/
backUrl() {
const secondTop = this.stack[this.stack.length - 2];
return secondTop.url;
}
/**
* Go to the first route in the history stack.
*