Don't open global settings window in iframe

This commit is contained in:
Tamius Han 2025-06-18 01:15:45 +02:00
parent 60dd1193ab
commit 20856891b6
2 changed files with 9 additions and 1 deletions

View File

@ -59,6 +59,13 @@ export class SiteSettings {
* @returns
*/
private getSettingsForSite() {
if (!this.site) {
return {
siteSettings: this.settings.active.sites['@global'],
usesSettingsFor: '@global'
};
}
if (this.settings.active.sites[this.site]) {
return {
siteSettings: this.settings.active.sites[this.site],

View File

@ -23,6 +23,7 @@ class UI {
this.lastProbeResponseTs = null;
this.isGlobal = uiConfig.isGlobal ?? false;
this.isIframe = window.self !== window.top;
this.eventBus = uiConfig.eventBus;
this.disablePointerEvents = false;
@ -241,7 +242,7 @@ class UI {
},
'uw-set-ui-state': {
function: (config, routingData) => {
if (config.globalUiVisible !== undefined) {
if (config.globalUiVisible !== undefined && !this.isIframe) {
if (this.isGlobal) {
this.setUiVisibility(config.globalUiVisible);
} else {