mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-21 15:38:59 +03:00
Avoid using %tank %fats
Because tank printing is a pain. Rely instead on %text, using %name to distinguish between intent.
This commit is contained in:
parent
9ce07b821f
commit
ccf1e09a75
@ -234,7 +234,7 @@ export class ChatInput extends Component {
|
||||
} },
|
||||
tac: { name: {
|
||||
nom: 'long-form',
|
||||
tac: { tank: lines.slice(1).map(l => { return {leaf: l }; }) }
|
||||
tac: { text: lines.slice(1).join('\n') }
|
||||
} },
|
||||
} };
|
||||
}
|
||||
|
@ -112,14 +112,24 @@ export class Message extends Component {
|
||||
return (<details>
|
||||
<summary className="inter fs-italic">{'Attached: ' + title}</summary>
|
||||
{ _.has(content, 'text')
|
||||
? <pre className="clamp-attachment">{content.text}</pre>
|
||||
? (title === 'long-form')
|
||||
? this.renderParagraphs(content.text.split('\n'))
|
||||
: this.renderPlaintext(content.text)
|
||||
: _.has(content, 'tank')
|
||||
? <div className="clamp-attachment">
|
||||
{content.tank.map(l => <p className="mt2">{l}</p>)}
|
||||
</div>
|
||||
: null
|
||||
? this.renderPlaintext(content.tank.join('\n'))
|
||||
: null
|
||||
}
|
||||
</>);
|
||||
</details>);
|
||||
}
|
||||
|
||||
renderParagraphs(paragraphs) {
|
||||
return (<div className="clamp-attachment">
|
||||
{paragraphs.map(p => (<p className="mt2">{p}</p>))}
|
||||
</div>);
|
||||
}
|
||||
|
||||
renderPlaintext(text) {
|
||||
return (<pre className="clamp-attachment">{text}</pre>);
|
||||
}
|
||||
|
||||
renderContent() {
|
||||
|
Loading…
Reference in New Issue
Block a user