feat(subplebbits): add online indicator

This commit is contained in:
plebeius.eth
2024-01-01 20:39:07 +01:00
parent 79c86822c3
commit e24aa066da
2 changed files with 17 additions and 0 deletions

View File

@@ -101,6 +101,22 @@
opacity: 1;
}
.onlineIndicator {
background-repeat: no-repeat;
display: inline-flex;
height: 13px;
width: 13px;
margin: 2px 5px -2px 2px;
}
.online {
background-image: url('/public/assets/indicator-online.png');
}
.offline {
background-image: url('/public/assets/indicator-offline.png');
}
.title {
display: inline-flex;
flex-wrap: wrap;

View File

@@ -92,6 +92,7 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => {
</div>
<div className={styles.entry}>
<div className={styles.title}>
<span className={`${styles.onlineIndicator} ${isOnline ? styles.online : styles.offline}`} />
<Link to={`/p/${address}`}>
p/{address.includes('.') ? address : shortAddress}
{title && `: ${title}`}