Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
0cc088a5
Commit
0cc088a5
authored
Jun 18, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the assets_path setting for the icons sprite
parent
e0be1397
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
14 deletions
+20
-14
package-lock.json
package-lock.json
+13
-7
src/components/help_messages.js
src/components/help_messages.js
+2
-4
src/components/message-actions.js
src/components/message-actions.js
+2
-1
src/templates/directives/retraction.js
src/templates/directives/retraction.js
+3
-2
No files found.
package-lock.json
View file @
0cc088a5
...
@@ -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#bf6d9c86f9fcf224fa9d9af5a25380b77aa4b56
1"
,
"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"
,
...
...
src/components/help_messages.js
View file @
0cc088a5
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
'
:
[]}})
...
...
src/components/message-actions.js
View file @
0cc088a5
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>
`
;
`
;
...
...
src/templates/directives/retraction.js
View file @
0cc088a5
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>
`
;
`
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment