Launcher: open help modal when clicking on app icon without url
Change-Id: Iaa4ccbc60652fd2046173244a80c3f98ba49019c
diff --git a/core/installer/welcome/static/launcher.js b/core/installer/welcome/static/launcher.js
index 4f42100..bcc16e0 100644
--- a/core/installer/welcome/static/launcher.js
+++ b/core/installer/welcome/static/launcher.js
@@ -24,6 +24,14 @@
icon.addEventListener("click", function (event) {
event.stopPropagation();
const appUrl = this.getAttribute("data-app-url");
+ if (!appUrl) {
+ const button = this.querySelector('.help-button');
+ const buttonId = button.getAttribute('id');
+ const modalId = 'modal-' + buttonId.substring("help-button-".length);
+ const modal = document.getElementById(modalId);
+ openModal(modal);
+ return;
+ }
document.getElementById('appFrame').src = 'about:blank';
document.getElementById('appFrame').src = appUrl;
document.querySelectorAll(".app-icon-tooltip .background-glow").forEach((e) => e.remove());