mirror of
https://github.com/flarum/framework.git
synced 2025-06-19 16:51:23 +08:00
Fix regression in admin routing in subdirectory. fixes #1606
Because admin routing uses the "hash" strategy, the base path does not need to be taken into account.
This commit is contained in:
@ -150,13 +150,12 @@ export default class Application {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
mount() {
|
mount(basePath = '') {
|
||||||
this.modal = m.mount(document.getElementById('modal'), <ModalManager/>);
|
this.modal = m.mount(document.getElementById('modal'), <ModalManager/>);
|
||||||
this.alerts = m.mount(document.getElementById('alerts'), <AlertManager/>);
|
this.alerts = m.mount(document.getElementById('alerts'), <AlertManager/>);
|
||||||
|
|
||||||
this.drawer = new Drawer();
|
this.drawer = new Drawer();
|
||||||
|
|
||||||
const basePath = this.forum.attribute('basePath');
|
|
||||||
m.route(
|
m.route(
|
||||||
document.getElementById('content'),
|
document.getElementById('content'),
|
||||||
basePath + '/',
|
basePath + '/',
|
||||||
|
@ -96,7 +96,7 @@ export default class ForumApplication extends Application {
|
|||||||
this.composer = m.mount(document.getElementById('composer'), Composer.component());
|
this.composer = m.mount(document.getElementById('composer'), Composer.component());
|
||||||
|
|
||||||
m.route.mode = 'pathname';
|
m.route.mode = 'pathname';
|
||||||
super.mount();
|
super.mount(this.forum.attribute('basePath'));
|
||||||
|
|
||||||
alertEmailConfirmation(this);
|
alertEmailConfirmation(this);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user