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
3ec426e1
Commit
3ec426e1
authored
Aug 21, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't render OMEMO stuff in profile modal if OMEMO's not enabled
parent
a06d2c49
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
6 deletions
+11
-6
spec/omemo.js
spec/omemo.js
+1
-1
src/converse-omemo.js
src/converse-omemo.js
+5
-2
src/converse-profile.js
src/converse-profile.js
+1
-1
src/templates/profile_modal.html
src/templates/profile_modal.html
+3
-1
src/templates/user_details_modal.html
src/templates/user_details_modal.html
+1
-1
No files found.
spec/omemo.js
View file @
3ec426e1
...
...
@@ -91,7 +91,7 @@
.
c
(
'
device
'
,
{
'
id
'
:
'
555
'
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
stanza
));
const
devicelist
=
_converse
.
devicelists
.
create
({
'
jid
'
:
contact_jid
});
const
devicelist
=
_converse
.
devicelists
.
get
({
'
jid
'
:
contact_jid
});
expect
(
devicelist
.
devices
.
length
).
toBe
(
1
);
view
=
_converse
.
chatboxviews
.
get
(
contact_jid
);
...
...
src/converse-omemo.js
View file @
3ec426e1
...
...
@@ -13,7 +13,7 @@
],
factory
);
}(
this
,
function
(
converse
,
tpl_toolbar_omemo
)
{
const
{
Backbone
,
Promise
,
Strophe
,
moment
,
sizzle
,
$iq
,
$msg
,
_
,
b64_sha1
}
=
converse
.
env
;
const
{
Backbone
,
Promise
,
Strophe
,
moment
,
sizzle
,
$iq
,
$msg
,
_
,
f
,
b64_sha1
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
Strophe
.
addNamespace
(
'
OMEMO
'
,
"
eu.siacs.conversations.axolotl
"
);
...
...
@@ -63,7 +63,7 @@
converse
.
plugins
.
add
(
'
converse-omemo
'
,
{
enabled
(
_converse
)
{
return
!
_
.
isNil
(
window
.
libsignal
);
return
!
_
.
isNil
(
window
.
libsignal
)
&&
!
f
.
includes
(
'
converse-omemo
'
,
_converse
.
blacklisted_plugins
)
;
},
dependencies
:
[
"
converse-chatview
"
],
...
...
@@ -90,6 +90,9 @@
device_id
=
_converse
.
omemo_store
.
get
(
'
device_id
'
).
toString
();
this
.
current_device
=
this
.
devicelist
.
devices
.
get
(
device_id
);
this
.
other_devices
=
this
.
devicelist
.
devices
.
filter
(
d
=>
(
d
.
get
(
'
id
'
)
!==
device_id
));
if
(
this
.
__super__
.
beforeRender
)
{
return
this
.
__super__
.
beforeRender
.
apply
(
this
,
arguments
);
}
},
selectAll
(
ev
)
{
...
...
src/converse-profile.js
View file @
3ec426e1
...
...
@@ -52,8 +52,8 @@
},
initialize
()
{
_converse
.
BootstrapModal
.
prototype
.
initialize
.
apply
(
this
,
arguments
);
this
.
model
.
on
(
'
change
'
,
this
.
render
,
this
);
_converse
.
BootstrapModal
.
prototype
.
initialize
.
apply
(
this
,
arguments
);
_converse
.
emit
(
'
profileModalInitialized
'
,
this
.
model
);
},
...
...
src/templates/profile_modal.html
View file @
3ec426e1
...
...
@@ -6,6 +6,7 @@
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"{{{o.label_close}}}"
><span
aria-hidden=
"true"
>
×
</span></button>
</div>
<div
class=
"modal-body"
>
{[ if (o._converse.pluggable.plugins['converse-omemo'].enabled(o._converse)) { ]}
<ul
class=
"nav nav-pills justify-content-center"
>
<li
role=
"presentation"
class=
"nav-item"
>
<a
class=
"nav-link active"
id=
"profile-tab"
href=
"#profile-tabpanel"
aria-controls=
"profile-tabpanel"
role=
"tab"
data-toggle=
"tab"
>
Profile
</a>
...
...
@@ -14,6 +15,7 @@
<a
class=
"nav-link"
id=
"omemo-tab"
href=
"#omemo-tabpanel"
aria-controls=
"omemo-tabpanel"
role=
"tab"
data-toggle=
"tab"
>
OMEMO
</a>
</li>
</ul>
{[ } ]}
<div
class=
"tab-content"
>
<div
class=
"tab-pane fade show active"
id=
"profile-tabpanel"
role=
"tabpanel"
aria-labelledby=
"profile-tab"
>
<form
class=
"converse-form converse-form--modal profile-form"
action=
"#"
>
...
...
@@ -63,7 +65,7 @@
</div>
</form>
</div>
{[ if (o._converse.pluggable.plugins['converse-omemo'].enabled()) { ]}
{[ if (o._converse.pluggable.plugins['converse-omemo'].enabled(
o._converse
)) { ]}
<div
class=
"tab-pane fade"
id=
"omemo-tabpanel"
role=
"tabpanel"
aria-labelledby=
"omemo-tab"
>
<form
class=
"converse-form fingerprint-removal"
>
<ul
class=
"list-group fingerprints"
>
...
...
src/templates/user_details_modal.html
View file @
3ec426e1
...
...
@@ -28,7 +28,7 @@
<p><label>
{{{o.__('Role')}}}:
</label>
{{{o.role}}}
</p>
{[ } ]}
{[ if (o._converse.pluggable.plugins['converse-omemo'].enabled()) { ]}
{[ if (o._converse.pluggable.plugins['converse-omemo'].enabled(
o._converse
)) { ]}
<hr>
<ul
class=
"list-group fingerprints"
>
<li
class=
"list-group-item active"
>
{{{o.__('OMEMO Fingerprints')}}}
</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