From e4e0610a414a5bc88247dc3052f598800dfb2b4a Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 25 Jan 2023 15:14:14 -0700 Subject: [PATCH] Et2LinkAppSelect: Use configured app link icon instead of always using navbar --- api/js/etemplate/Et2Link/Et2LinkAppSelect.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts b/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts index 1b0d4130a8..a9c4cacec2 100644 --- a/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts +++ b/api/js/etemplate/Et2Link/Et2LinkAppSelect.ts @@ -105,7 +105,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select) super.connectedCallback(); // Set icon - this.querySelector(":scope > [slot='prefix']").setAttribute("src", this.value + "/navbar"); + this.querySelector(":scope > [slot='prefix']").setAttribute("src", this.egw().link_get_registry(this.value, 'icon') ?? this.value + "/navbar"); if(!this.value) { @@ -176,7 +176,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select) _handleChange(e) { // Set icon - this.querySelector(":scope > [slot='prefix']").setAttribute("src", this.value + "/navbar"); + this.querySelector(":scope > [slot='prefix']").setAttribute("src", this.egw().link_get_registry(this.value, 'icon')); // update preference let appname = ""; @@ -235,7 +235,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select) _iconTemplate(appname) { - let url = appname ? this.egw().image('navbar', appname) : ""; + let url = appname ? this.egw().link_get_registry(appname, 'icon') : ""; return html` `; }