mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fix
This commit is contained in:
1 parent
2b6a510c1e
commit
f2bcc3bc93
23 files changed
+241
-119
No files matched your search
@@ -59,8 +59,8 @@ export default class MessagePadDialogueContentContainer extends React.PureCompon
|
||||
isSelf={reply.from === UserContext._id}
|
||||
faceUrl={
|
||||
reply.from === this.props.item.from
|
||||
? this.props.item.from_udoc.gravatar_url
|
||||
: this.props.item.to_udoc.gravatar_url
|
||||
? this.props.item.from_udoc.gravatar
|
||||
: this.props.item.to_udoc.gravatar
|
||||
}
|
||||
>
|
||||
<div>{reply.content}</div>
|
||||
|
||||
@@ -50,8 +50,8 @@ export default class MessagePadDialogueListContainer extends React.PureComponent
|
||||
}
|
||||
faceUrl={
|
||||
dialogue.from === UserContext._id
|
||||
? dialogue.to_udoc.gravatar_url
|
||||
: dialogue.from_udoc.gravatar_url
|
||||
? dialogue.to_udoc.gravatar
|
||||
: dialogue.from_udoc.gravatar
|
||||
}
|
||||
active={dialogue._id === this.props.activeId}
|
||||
onClick={() => this.props.handleClick(dialogue._id)}
|
||||
|
||||
@@ -35,10 +35,7 @@ const page = new NamedPage('home_messages', () => {
|
||||
|
||||
reduxStore = store;
|
||||
|
||||
const sock = new SockJs('/home/messages-conn');
|
||||
sock.onopen = () => {
|
||||
sock.send(document.cookie);
|
||||
};
|
||||
const sock = new SockJs(`/home/messages-conn?token=${UiContext.csrfToken}`);
|
||||
sock.onmessage = (message) => {
|
||||
const msg = JSON.parse(message.data);
|
||||
store.dispatch({
|
||||
|
||||
@@ -7,12 +7,12 @@ const page = new NamedPage('homework_main', () => {
|
||||
// Homework Calendar
|
||||
if (Context.docs) {
|
||||
const events = Context.docs.map((doc) => ({
|
||||
beginAt: doc.beginAt * 1000,
|
||||
endAt: doc.endAt * 1000,
|
||||
beginAt: doc.beginAt,
|
||||
endAt: doc.endAt,
|
||||
title: doc.title,
|
||||
maskFrom: doc.penaltySince ? doc.penaltySince * 1000 : null,
|
||||
maskFrom: doc.penaltySince ? doc.penaltySince : null,
|
||||
maskTitle: i18n('Time Extension'),
|
||||
colorIndex: parseMongoId(doc.id).timestamp % 12,
|
||||
colorIndex: parseMongoId(doc._id).timestamp % 12,
|
||||
link: doc.url,
|
||||
}));
|
||||
const calendar = new Calendar(events);
|
||||
|
||||
Reference in new issue
Block a user