Merge branch 'master' into imjoy-support

This commit is contained in:
Richard 2021-05-29 12:10:01 +01:00
commit dac1c9a748
21 changed files with 994 additions and 2122 deletions

View file

@ -61,12 +61,25 @@ const moduleImjoy = {
getters: {}
};
function getOriginFromLocation() {
// This will default to the same origin that's serving
// the web app - but can be overridden by the URL.
// See also devTools.vue which can change the origin.
let url = new URL(window.location.href);
let origin = url.searchParams.get("overrideOrigin");
if (origin) {
return origin;
} else {
return url.origin;
}
}
export default new Vuex.Store({
modules: {
imjoy: moduleImjoy
},
state: {
origin: window.location.origin,
origin: getOriginFromLocation(),
available: false,
waiting: false,
error: "",