Always use avatar for user image in Et2SelectAccount tag

This commit is contained in:
nathan 2022-06-14 17:29:58 -06:00
parent 67b9102a69
commit e109b1d85b

View File

@ -9,6 +9,7 @@
import {Et2Select} from "./Et2Select";
import {SelectOption} from "./FindSelectOptions";
import {html} from "@lion/core";
export type AccountType = 'accounts'|'groups'|'both'|'owngroups';
@ -80,6 +81,21 @@ export class Et2SelectAccount extends Et2Select
{
super.select_options = new_options;
}
/**
* Override the prefix image for tags (multiple=true)
* The default is probably fine, but we're being explicit here.
* @param item
* @returns {TemplateResult<1>}
* @protected
*
*/
protected _tagImageTemplate(item)
{
return html`
<et2-image slot="prefix" part="icon"
src="/egroupware/api/avatar.php?account_id=${item.value}&etag=1"></et2-image>`;
}
}
customElements.define("et2-select-account", Et2SelectAccount);