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
d5472a8d
Commit
d5472a8d
authored
Jan 21, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
muc-views: Use native methods instead of lodash
parent
17ef50f6
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
78 deletions
+65
-78
src/converse-muc-views.js
src/converse-muc-views.js
+51
-59
src/templates/chatroom_destroyed.html
src/templates/chatroom_destroyed.html
+2
-6
src/templates/chatroom_details_modal.html
src/templates/chatroom_details_modal.html
+1
-1
src/templates/chatroom_disconnect.html
src/templates/chatroom_disconnect.html
+2
-3
src/templates/occupant.html
src/templates/occupant.html
+9
-9
No files found.
src/converse-muc-views.js
View file @
d5472a8d
This diff is collapsed.
Click to expand it.
src/templates/chatroom_destroyed.html
View file @
d5472a8d
<div
class=
"alert alert-danger"
>
<div
class=
"alert alert-danger"
>
<h3
class=
"alert-heading disconnect-msg"
>
{{{o.__('This groupchat no longer exists')}}}
</h3>
<h3
class=
"alert-heading disconnect-msg"
>
{{{o.__('This groupchat no longer exists')}}}
</h3>
<p
class=
"destroyed-reason"
>
{{{o.reason}}}
</p>
<p
class=
"destroyed-reason"
>
{{{o.reason}}}
</p>
{[ if (o.jid) { ]}
{[ if (o.jid) { ]}
<p
class=
"moved-label"
>
<p
class=
"moved-label"
>
{{{o.__('The conversation has moved. Click below to enter.') }}}
</p>
{{{o.__('The conversation has moved. Click below to enter.') }}}
</p>
<p
class=
"moved-link"
><a
class=
"switch-chat"
href=
"#"
>
{{{o.jid}}}
</a></p>
<p
class=
"moved-link"
><a
class=
"switch-chat"
href=
"#"
>
{{{o.jid}}}
</a></p>
{[ } ]}
{[ } ]}
</div>
</div>
src/templates/chatroom_details_modal.html
View file @
d5472a8d
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<p
class=
"room-info"
><strong>
{{{o.__('Description')}}}
</strong>
: {{{o.config.description}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Description')}}}
</strong>
: {{{o.config.description}}}
</p>
{[ if (o.subject) { ]}
{[ if (o.subject) { ]}
<p
class=
"room-info"
><strong>
{{{o.__('Topic')}}}
</strong>
: {{o.topic}}
</p>
<!-- Sanitized in converse-muc-views. We want to render links. -->
<p
class=
"room-info"
><strong>
{{{o.__('Topic')}}}
</strong>
: {{o.topic}}
</p>
<!-- Sanitized in converse-muc-views. We want to render links. -->
<p
class=
"room-info"
><strong>
{{{o.__('Topic author')}}}
</strong>
: {{{o.
_.get(o.subject, 'author')
}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Topic author')}}}
</strong>
: {{{o.
subject
&&
o.subject.author
}}}
</p>
{[ } ]}
{[ } ]}
<p
class=
"room-info"
><strong>
{{{o.__('Online users')}}}
</strong>
: {{{o.num_occupants}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Online users')}}}
</strong>
: {{{o.num_occupants}}}
</p>
<p
class=
"room-info"
><strong>
{{{o.__('Features')}}}
</strong>
:
<p
class=
"room-info"
><strong>
{{{o.__('Features')}}}
</strong>
:
...
...
src/templates/chatroom_disconnect.html
View file @
d5472a8d
<div
class=
"alert alert-danger"
>
<div
class=
"alert alert-danger"
>
<h3
class=
"alert-heading disconnect-msg"
>
{{{o.disconnect_messages[0]}}}
</h3>
<h3
class=
"alert-heading disconnect-msg"
>
{{{o.messages[0]}}}
</h3>
{[ o.messages.slice(1).forEach(function (msg) { ]}
{[ o._.forEach(o.disconnect_messages.slice(1), function (msg) { ]}
<p
class=
"disconnect-msg"
>
{{{msg}}}
</p>
<p
class=
"disconnect-msg"
>
{{{msg}}}
</p>
{[ }); ]}
{[ }); ]}
</div>
</div>
src/templates/occupant.html
View file @
d5472a8d
<li
class=
"occupant"
id=
"{{{ o.id }}}"
<li
class=
"occupant"
id=
"{{{ o.id }}}"
{[
if
(o.role =
==
"
moderator
")
{
]}
{[
if
(o.role =
==
"
moderator
")
{
]}
title=
"{{{ o.jid }}} {{{ o.
desc_moderator
}}} {{{ o.hint_occupant }}}"
title=
"{{{ o.jid }}} {{{ o.
__('This user is a moderator.')
}}} {{{ o.hint_occupant }}}"
{[
}
]}
{[
}
]}
{[
if
(o.role =
==
"
participant
")
{
]}
{[
if
(o.role =
==
"
participant
")
{
]}
title=
"{{{ o.jid }}} {{{ o.
desc_participant
}}} {{{ o.hint_occupant }}}"
title=
"{{{ o.jid }}} {{{ o.
__('This user can send messages in this groupchat.')
}}} {{{ o.hint_occupant }}}"
{[
}
]}
{[
}
]}
{[
if
(o.role =
==
"
visitor
")
{
]}
{[
if
(o.role =
==
"
visitor
")
{
]}
title=
"{{{ o.jid }}} {{{ o.
desc_visitor
}}} {{{ o.hint_occupant }}}"
title=
"{{{ o.jid }}} {{{ o.
__('This user can NOT send messages in this groupchat.')
}}} {{{ o.hint_occupant }}}"
{[
}
]}
{[
}
]}
{[
if
(!
o
.
_
.
includes
(["
visitor
",
"
participant
",
"
moderator
"],
o
.
role
))
{
]}
{[
if
(!
["
visitor
",
"
participant
",
"
moderator
"].
includes
(
o
.
role
))
{
]}
title=
"{{{ o.jid }}} {{{ o.hint_occupant }}}"
title=
"{{{ o.jid }}} {{{ o.hint_occupant }}}"
{[
}
]}
>
{[
}
]}
>
<div
class=
"row no-gutters"
>
<div
class=
"row no-gutters"
>
...
@@ -19,20 +19,20 @@
...
@@ -19,20 +19,20 @@
<span
class=
"occupant-nick"
>
{{{o.nick || o.jid}}}
</span>
<span
class=
"occupant-nick"
>
{{{o.nick || o.jid}}}
</span>
<span
class=
"occupant-badges"
>
<span
class=
"occupant-badges"
>
{[ if (o.affiliation === "owner") { ]}
{[ if (o.affiliation === "owner") { ]}
<span
class=
"badge badge-groupchat"
>
{{{o.
label_owner
}}}
</span>
<span
class=
"badge badge-groupchat"
>
{{{o.
__('Owner')
}}}
</span>
{[ } ]}
{[ } ]}
{[ if (o.affiliation === "admin") { ]}
{[ if (o.affiliation === "admin") { ]}
<span
class=
"badge badge-info"
>
{{{o.
label_admin
}}}
</span>
<span
class=
"badge badge-info"
>
{{{o.
__('Admin')
}}}
</span>
{[ } ]}
{[ } ]}
{[ if (o.affiliation === "member") { ]}
{[ if (o.affiliation === "member") { ]}
<span
class=
"badge badge-info"
>
{{{o.
label_member
}}}
</span>
<span
class=
"badge badge-info"
>
{{{o.
__('Member')
}}}
</span>
{[ } ]}
{[ } ]}
{[ if (o.role === "moderator") { ]}
{[ if (o.role === "moderator") { ]}
<span
class=
"badge badge-info"
>
{{{o.
label_moderator
}}}
</span>
<span
class=
"badge badge-info"
>
{{{o.
__('Moderator')
}}}
</span>
{[ } ]}
{[ } ]}
{[ if (o.role === "visitor") { ]}
{[ if (o.role === "visitor") { ]}
<span
class=
"badge badge-secondary"
>
{{{o.
label_visitor
}}}
</span>
<span
class=
"badge badge-secondary"
>
{{{o.
__('Visitor')
}}}
</span>
{[ } ]}
{[ } ]}
</span>
</span>
</div>
</div>
...
...
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