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
1059b306
Commit
1059b306
authored
Jun 06, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use lit-html to render the toolbar
parent
c2c1db58
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
src/converse-chatview.js
src/converse-chatview.js
+2
-2
src/templates/toolbar.html
src/templates/toolbar.html
+0
-10
src/templates/toolbar.js
src/templates/toolbar.js
+11
-0
No files found.
src/converse-chatview.js
View file @
1059b306
...
...
@@ -14,7 +14,7 @@ import tpl_chatbox_message_form from "templates/chatbox_message_form.html";
import
tpl_new_day
from
"
templates/new_day.html
"
;
import
tpl_spinner
from
"
templates/spinner.html
"
;
import
tpl_spoiler_button
from
"
templates/spoiler_button.html
"
;
import
tpl_toolbar
from
"
templates/toolbar.
html
"
;
import
tpl_toolbar
from
"
templates/toolbar.
js
"
;
import
tpl_toolbar_fileupload
from
"
templates/toolbar_fileupload.html
"
;
import
tpl_user_details_modal
from
"
templates/user_details_modal.js
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
...
...
@@ -339,7 +339,7 @@ converse.plugins.add('converse-chatview', {
this
.
model
.
toJSON
(),
this
.
getToolbarOptions
()
);
this
.
el
.
querySelector
(
'
.chat-toolbar
'
).
innerHTML
=
tpl_toolbar
(
options
);
render
(
tpl_toolbar
(
options
),
this
.
el
.
querySelector
(
'
.chat-toolbar
'
)
);
this
.
addSpoilerButton
(
options
);
this
.
addFileUploadButton
();
/**
...
...
src/templates/toolbar.html
deleted
100644 → 0
View file @
c2c1db58
{[ if (o.show_call_button) { ]}
<li
class=
"toggle-call fa fa-phone"
title=
"{{{o.label_start_call}}}"
></li>
{[ } ]}
{[ if (o.show_occupants_toggle) { ]}
<li
class=
"toggle-occupants float-right fa {[ if (o.hidden_occupants) { ]} fa-angle-double-left {[ } else { ]} fa-angle-double-right {[ } ]}"
title=
"{{{o.label_hide_occupants}}}"
></li>
{[ } ]}
{[ if (o.message_limit) { ]}
<li
class=
"message-limit font-weight-bold float-right"
title=
"{{{o.label_message_limit}}}"
>
{{{o.message_limit}}}
</li>
{[ } ]}
src/templates/toolbar.js
0 → 100644
View file @
1059b306
import
{
html
}
from
"
lit-html
"
;
export
default
(
o
)
=>
html
`
${
o
.
show_call_button
?
html
`<li class="toggle-call fa fa-phone" title="
${
o
.
label_start_call
}
"></li>`
:
''
}
${
o
.
show_occupants_toggle
?
html
` <li class="toggle-occupants float-right fa
${
o
.
hidden_occupants
?
`fa-angle-double-left`
:
`fa-angle-double-right`
}
"
title="
${
o
.
label_hide_occupants
}
"></li>`
:
''
}
${
o
.
message_limit
?
html
`<li class="message-limit font-weight-bold float-right" title="
${
o
.
label_message_limit
}
">
${
o
.
message_limit
}
</li>`
:
''
}
`
;
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