Use converse-icon instead of webfonts in heading dropdown

This commit is contained in:
JC Brand 2021-07-27 11:02:51 +02:00
parent c961615609
commit 10c610232c
2 changed files with 7 additions and 6 deletions

View File

@ -12,9 +12,10 @@ export function clearHistory (jid) {
export async function getHeadingDropdownItem (promise_or_data) { export async function getHeadingDropdownItem (promise_or_data) {
const data = await promise_or_data; const data = await promise_or_data;
return html` return html`
<a href="#" class="dropdown-item ${data.a_class}" @click=${data.handler} title="${data.i18n_title}" <a href="#" class="dropdown-item ${data.a_class}" @click=${data.handler} title="${data.i18n_title}">
><i class="fa ${data.icon_class}"></i>${data.i18n_text}</a <converse-icon size="1em" color="var(--text-color-lighten-15-percent)" class="fa ${data.icon_class}"></converse-icon>
> ${data.i18n_text}
</a>
`; `;
} }

View File

@ -486,9 +486,9 @@ describe("Groupchats", function () {
expect(u.isVisible(topic_el)).toBe(true); expect(u.isVisible(topic_el)).toBe(true);
const toggle = view.querySelector('.hide-topic'); const toggle = view.querySelector('.hide-topic');
expect(toggle.textContent).toBe('Hide topic'); expect(toggle.textContent.trim()).toBe('Hide topic');
toggle.click(); toggle.click();
await u.waitUntil(() => view.querySelector('.hide-topic').textContent === 'Show topic'); await u.waitUntil(() => view.querySelector('.hide-topic').textContent.trim() === 'Show topic');
})); }));
it("will always be shown when it's new", mock.initConverse([], {}, async function (_converse) { it("will always be shown when it's new", mock.initConverse([], {}, async function (_converse) {
@ -510,7 +510,7 @@ describe("Groupchats", function () {
expect(u.isVisible(topic_el)).toBe(true); expect(u.isVisible(topic_el)).toBe(true);
const toggle = view.querySelector('.hide-topic'); const toggle = view.querySelector('.hide-topic');
expect(toggle.textContent).toBe('Hide topic'); expect(toggle.textContent.trim()).toBe('Hide topic');
toggle.click(); toggle.click();
await u.waitUntil(() => !u.isVisible(topic_el)); await u.waitUntil(() => !u.isVisible(topic_el));