mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 01:05:42 +03:00
Fix simple header counters to correctly handle zero, take two
This commit is contained in:
parent
03d60e6af2
commit
1a35130869
1 changed files with 23 additions and 25 deletions
|
@ -213,35 +213,33 @@ module.exports = React.createClass({
|
|||
const severity = counter.severity;
|
||||
const stateKey = counter.stateKey;
|
||||
|
||||
if (title && value && severity) {
|
||||
let span = <span>{ title }: { value }</span>
|
||||
|
||||
if (link) {
|
||||
span = (
|
||||
<a href={link} target="_blank" rel="noopener">
|
||||
{ span }
|
||||
</a>
|
||||
);
|
||||
}
|
||||
let span = <span>{ title }: { value }</span>
|
||||
|
||||
if (link) {
|
||||
span = (
|
||||
<span
|
||||
className="m_RoomView_auxPanel_stateViews_span"
|
||||
data-severity={severity}
|
||||
key={ "x-" + stateKey }
|
||||
>
|
||||
{span}
|
||||
</span>
|
||||
);
|
||||
|
||||
counters.push(span);
|
||||
counters.push(
|
||||
<span
|
||||
className="m_RoomView_auxPanel_stateViews_delim"
|
||||
key={"delim" + idx}
|
||||
> ─ </span>
|
||||
<a href={link} target="_blank" rel="noopener">
|
||||
{ span }
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
span = (
|
||||
<span
|
||||
className="m_RoomView_auxPanel_stateViews_span"
|
||||
data-severity={severity}
|
||||
key={ "x-" + stateKey }
|
||||
>
|
||||
{span}
|
||||
</span>
|
||||
);
|
||||
|
||||
counters.push(span);
|
||||
counters.push(
|
||||
<span
|
||||
className="m_RoomView_auxPanel_stateViews_delim"
|
||||
key={"delim" + idx}
|
||||
> ─ </span>
|
||||
);
|
||||
});
|
||||
|
||||
if (counters.length > 0) {
|
||||
|
|
Loading…
Reference in a new issue