Don't open global settings window in iframe
This commit is contained in:
parent
60dd1193ab
commit
20856891b6
@ -59,6 +59,13 @@ export class SiteSettings {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
private getSettingsForSite() {
|
private getSettingsForSite() {
|
||||||
|
if (!this.site) {
|
||||||
|
return {
|
||||||
|
siteSettings: this.settings.active.sites['@global'],
|
||||||
|
usesSettingsFor: '@global'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (this.settings.active.sites[this.site]) {
|
if (this.settings.active.sites[this.site]) {
|
||||||
return {
|
return {
|
||||||
siteSettings: this.settings.active.sites[this.site],
|
siteSettings: this.settings.active.sites[this.site],
|
||||||
|
@ -23,6 +23,7 @@ class UI {
|
|||||||
this.lastProbeResponseTs = null;
|
this.lastProbeResponseTs = null;
|
||||||
|
|
||||||
this.isGlobal = uiConfig.isGlobal ?? false;
|
this.isGlobal = uiConfig.isGlobal ?? false;
|
||||||
|
this.isIframe = window.self !== window.top;
|
||||||
|
|
||||||
this.eventBus = uiConfig.eventBus;
|
this.eventBus = uiConfig.eventBus;
|
||||||
this.disablePointerEvents = false;
|
this.disablePointerEvents = false;
|
||||||
@ -241,7 +242,7 @@ class UI {
|
|||||||
},
|
},
|
||||||
'uw-set-ui-state': {
|
'uw-set-ui-state': {
|
||||||
function: (config, routingData) => {
|
function: (config, routingData) => {
|
||||||
if (config.globalUiVisible !== undefined) {
|
if (config.globalUiVisible !== undefined && !this.isIframe) {
|
||||||
if (this.isGlobal) {
|
if (this.isGlobal) {
|
||||||
this.setUiVisibility(config.globalUiVisible);
|
this.setUiVisibility(config.globalUiVisible);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user