1
0
mirror of https://github.com/flarum/core.git synced 2025-07-21 08:41:17 +02:00

Retain global page components between routes

This commit is contained in:
Toby Zerner
2016-04-08 13:38:16 +09:30
parent 108108d465
commit 2a0bca218a
8 changed files with 94 additions and 8 deletions

View File

@@ -24,6 +24,13 @@ export default class AlertManager extends Component {
);
}
config(isInitialized, context) {
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
}
/**
* Show an Alert in the alerts area.
*

View File

@@ -23,6 +23,9 @@ export default class ModalManager extends Component {
config(isInitialized, context) {
if (isInitialized) return;
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
this.$()