mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Et2LinkAppSelect: Use configured app link icon instead of always using navbar
This commit is contained in:
parent
62bc77a4d2
commit
e4e0610a41
@ -105,7 +105,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select)
|
|||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
|
|
||||||
// Set icon
|
// 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)
|
if(!this.value)
|
||||||
{
|
{
|
||||||
@ -176,7 +176,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select)
|
|||||||
_handleChange(e)
|
_handleChange(e)
|
||||||
{
|
{
|
||||||
// Set icon
|
// 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
|
// update preference
|
||||||
let appname = "";
|
let appname = "";
|
||||||
@ -235,7 +235,7 @@ export class Et2LinkAppSelect extends SlotMixin(Et2Select)
|
|||||||
|
|
||||||
_iconTemplate(appname)
|
_iconTemplate(appname)
|
||||||
{
|
{
|
||||||
let url = appname ? this.egw().image('navbar', appname) : "";
|
let url = appname ? this.egw().link_get_registry(appname, 'icon') : "";
|
||||||
return html`
|
return html`
|
||||||
<et2-image style="width: var(--icon-width)" slot="prefix" src="${url}"></et2-image>`;
|
<et2-image style="width: var(--icon-width)" slot="prefix" src="${url}"></et2-image>`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user