Restore masthead redirect without window manager

This commit is contained in:
guerler
2022-09-21 21:28:46 -04:00
parent 635eedafe9
commit 03a2b95b29
2 changed files with 9 additions and 6 deletions
+7 -1
View File
@@ -45,6 +45,7 @@ import { getAppRoot } from "onload";
import { HistoryPanelProxy } from "components/History/adapters/HistoryPanelProxy";
import { fetchMenu } from "entry/analysis/menu";
import { WindowManager } from "layout/window-manager";
import { safePath } from "utils/redirect";
export default {
components: {
@@ -97,7 +98,12 @@ export default {
if (!urlObj.target) {
this.$router.push(urlObj.url);
} else {
this.windowManager.add(urlObj);
const url = safePath(urlObj.url);
if (urlObj.target == "_blank") {
window.open(url);
} else {
window.location = url;
}
}
},
},
+2 -5
View File
@@ -73,11 +73,8 @@ VueRouter.prototype.push = function push(location, windowManagerTitle = null) {
// show location in window manager
const Galaxy = getGalaxyInstance();
if (windowManagerTitle && Galaxy.frame && Galaxy.frame.active) {
Galaxy.frame.add({
title: "Data",
url: location,
});
return true;
Galaxy.frame.add({ title: windowManagerTitle, url: location });
return;
}
// always emit event when a route is pushed
this.app.$emit("router-push");