mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add avatar provider API
This commit is contained in:
1 parent
2db1570d1b
commit
f1f956202f
42 files changed
+122
-80
No files matched your search
@@ -16,7 +16,7 @@ function renderItem(domain) {
|
||||
return tpl`
|
||||
<div class="media">
|
||||
<div class="media__left medium">
|
||||
<img class="small domain-profile-avatar" src="${domain.gravatar}" width="30" height="30">
|
||||
<img class="small domain-profile-avatar" src="${domain.avatarUrl}" width="30" height="30">
|
||||
</div>
|
||||
<div class="media__body medium">
|
||||
<div class="domain-select__name">${domain.name}</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ function renderItem(user) {
|
||||
return tpl`
|
||||
<div class="media">
|
||||
<div class="media__left medium">
|
||||
<img class="small user-profile-avatar" src="${user.gravatar}" width="30" height="30">
|
||||
<img class="small user-profile-avatar" src="${user.avatarUrl}" width="30" height="30">
|
||||
</div>
|
||||
<div class="media__body medium">
|
||||
<div class="user-select__uname">${user.uname}</div>
|
||||
|
||||
@@ -23,7 +23,7 @@ const messagePage = new AutoloadPage('messagePage', () => {
|
||||
console.log('Received message', msg);
|
||||
if (msg.mdoc.flag & FLAG_ALERT) {
|
||||
// Is alert
|
||||
new InfoDialog({
|
||||
new InfoDialog({
|
||||
$body: tpl`
|
||||
<div class="typo">
|
||||
<p>${i18n('Message from {0}:', msg.mdoc.from)}</p>
|
||||
@@ -34,7 +34,7 @@ const messagePage = new AutoloadPage('messagePage', () => {
|
||||
// Is message
|
||||
new Notification({
|
||||
title: msg.udoc.uname,
|
||||
avatar: msg.udoc.gravatar_url,
|
||||
avatar: msg.udoc.avatarUrl,
|
||||
message: msg.mdoc.content,
|
||||
duration: 15000,
|
||||
action: () => window.open(`/home/messages?uid=${msg.udoc._id}`, '_blank'),
|
||||
|
||||
@@ -52,8 +52,8 @@ export default connect(mapStateToProps, null)(class MessagePadDialogueContentCon
|
||||
isSelf={reply.from === UserContext._id}
|
||||
faceUrl={
|
||||
reply.from === UserContext._id
|
||||
? UserContext.gravatar
|
||||
: this.props.item.udoc.gravatar
|
||||
? UserContext.avatarUrl
|
||||
: this.props.item.udoc.avatarUrl
|
||||
}
|
||||
>
|
||||
<div>{reply.content}</div>
|
||||
|
||||
@@ -39,7 +39,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadDial
|
||||
key={dialogue._id}
|
||||
userName={dialogue.udoc.uname}
|
||||
summary={(_.last(dialogue.messages)?.content) || ''}
|
||||
faceUrl={dialogue.udoc.gravatar}
|
||||
faceUrl={dialogue.udoc.avatarUrl}
|
||||
active={dialogue._id === this.props.activeId}
|
||||
onClick={() => this.props.handleClick(dialogue._id)}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user