mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 10:21:31 +03:00
Merge pull request #2319 from urbit/mp/os1/chat/blended-sigil
chat: blend uncustomised sigils
This commit is contained in:
commit
d203c684e7
@ -237,8 +237,8 @@ export class ChatScreen extends Component {
|
||||
<Link to="/~chat/">{"⟵ All Chats"}</Link>
|
||||
</div>
|
||||
<div
|
||||
className={`pl3 pt2 bb b--gray4 b--gray1-d bg-gray0-d flex relative overflow-x-scroll
|
||||
overflow-x-auto-l overflow-x-auto-xl flex-shrink-0`}
|
||||
className={"pl3 pt2 bb b--gray4 b--gray1-d bg-gray0-d flex relative " +
|
||||
"overflow-x-scroll overflow-x-auto-l overflow-x-auto-xl flex-shrink-0"}
|
||||
style={{ height: 48 }}>
|
||||
<SidebarSwitcher
|
||||
sidebarShown={this.props.sidebarShown}
|
||||
@ -261,7 +261,7 @@ export class ChatScreen extends Component {
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="overflow-y-scroll bg-gray0-d pt3 pb2 flex flex-column-reverse"
|
||||
className="overflow-y-scroll bg-white bg-gray0-d pt3 pb2 flex flex-column-reverse"
|
||||
style={{ height: "100%", resize: "vertical" }}
|
||||
onScroll={this.onScroll}>
|
||||
<div
|
||||
|
@ -172,6 +172,9 @@ export class ChatInput extends Component {
|
||||
let color = !!props.ownerContact
|
||||
? uxToHex(props.ownerContact.color) : '#000000';
|
||||
|
||||
let sigilClass = !!props.ownerContact
|
||||
? "" : "mix-blend-diff";
|
||||
|
||||
return (
|
||||
<div className="pa3 cf flex black bt b--gray4 o-50">
|
||||
<div className="fl" style={{
|
||||
@ -179,7 +182,12 @@ export class ChatInput extends Component {
|
||||
flexBasis: 24,
|
||||
height: 24
|
||||
}}>
|
||||
<Sigil ship={window.ship} size={24} color={`#${color}`} />
|
||||
<Sigil
|
||||
ship={window.ship}
|
||||
size={24}
|
||||
color={`#${color}`}
|
||||
classes={sigilClass}
|
||||
/>
|
||||
</div>
|
||||
<div className="fr h-100 flex" style={{ flexGrow: 1, height: 28, paddingTop: 6, resize: "none" }}>
|
||||
<p className="pl3">This chat is read only and you cannot post.</p>
|
||||
@ -193,10 +201,15 @@ export class ChatInput extends Component {
|
||||
|
||||
let color = !!props.ownerContact
|
||||
? uxToHex(props.ownerContact.color) : '#000000';
|
||||
|
||||
let sigilClass = !!props.ownerContact
|
||||
? "" : "mix-blend-diff";
|
||||
|
||||
this.bindShortcuts();
|
||||
|
||||
return (
|
||||
<div className="pa3 cf flex black white-d bt b--gray4 b--gray1-d bg-gray0-d" style={{ flexGrow: 1 }}>
|
||||
<div className="pa3 cf flex black white-d bt b--gray4 b--gray1-d bg-white bg-gray0-d"
|
||||
style={{ flexGrow: 1 }}>
|
||||
<div
|
||||
className="fl"
|
||||
style={{
|
||||
@ -204,7 +217,12 @@ export class ChatInput extends Component {
|
||||
flexBasis: 24,
|
||||
height: 24
|
||||
}}>
|
||||
<Sigil ship={window.ship} size={24} color={`#${color}`} />
|
||||
<Sigil
|
||||
ship={window.ship}
|
||||
size={24}
|
||||
color={`#${color}`}
|
||||
classes={sigilClass}
|
||||
/>
|
||||
</div>
|
||||
<div className="fr h-100 flex bg-gray0-d" style={{ flexGrow: 1 }}>
|
||||
<textarea
|
||||
|
@ -162,12 +162,14 @@ export class Message extends Component {
|
||||
|
||||
let contact = !!(props.msg.author in props.contacts)
|
||||
? props.contacts[props.msg.author] : false;
|
||||
let name = props.msg.author;
|
||||
let name = `~${props.msg.author}`;
|
||||
let color = "#000000";
|
||||
let sigilClass = "mix-blend-diff"
|
||||
if (contact) {
|
||||
name = (contact.nickname.length > 0)
|
||||
? contact.nickname : `~${props.msg.author}`;
|
||||
color = `#${uxToHex(contact.color)}`;
|
||||
sigilClass = "";
|
||||
}
|
||||
return (
|
||||
<div
|
||||
@ -181,7 +183,9 @@ export class Message extends Component {
|
||||
<Sigil
|
||||
ship={props.msg.author}
|
||||
size={24}
|
||||
color={color} />
|
||||
color={color}
|
||||
classes={sigilClass}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="fr clamp-message white-d"
|
||||
|
Loading…
Reference in New Issue
Block a user