From f75e6e85b2b2d207f59be06034e495adfd37bcfd Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Wed, 11 Oct 2023 17:56:40 +0200 Subject: [PATCH] Redraw background when language is changed --- public/scripts/ui.js | 7 +++---- public_included_ws_fallback/scripts/ui.js | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/public/scripts/ui.js b/public/scripts/ui.js index b1b4ad1..04eb460 100644 --- a/public/scripts/ui.js +++ b/public/scripts/ui.js @@ -608,9 +608,9 @@ class Dialog { this.$el = $(id); this.$el.querySelectorAll('[close]').forEach(el => el.addEventListener('click', _ => this.hide())); this.$autoFocus = this.$el.querySelector('[autofocus]'); - Events.on('peer-disconnected', e => this._onPeerDisconnected(e.detail)); - this.$discoveryWrapper = $$('footer .discovery-wrapper'); + + Events.on('peer-disconnected', e => this._onPeerDisconnected(e.detail)); } show() { @@ -2751,6 +2751,7 @@ Events.on('load', () => { c.style.opacity = "1"; } + Events.on('translation-loaded', _ => init()); Events.on('bg-resize', _ => init()); window.onresize = _ => Events.fire('bg-resize'); @@ -2769,8 +2770,6 @@ Events.on('load', () => { drawCircle(ctx, dw * i + frame + 33); } } - - setTimeout(_ => init(), 300); }); document.changeFavicon = function (src) { diff --git a/public_included_ws_fallback/scripts/ui.js b/public_included_ws_fallback/scripts/ui.js index 95ee14c..6e94fe7 100644 --- a/public_included_ws_fallback/scripts/ui.js +++ b/public_included_ws_fallback/scripts/ui.js @@ -610,9 +610,9 @@ class Dialog { this.$el = $(id); this.$el.querySelectorAll('[close]').forEach(el => el.addEventListener('click', _ => this.hide())); this.$autoFocus = this.$el.querySelector('[autofocus]'); - Events.on('peer-disconnected', e => this._onPeerDisconnected(e.detail)); - this.$discoveryWrapper = $$('footer .discovery-wrapper'); + + Events.on('peer-disconnected', e => this._onPeerDisconnected(e.detail)); } show() { @@ -2752,6 +2752,7 @@ Events.on('load', () => { c.style.opacity = "1"; } + Events.on('translation-loaded', _ => init()); Events.on('bg-resize', _ => init()); window.onresize = _ => Events.fire('bg-resize'); @@ -2770,8 +2771,6 @@ Events.on('load', () => { drawCircle(ctx, dw * i + frame + 33); } } - - setTimeout(_ => init(), 300); }); document.changeFavicon = function (src) {