mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Restore masthead redirect without window manager
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user