Style updates for messages and comet sigil sizing

This commit is contained in:
Logan Allen 2019-07-31 22:46:36 +00:00
parent b01c290f0d
commit 9610c41a80
2 changed files with 7 additions and 4 deletions

View File

@ -10,7 +10,7 @@ export class Sigil extends Component {
if (props.ship.length > 14) { if (props.ship.length > 14) {
return ( return (
<div className="bg-black" style={{width: 32, height: 32}}> <div className="bg-black" style={{width: 36, height: 36}}>
</div> </div>
); );
} else { } else {

View File

@ -58,7 +58,7 @@ export class Message extends Component {
if (typeof url !== 'string') { throw 'Only transmogrify strings!'; } if (typeof url !== 'string') { throw 'Only transmogrify strings!'; }
const ship = window.ship; const ship = window.ship;
if (url.indexOf('arvo://') === 0) { if (url.indexOf('arvo://') === 0) {
return `http://${ship}.arvo.network` + url.split('arvo://')[1]; return url.split('arvo://')[1];
} }
return url; return url;
} }
@ -66,13 +66,14 @@ export class Message extends Component {
render() { render() {
const { props } = this; const { props } = this;
let pending = !!props.msg.pending ? ' o-80' : ''; let pending = !!props.msg.pending ? ' o-80' : '';
let timestamp = moment.unix(props.msg.wen / 1000).format('hh:mm a');
let datestamp = moment.unix(props.msg.wen / 1000).format('LL'); let datestamp = moment.unix(props.msg.wen / 1000).format('LL');
let paddingTop = props.paddingTop ? 'pt2' : ''; let paddingTop = props.paddingTop ? 'pt3' : '';
let paddingBot = props.paddingBot ? 'pb2' : 'pb1'; let paddingBot = props.paddingBot ? 'pb2' : 'pb1';
if (props.renderSigil) { if (props.renderSigil) {
let timestamp = moment.unix(props.msg.wen / 1000).format('hh:mm a');
return ( return (
<div className={"w-100 pl3 pr3 cf flex " + paddingTop + " " + paddingBot + pending} <div className={"w-100 pl3 pr3 cf flex " + paddingTop + " " + paddingBot + pending}
style={{ style={{
@ -96,6 +97,8 @@ export class Message extends Component {
</div> </div>
); );
} else { } else {
let timestamp = moment.unix(props.msg.wen / 1000).format('hh:mm');
return ( return (
<div className={"w-100 pr3 pb1 cf hide-child flex" + pending} <div className={"w-100 pr3 pb1 cf hide-child flex" + pending}
style={{ style={{