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
c4367e7a
Commit
c4367e7a
authored
Feb 19, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show own avatar
parent
c12e361e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
19 deletions
+22
-19
css/converse.css
css/converse.css
+2
-1
css/inverse.css
css/inverse.css
+2
-1
sass/_chatbox.scss
sass/_chatbox.scss
+0
-1
sass/_core.scss
sass/_core.scss
+6
-0
src/converse-profile.js
src/converse-profile.js
+1
-3
src/converse-vcard.js
src/converse-vcard.js
+9
-11
src/templates/profile_view.html
src/templates/profile_view.html
+2
-2
No files found.
css/converse.css
View file @
c4367e7a
...
@@ -4993,6 +4993,8 @@ body.reset {
...
@@ -4993,6 +4993,8 @@ body.reset {
display
:
block
;
display
:
block
;
text-align
:
center
;
text-align
:
center
;
width
:
100%
;
}
width
:
100%
;
}
#conversejs
.avatar
{
border-radius
:
25%
;
}
#conversejs
.activated
{
#conversejs
.activated
{
display
:
block
!important
;
}
display
:
block
!important
;
}
#conversejs
.pure-form-message
{
#conversejs
.pure-form-message
{
...
@@ -5127,7 +5129,6 @@ body.reset {
...
@@ -5127,7 +5129,6 @@ body.reset {
#converse-embedded-chat
.chat-head
.avatar
,
#converse-embedded-chat
.chat-head
.avatar
,
#conversejs
.chat-head
.avatar
{
#conversejs
.chat-head
.avatar
{
margin-right
:
0.5em
;
margin-right
:
0.5em
;
border-radius
:
25%
;
float
:
left
;
}
float
:
left
;
}
#converse-embedded-chat
.chat-head
.chatbox-buttons
,
#converse-embedded-chat
.chat-head
.chatbox-buttons
,
#conversejs
.chat-head
.chatbox-buttons
{
#conversejs
.chat-head
.chatbox-buttons
{
...
...
css/inverse.css
View file @
c4367e7a
...
@@ -4993,6 +4993,8 @@ body.reset {
...
@@ -4993,6 +4993,8 @@ body.reset {
display
:
block
;
display
:
block
;
text-align
:
center
;
text-align
:
center
;
width
:
100%
;
}
width
:
100%
;
}
#conversejs
.avatar
{
border-radius
:
25%
;
}
#conversejs
.activated
{
#conversejs
.activated
{
display
:
block
!important
;
}
display
:
block
!important
;
}
#conversejs
.pure-form-message
{
#conversejs
.pure-form-message
{
...
@@ -5183,7 +5185,6 @@ body {
...
@@ -5183,7 +5185,6 @@ body {
#converse-embedded-chat
.chat-head
.avatar
,
#converse-embedded-chat
.chat-head
.avatar
,
#conversejs
.chat-head
.avatar
{
#conversejs
.chat-head
.avatar
{
margin-right
:
0.5em
;
margin-right
:
0.5em
;
border-radius
:
25%
;
float
:
left
;
}
float
:
left
;
}
#converse-embedded-chat
.chat-head
.chatbox-buttons
,
#converse-embedded-chat
.chat-head
.chatbox-buttons
,
#conversejs
.chat-head
.chatbox-buttons
{
#conversejs
.chat-head
.chatbox-buttons
{
...
...
sass/_chatbox.scss
View file @
c4367e7a
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
.avatar
{
.avatar
{
margin-right
:
0
.5em
;
margin-right
:
0
.5em
;
border-radius
:
25%
;
float
:
left
;
float
:
left
;
}
}
...
...
sass/_core.scss
View file @
c4367e7a
...
@@ -245,12 +245,18 @@ body.reset {
...
@@ -245,12 +245,18 @@ body.reset {
width
:
100%
;
width
:
100%
;
}
}
.avatar
{
border-radius
:
25%
;
}
.activated
{
.activated
{
display
:
block
!
important
;
display
:
block
!
important
;
}
}
.pure-form-message
{
.pure-form-message
{
padding
:
0
.5em
0
;
padding
:
0
.5em
0
;
}
}
.button-primary
{
.button-primary
{
color
:
white
;
color
:
white
;
background-color
:
$primary-color
;
background-color
:
$primary-color
;
...
...
src/converse-profile.js
View file @
c4367e7a
...
@@ -46,9 +46,7 @@
...
@@ -46,9 +46,7 @@
},
},
initialize
()
{
initialize
()
{
this
.
model
.
on
(
"
change:status
"
,
this
.
render
,
this
);
this
.
model
.
on
(
"
change
"
,
this
.
render
,
this
);
this
.
model
.
on
(
"
change:status_message
"
,
this
.
render
,
this
);
this
.
model
.
on
(
"
update-status-ui
"
,
this
.
render
,
this
);
},
},
toHTML
()
{
toHTML
()
{
...
...
src/converse-vcard.js
View file @
c4367e7a
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
}
}
});
});
_converse
.
on
(
'
chatBoxInitialized
'
,
function
(
chatbox
)
{
_converse
.
on
(
'
chatBoxInitialized
'
,
(
chatbox
)
=>
{
if
(
!
_converse
.
use_vcards
||
chatbox
.
model
.
get
(
'
type
'
)
===
'
headline
'
)
{
if
(
!
_converse
.
use_vcards
||
chatbox
.
model
.
get
(
'
type
'
)
===
'
headline
'
)
{
return
;
return
;
}
}
...
@@ -183,17 +183,15 @@
...
@@ -183,17 +183,15 @@
_converse
.
on
(
'
statusInitialized
'
,
function
fetchOwnVCard
()
{
_converse
.
on
(
'
statusInitialized
'
,
function
fetchOwnVCard
()
{
if
(
_
.
isNil
(
_converse
.
xmppstatus
.
get
(
'
fullname
'
)))
{
if
(
_
.
isNil
(
_converse
.
xmppstatus
.
get
(
'
fullname
'
)))
{
_converse
.
api
.
disco
.
supports
(
Strophe
.
NS
.
VCARD
,
_converse
.
domain
)
.
then
(
_converse
.
api
.
disco
.
supports
(
Strophe
.
NS
.
VCARD
,
_converse
.
domain
)
(
result
)
=>
{
.
then
(
(
result
)
=>
{
if
(
result
.
supported
)
{
if
(
result
.
supported
)
{
_converse
.
api
.
vcard
.
get
(
_converse
.
bare_jid
).
then
((
vcard
)
=>
{
_converse
.
api
.
vcard
.
get
(
_converse
.
bare_jid
)
_converse
.
xmppstatus
.
save
({
'
fullname
'
:
vcard
.
fullname
||
''
});
.
then
((
vcard
)
=>
{
});
_converse
.
xmppstatus
.
save
(
vcard
);
}
});
}
}})
).
catch
((
msg
)
=>
{
.
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
FATAL
));
_converse
.
log
(
msg
,
Strophe
.
LogLevel
.
FATAL
);
});
}
}
});
});
...
...
src/templates/profile_view.html
View file @
c4367e7a
<div
class=
"userinfo"
>
<div
class=
"userinfo"
>
<div
class=
"d-flex"
>
<div
class=
"d-flex"
>
<
canvas
height=
"20"
width=
"20"
class=
"avatar align-self-center"
></canvas
>
<
img
alt=
"User Avatar"
class=
"avatar align-self-center"
height=
"40px"
width=
"40px"
src=
"data:{{{o.image_type}}};base64,{{{o.image}}}"
/
>
<span
class=
"username w-100 align-self-center"
>
{{{o.fullname}}}
</span>
<span
class=
"username w-100 align-self-center"
>
{{{o.fullname}}}
</span>
<
a
class=
"chatbox-btn fa fa-vcard align-self-center"
title=
"{{{o.title_your_profile}}}"
data-toggle=
"modal"
data-target=
"#userProfileModal"
></a
>
<
!-- <a class="chatbox-btn fa fa-vcard align-self-center" title="{{{o.title_your_profile}}}" data-toggle="modal" data-target="#userProfileModal"></a> --
>
<a
class=
"chatbox-btn fa fa-cog align-self-center"
title=
"{{{o.title_change_status}}}"
data-toggle=
"modal"
data-target=
"#settingsModal"
></a>
<a
class=
"chatbox-btn fa fa-cog align-self-center"
title=
"{{{o.title_change_status}}}"
data-toggle=
"modal"
data-target=
"#settingsModal"
></a>
</div>
</div>
<div
class=
"d-flex xmpp-status"
>
<div
class=
"d-flex xmpp-status"
>
...
...
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