mirror of
https://github.com/flarum/core.git
synced 2025-08-11 19:04:29 +02:00
infrastructure: Add routes, history, search to ForumApplication
This commit is contained in:
committed by
Franz Liedke
parent
9ac8f1543a
commit
3b6e5a0caf
@@ -71,7 +71,7 @@ export default class ForumApplication extends Application {
|
|||||||
*
|
*
|
||||||
* @type {GlobalSearchState}
|
* @type {GlobalSearchState}
|
||||||
*/
|
*/
|
||||||
// search = new GlobalSearchState();
|
search = new GlobalSearchState();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An object which controls the state of the composer.
|
* An object which controls the state of the composer.
|
||||||
@@ -105,16 +105,15 @@ export default class ForumApplication extends Application {
|
|||||||
// Push the homepage as the first route, so that the user will always be
|
// Push the homepage as the first route, so that the user will always be
|
||||||
// able to click on the 'back' button to go home, regardless of which page
|
// able to click on the 'back' button to go home, regardless of which page
|
||||||
// they started on.
|
// they started on.
|
||||||
// TODO routes
|
const defaultRoute = this.forum.attribute('defaultRoute');
|
||||||
// const defaultRoute = this.forum.attribute('defaultRoute');
|
let defaultAction = 'index';
|
||||||
// let defaultAction = 'index';
|
|
||||||
|
|
||||||
// for (const i in this.routes) {
|
for (const i in this.routes) {
|
||||||
// if (this.routes[i].path === defaultRoute) defaultAction = i;
|
if (this.routes[i].path === defaultRoute) defaultAction = i;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// this.routes[defaultAction].path = '/';
|
this.routes[defaultAction].path = '/';
|
||||||
// this.history.push(defaultAction, this.translator.trans('core.forum.header.back_to_index_tooltip'), '/');
|
this.history.push(defaultAction, this.translator.trans('core.forum.header.back_to_index_tooltip'), '/');
|
||||||
|
|
||||||
// m.mount(document.getElementById('app-navigation'), Navigation.component({ className: 'App-backControl', drawer: true }));
|
// m.mount(document.getElementById('app-navigation'), Navigation.component({ className: 'App-backControl', drawer: true }));
|
||||||
// m.mount(document.getElementById('header-navigation'), Navigation.component());
|
// m.mount(document.getElementById('header-navigation'), Navigation.component());
|
||||||
|
Reference in New Issue
Block a user