mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix tooltips for offline indicator, styling
This commit is contained in:
@@ -15,21 +15,11 @@ const BoardAvatar = ({ address }) => {
|
||||
}, [subplebbit.suggested?.avatarUrl, subplebbit]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="board-avatar-container">
|
||||
<img
|
||||
className="board-avatar"
|
||||
alt="board logo"
|
||||
src={avatarUrl}
|
||||
/>
|
||||
{!isOnline && (
|
||||
<img className="offline-indicator" alt="offline" src="assets/offline.png"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content="Offline"
|
||||
data-tooltip-place="top" />
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
<img
|
||||
className="board-avatar"
|
||||
alt="board logo"
|
||||
src={avatarUrl}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1631,14 +1631,14 @@ export const BoardForm = styled.div`
|
||||
.offline-sub {
|
||||
width: 13px;
|
||||
margin-right: -5px;
|
||||
margin-bottom: -3px;
|
||||
margin-bottom: -1px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.offline-reply {
|
||||
width: 13px;
|
||||
margin-right: 2px;
|
||||
margin-bottom: -3px;
|
||||
margin-bottom: -1px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -2994,13 +2994,13 @@ export const BoardForm = styled.div`
|
||||
|
||||
.offline-mobile-sub {
|
||||
width: 13px;
|
||||
margin-top: 3px;
|
||||
margin-top: 4px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.offline-mobile-sub-reply {
|
||||
width: 13px;
|
||||
margin-top: 3px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.thread {
|
||||
|
||||
@@ -107,11 +107,11 @@ const Home = () => {
|
||||
to={`/p/${subscription}`}>
|
||||
<br id="mobile-br" />
|
||||
{subscription}
|
||||
<OfflineIndicator
|
||||
</Link>
|
||||
<OfflineIndicator
|
||||
address={subscription}
|
||||
className="disconnected"
|
||||
tooltipPlace="top" />
|
||||
</Link>
|
||||
<br />
|
||||
</>
|
||||
))}
|
||||
@@ -129,13 +129,19 @@ const Home = () => {
|
||||
<div className="board-title">
|
||||
{subplebbit.title ? subplebbit.title : <span style={{userSelect: "none"}}> </span>}
|
||||
</div>
|
||||
<Link to={`/p/${subplebbit.address}`} onClick={() => {
|
||||
setSelectedTitle(subplebbit.title);
|
||||
setSelectedAddress(subplebbit.address);
|
||||
window.scrollTo(0, 0);
|
||||
}} >
|
||||
<BoardAvatar address={subplebbit.address} />
|
||||
</Link>
|
||||
<div className="board-avatar-container">
|
||||
<Link to={`/p/${subplebbit.address}`} onClick={() => {
|
||||
setSelectedTitle(subplebbit.title);
|
||||
setSelectedAddress(subplebbit.address);
|
||||
window.scrollTo(0, 0);
|
||||
}} >
|
||||
<BoardAvatar address={subplebbit.address} />
|
||||
</Link>
|
||||
<OfflineIndicator
|
||||
address={subplebbit.address}
|
||||
className="offline-indicator"
|
||||
tooltipPlace="top" />
|
||||
</div>
|
||||
<div className="board-text">
|
||||
<b>{subplebbit.address}</b>
|
||||
</div>
|
||||
|
||||
@@ -427,7 +427,7 @@ const Subscriptions = () => {
|
||||
data-tooltip-content={thread.subplebbitAddress}
|
||||
data-tooltip-place="top"
|
||||
>{thread.subplebbitAddress.slice(0, 10) + "(...)"}</span>
|
||||
)}
|
||||
)}
|
||||
</Link>
|
||||
<OfflineIndicator key={`oi-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
@@ -553,28 +553,20 @@ const Subscriptions = () => {
|
||||
p/
|
||||
<Link key={`p-t-${index}`} to={`/p/${thread.subplebbitAddress}`} id="reply-button" title="Visit this board">
|
||||
{thread.subplebbitAddress.includes(".eth") ?
|
||||
(thread.subplebbitAddress) :
|
||||
(
|
||||
<>
|
||||
{thread.subplebbitAddress}
|
||||
<OfflineIndicator key={`offline-reply-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-reply" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span key={`short-add${index}`}
|
||||
<span key={`short-add${index}`}
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={thread.subplebbitAddress}
|
||||
data-tooltip-place="top"
|
||||
>{thread.subplebbitAddress.slice(0, 10) + "(...)"}</span>
|
||||
<OfflineIndicator key={`offline-reply-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-reply" />
|
||||
</>
|
||||
)}
|
||||
>{thread.subplebbitAddress.slice(0, 10) + "(...)"}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
<OfflineIndicator key={`offline-reply-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-reply" />
|
||||
</span>
|
||||
<button key={`pmb-${index}`} className="post-menu-button" title="Post menu" style={{ all: 'unset', cursor: 'pointer' }} data-cmd="post-menu">▶</button>
|
||||
<div id="backlink-id" className="backlink">
|
||||
@@ -729,28 +721,20 @@ const Subscriptions = () => {
|
||||
p/
|
||||
<Link key={`p-t-${index}`} to={`/p/${thread.subplebbitAddress}`} id="reply-button" title="Visit this board">
|
||||
{thread.subplebbitAddress.includes(".eth") ?
|
||||
(thread.subplebbitAddress) :
|
||||
(
|
||||
<>
|
||||
{thread.subplebbitAddress}
|
||||
<OfflineIndicator key={`offline-indicator-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-mobile-sub" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span key={`short-add${index}`}
|
||||
<span key={`short-add${index}`}
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={thread.subplebbitAddress}
|
||||
data-tooltip-place="top"
|
||||
>{thread.subplebbitAddress.slice(0, 10) + "(...)"}</span>
|
||||
<OfflineIndicator key={`offline-indicator-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-mobile-sub" />
|
||||
</>
|
||||
)}
|
||||
>{thread.subplebbitAddress.slice(0, 10) + "(...)"}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
<OfflineIndicator key={`offline-indicator-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-mobile-sub" />
|
||||
</span>
|
||||
<span key={`mob-dt-${index}`} className="date-time-mobile post-number-mobile">
|
||||
{getDate(thread.timestamp)}
|
||||
@@ -894,30 +878,22 @@ const Subscriptions = () => {
|
||||
</span>
|
||||
<span key={`p-t-mob-span-${index}`} className="date-time-mobile highlight-address-mobile">
|
||||
p/
|
||||
<Link key={`p-t-${index}`} to={`/p/${thread.subplebbitAddress}`} id="reply-button" title="Visit this board">
|
||||
<Link key={`p-t-${index}`} to={`/p/${thread.subplebbitAddress}`} id="reply-button" title="Visit this board">
|
||||
{thread.subplebbitAddress.includes(".eth") ?
|
||||
(thread.subplebbitAddress) :
|
||||
(
|
||||
<>
|
||||
{thread.subplebbitAddress}
|
||||
<OfflineIndicator key={`offline-indicator-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-mobile-sub-reply" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span key={`short-add${index}`}
|
||||
<span key={`short-add${index}`}
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content={thread.subplebbitAddress}
|
||||
data-tooltip-place="top"
|
||||
>{thread.subplebbitAddress.slice(0, 10) + "(...)"}</span>
|
||||
<OfflineIndicator key={`offline-indicator-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-mobile-sub-reply" />
|
||||
</>
|
||||
)}
|
||||
>{thread.subplebbitAddress.slice(0, 10) + "(...)"}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
<OfflineIndicator key={`offline-indicator-${index}`}
|
||||
address={thread.subplebbitAddress}
|
||||
tooltipPlace="top"
|
||||
className="offline-mobile-sub-reply" />
|
||||
</span>
|
||||
<span key={`mob-dt-${index}`} className="date-time-mobile post-number-mobile">
|
||||
{getDate(reply.timestamp)}
|
||||
|
||||
Reference in New Issue
Block a user