Commit 0cc088a5 authored by JC Brand's avatar JC Brand

Use the assets_path setting for the icons sprite

parent e0be1397
...@@ -3234,7 +3234,8 @@ ...@@ -3234,7 +3234,8 @@
"dependencies": { "dependencies": {
"filesize": { "filesize": {
"version": "6.1.0", "version": "6.1.0",
"resolved": false "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz",
"integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg=="
}, },
"fs-extra": { "fs-extra": {
"version": "8.1.0", "version": "8.1.0",
...@@ -3268,7 +3269,8 @@ ...@@ -3268,7 +3269,8 @@
}, },
"jed": { "jed": {
"version": "1.1.1", "version": "1.1.1",
"resolved": false "resolved": "https://registry.npmjs.org/jed/-/jed-1.1.1.tgz",
"integrity": "sha1-elSbvZ/+FYWwzQoZHiAwVb7ldLQ="
}, },
"jsonfile": { "jsonfile": {
"version": "5.0.0", "version": "5.0.0",
...@@ -3289,7 +3291,8 @@ ...@@ -3289,7 +3291,8 @@
}, },
"localforage": { "localforage": {
"version": "1.7.3", "version": "1.7.3",
"resolved": false, "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.7.3.tgz",
"integrity": "sha512-1TulyYfc4udS7ECSBT2vwJksWbkwwTX8BzeUIiq8Y07Riy7bDAAnxDaPU/tWyOVmQAcWJIEIFP9lPfBGqVoPgQ==",
"requires": { "requires": {
"lie": "3.1.1" "lie": "3.1.1"
} }
...@@ -3301,13 +3304,14 @@ ...@@ -3301,13 +3304,14 @@
}, },
"pluggable.js": { "pluggable.js": {
"version": "2.0.1", "version": "2.0.1",
"resolved": false, "resolved": "https://registry.npmjs.org/pluggable.js/-/pluggable.js-2.0.1.tgz",
"integrity": "sha512-SBt6v6Tbp20Jf8hU0cpcc/+HBHGMY8/Q+yA6Ih0tBQE8tfdZ6U4PRG0iNvUUjLx/hVyOP53n0UfGBymlfaaXCg==",
"requires": { "requires": {
"lodash": "^4.17.11" "lodash": "^4.17.11"
} }
}, },
"skeletor.js": { "skeletor.js": {
"version": "0.0.1", "version": "github:skeletorjs/skeletor#bf6d9c86f9fcf224fa9d9af5a25380b77aa4b561",
"from": "github:skeletorjs/skeletor#bf6d9c86f9fcf224fa9d9af5a25380b77aa4b561", "from": "github:skeletorjs/skeletor#bf6d9c86f9fcf224fa9d9af5a25380b77aa4b561",
"requires": { "requires": {
"lodash": "^4.17.14" "lodash": "^4.17.14"
...@@ -3315,11 +3319,13 @@ ...@@ -3315,11 +3319,13 @@
}, },
"strophe.js": { "strophe.js": {
"version": "1.3.4", "version": "1.3.4",
"resolved": false "resolved": "https://registry.npmjs.org/strophe.js/-/strophe.js-1.3.4.tgz",
"integrity": "sha512-jSLDG8jolhAwGOSgiJ7DTMSYK3wVoEJHKtpVRyEacQZ6CWA6z2WRPJpcFMjsIweq5aP9/XIvKUQqHBu/ZhvESA=="
}, },
"twemoji": { "twemoji": {
"version": "12.1.5", "version": "12.1.5",
"resolved": false, "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-12.1.5.tgz",
"integrity": "sha512-B0PBVy5xomwb1M/WZxf/IqPZfnoIYy1skXnlHjMwLwTNfZ9ljh8VgWQktAPcJXu8080WoEh6YwQGPVhDVqvrVQ==",
"requires": { "requires": {
"fs-extra": "^8.0.1", "fs-extra": "^8.0.1",
"jsonfile": "^5.0.0", "jsonfile": "^5.0.0",
......
import 'fa-icons'; import 'fa-icons';
import xss from "xss/dist/xss"; import xss from "xss/dist/xss";
import { CustomElement } from './element.js'; import { CustomElement } from './element.js';
import { _converse, converse } from "@converse/headless/converse-core"; import { _converse, api } from "@converse/headless/converse-core";
import { html } from 'lit-element'; import { html } from 'lit-element';
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
const u = converse.env.utils;
class ChatHelp extends CustomElement { class ChatHelp extends CustomElement {
...@@ -23,7 +21,7 @@ class ChatHelp extends CustomElement { ...@@ -23,7 +21,7 @@ class ChatHelp extends CustomElement {
const icon_color = this.chat_type === _converse.CHATROOMS_TYPE ? 'var(--chatroom-head-bg-color)' : 'var(--chat-head-color)'; const icon_color = this.chat_type === _converse.CHATROOMS_TYPE ? 'var(--chatroom-head-bg-color)' : 'var(--chat-head-color)';
const isodate = (new Date()).toISOString(); const isodate = (new Date()).toISOString();
return [ return [
html`<fa-icon class="fas fa-times close-chat-help" @click=${this.close} path-prefix="dist" color="${icon_color}" size="1em"></fa-icon>`, html`<fa-icon class="fas fa-times close-chat-help" @click=${this.close} path-prefix="${api.settings.get("assets_path")}" color="${icon_color}" size="1em"></fa-icon>`,
...this.messages.map(m => this.renderHelpMessage({ ...this.messages.map(m => this.renderHelpMessage({
isodate, isodate,
'markup': xss.filterXSS(m, {'whiteList': {'strong': []}}) 'markup': xss.filterXSS(m, {'whiteList': {'strong': []}})
......
import { CustomElement } from './element.js'; import { CustomElement } from './element.js';
import { __ } from '@converse/headless/i18n'; import { __ } from '@converse/headless/i18n';
import { api } from "@converse/headless/converse-core";
import { html } from 'lit-element'; import { html } from 'lit-element';
import { until } from 'lit-html/directives/until.js'; import { until } from 'lit-html/directives/until.js';
...@@ -24,7 +25,7 @@ class MessageActions extends CustomElement { ...@@ -24,7 +25,7 @@ class MessageActions extends CustomElement {
static getActionsDropdownItem (o) { static getActionsDropdownItem (o) {
return html` return html`
<button class="chat-msg__action ${o.button_class}" @click=${o.handler}> <button class="chat-msg__action ${o.button_class}" @click=${o.handler}>
<fa-icon class="${o.icon_class}" path-prefix="/dist" color="var(--text-color-lighten-15-percent)" size="1em"></fa-icon> <fa-icon class="${o.icon_class}" path-prefix="${api.settings.get("assets_path")}" color="var(--text-color-lighten-15-percent)" size="1em"></fa-icon>
${o.i18n_text} ${o.i18n_text}
</button> </button>
`; `;
......
import { directive, html } from "lit-html";
import { __ } from '@converse/headless/i18n'; import { __ } from '@converse/headless/i18n';
import { api } from "@converse/headless/converse-core";
import { directive, html } from "lit-html";
const i18n_retract_message = __('Retract this message'); const i18n_retract_message = __('Retract this message');
const tpl_retract = (o) => html` const tpl_retract = (o) => html`
<button class="chat-msg__action chat-msg__action-retract" title="${i18n_retract_message}" @click=${o.onMessageRetractButtonClicked}> <button class="chat-msg__action chat-msg__action-retract" title="${i18n_retract_message}" @click=${o.onMessageRetractButtonClicked}>
<fa-icon class="fas fa-trash-alt" path-prefix="/dist" color="var(--text-color-lighten-15-percent)" size="1em"></fa-icon> <fa-icon class="fas fa-trash-alt" path-prefix="${api.settings.get("assets_path")}" color="var(--text-color-lighten-15-percent)" size="1em"></fa-icon>
</button> </button>
`; `;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment