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
a06d2c49
Commit
a06d2c49
authored
Aug 21, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement own device removal via stanza
parent
26e93658
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
67 deletions
+122
-67
css/converse.css
css/converse.css
+3
-1
sass/_modal.scss
sass/_modal.scss
+10
-2
src/converse-chatboxes.js
src/converse-chatboxes.js
+2
-2
src/converse-omemo.js
src/converse-omemo.js
+88
-53
src/templates/profile_modal.html
src/templates/profile_modal.html
+19
-9
No files found.
css/converse.css
View file @
a06d2c49
...
...
@@ -8575,8 +8575,10 @@ body.reset {
margin-top
:
1em
;
}
#conversejs
#converse-modals
.btn
{
font-weight
:
normal
;
}
#conversejs
#converse-modals
#user-profile-modal
label
{
#conversejs
#converse-modals
#user-profile-modal
.profile-form
label
{
font-weight
:
bold
;
}
#conversejs
#converse-modals
#user-profile-modal
.fingerprint-removal
label
{
padding
:
0.75rem
1.25rem
;
}
#conversejs
#converse-modals
#user-profile-modal
.list-group-item
{
display
:
flex
;
justify-content
:
left
;
...
...
sass/_modal.scss
View file @
a06d2c49
...
...
@@ -16,9 +16,17 @@
}
#user-profile-modal
{
.profile-form
{
label
{
font-weight
:
bold
;
}
}
.fingerprint-removal
{
label
{
padding
:
0
.75rem
1
.25rem
;
}
}
.list-group-item
{
display
:
flex
;
justify-content
:
left
;
...
...
src/converse-chatboxes.js
View file @
a06d2c49
...
...
@@ -259,7 +259,7 @@
});
this
.
messages
=
new
_converse
.
Messages
();
this
.
messages
.
browserStorage
=
new
Backbone
.
BrowserStorage
[
_converse
.
storage
](
b64_sha1
(
`converse.messages
${
this
.
get
(
'
jid
'
)}${
_converse
.
bare_jid
}
`
)
);
`converse.messages
${
this
.
get
(
'
jid
'
)}${
_converse
.
bare_jid
}
`
);
this
.
messages
.
chatbox
=
this
;
this
.
messages
.
on
(
'
change:upload
'
,
(
message
)
=>
{
...
...
@@ -626,7 +626,7 @@
onConnected
()
{
this
.
browserStorage
=
new
Backbone
.
BrowserStorage
.
session
(
b64_sha1
(
`converse.chatboxes-
${
_converse
.
bare_jid
}
`
)
);
`converse.chatboxes-
${
_converse
.
bare_jid
}
`
);
this
.
registerMessageHandler
();
this
.
fetch
({
'
add
'
:
true
,
...
...
src/converse-omemo.js
View file @
a06d2c49
This diff is collapsed.
Click to expand it.
src/templates/profile_modal.html
View file @
a06d2c49
...
...
@@ -68,37 +68,47 @@
<form
class=
"converse-form fingerprint-removal"
>
<ul
class=
"list-group fingerprints"
>
<li
class=
"list-group-item active"
>
{{{o.__("This device's OMEMO fingerprint")}}}
</li>
<li
class=
"
fingerprint-removal-item
list-group-item"
>
<li
class=
"list-group-item"
>
{[ if (o.view.current_device.get('bundle')
&&
o.view.current_device.get('bundle').fingerprint) { ]}
<input
type=
"checkbox"
value=
"{{{o.view.current_device.get('id')}}}"
aria-label=
"{{{o.__('Checkbox for removing the following fingerprint')}}}"
>
<span
class=
"fingerprint"
>
{{{o.view.current_device.get('bundle').fingerprint}}}
</span>
{[ } else {]}
<span
class=
"spinner fa fa-spinner centered"
/>
{[ } ]}
</li>
</ul>
{[ if (o.view.other_devices) { ]}
{[ if (o.view.other_devices
.length
) { ]}
<ul
class=
"list-group fingerprints"
>
<li
class=
"list-group-item active"
>
<li
class=
"list-group-item nopadding active"
>
<label>
<input
type=
"checkbox"
class=
"select-all"
title=
"{{{o.__('Select all')}}}"
aria-label=
"{{{o.__('Checkbox to select fingerprints of all other OMEMO devices')}}}"
>
{{{o.__('Other OMEMO-enabled devices')}}}
</label>
</li>
{[ o._.forEach(o.view.other_devices, function (device) { ]}
{[ if (device.get('bundle')
&&
device.get('bundle').fingerprint) { ]}
<li
class=
"fingerprint-removal-item list-group-item"
>
<li
class=
"fingerprint-removal-item list-group-item nopadding"
>
<label>
<input
type=
"checkbox"
value=
"{{{device.get('id')}}}"
aria-label=
"{{{o.__('Checkbox for selecting the following fingerprint')}}}"
>
<span
class=
"fingerprint"
>
{{{device.get('bundle').fingerprint}}}
</span>
</label>
</li>
{[ } else {]}
<li
class=
"fingerprint-removal-item list-group-item nopadding"
>
<label>
<input
type=
"checkbox"
value=
"{{{device.get('id')}}}"
aria-label=
"{{{o.__('Checkbox for selecting the following fingerprint')}}}"
>
<span>
{{{o.__('Device without a fingerprint')}}}
</span>
</label>
</li>
{[ } ]}
{[ }); ]}
</ul>
{[ } ]}
<div
class=
"form-group"
>
<button
type=
"submit"
class=
"save-form btn btn-primary"
>
{{{o.__('Remove checked devices and close')}}}
</button>
</div>
{[ } ]}
</form>
</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