Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
9f81151475
commit
a1edb88b94
3 changed files with 11 additions and 10 deletions
|
@ -25,6 +25,7 @@ Additional information can be found in our Developer Guide:
|
|||
|
||||
import "core-js/stable";
|
||||
import "regenerator-runtime/runtime";
|
||||
import "common/navigation";
|
||||
import Api from "common/api";
|
||||
import Notify from "common/notify";
|
||||
import Scrollbar from "common/scrollbar";
|
||||
|
@ -112,16 +113,6 @@ Vue.use(VueFullscreen);
|
|||
Vue.use(VueFilters);
|
||||
Vue.use(Components);
|
||||
Vue.use(Dialogs);
|
||||
|
||||
window.backwardsNavigationDetected = false;
|
||||
window.addEventListener("popstate", () => {
|
||||
window.backwardsNavigationDetected = true;
|
||||
// give components time to react to backwardsNavigationDetected in `created` or '$route'-watcher
|
||||
setTimeout(() => {
|
||||
window.backwardsNavigationDetected = false;
|
||||
});
|
||||
});
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
// Configure client-side routing
|
||||
|
|
9
frontend/src/common/navigation.js
Normal file
9
frontend/src/common/navigation.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
window.backwardsNavigationDetected = false;
|
||||
|
||||
window.addEventListener("popstate", () => {
|
||||
window.backwardsNavigationDetected = true;
|
||||
// give components time to react to backwardsNavigationDetected in `created` or '$route'-watcher
|
||||
setTimeout(() => {
|
||||
window.backwardsNavigationDetected = false;
|
||||
});
|
||||
});
|
|
@ -25,6 +25,7 @@ Additional information can be found in our Developer Guide:
|
|||
|
||||
import "core-js/stable";
|
||||
import "regenerator-runtime/runtime";
|
||||
import "common/navigation";
|
||||
import Api from "common/api";
|
||||
import Notify from "common/notify";
|
||||
import Scrollbar from "common/scrollbar";
|
||||
|
|
Loading…
Reference in a new issue