mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 14:13:21 +00:00
disable sw cache on localhost:8080, chat msg author onclick
This commit is contained in:
parent
bf0187821f
commit
a1ea8d3262
@ -7,6 +7,7 @@ import Autolinker from 'autolinker';
|
||||
import iris from '../iris-lib';
|
||||
import $ from 'jquery';
|
||||
import State from '../State';
|
||||
import {route} from 'preact-router';
|
||||
|
||||
const autolinker = new Autolinker({ stripPrefix: false, stripTrailingSlash: false});
|
||||
const ANIMATE_DURATION = 200;
|
||||
@ -60,9 +61,8 @@ class Message extends Component {
|
||||
return {seen, delivered};
|
||||
}
|
||||
|
||||
onNameClick(name) {
|
||||
$('.new-msg').val(`${$('.new-msg').val().trim() } @${name} `);
|
||||
$('.new-msg').focus();
|
||||
onNameClick() {
|
||||
route('/chat/' + this.props.from);
|
||||
}
|
||||
|
||||
openAttachmentsGallery(event) {
|
||||
@ -167,7 +167,7 @@ class Message extends Component {
|
||||
<div class="msg ${whose} ${seen} ${delivered}">
|
||||
<div class="msg-content">
|
||||
<div class="msg-sender">
|
||||
${name && this.props.showName && html`<small onclick=${() => this.onNameClick(name)} class="msgSenderName" style="color: ${color}">${name}</small>`}
|
||||
${name && this.props.showName && html`<small onclick=${() => this.onNameClick()} class="msgSenderName" style="color: ${color}">${name}</small>`}
|
||||
</div>
|
||||
${this.props.torrentId ? html`
|
||||
<${Torrent} torrentId=${this.props.torrentId}/>
|
||||
|
@ -125,7 +125,7 @@ export default class PrivateChat extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
setSortedParticipants() {
|
||||
setSortedParticipants = _.debounce(() => {
|
||||
let noLongerParticipant = true;
|
||||
const sortedParticipants = Object.keys(this.participants)
|
||||
.filter(k => {
|
||||
@ -150,7 +150,7 @@ export default class PrivateChat extends Component {
|
||||
return 0;
|
||||
});
|
||||
this.setState({sortedParticipants, noLongerParticipant});
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
componentDidUpdate() {
|
||||
if (this.state.stickToBottom) {
|
||||
|
@ -22,7 +22,7 @@ export default class BlockedSettings extends Component {
|
||||
<h3>{t('blocked_users')}</h3>
|
||||
{blockedUsers.map(user => {
|
||||
if (this.state.blockedUsers[user]) {
|
||||
return (<p><a href={`/profile/${ encodeURIComponent(user)}`} ><Text user={user} path="profile/name" placeholder="User" /></a></p>);
|
||||
return (<p key={user}><a href={`/profile/${ encodeURIComponent(user)}`} ><Text user={user} path="profile/name" placeholder="User" /></a></p>);
|
||||
}
|
||||
}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user