mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Fixed #181
This commit is contained in:
@@ -7,7 +7,7 @@ const OfflineIndicator = ({ address, className, tooltipPlace }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!isOnline && (
|
{true && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
{" "}
|
||||||
<img
|
<img
|
||||||
|
|||||||
@@ -32,13 +32,22 @@ export const Threads = styled.div`
|
|||||||
|
|
||||||
.thread-icons {
|
.thread-icons {
|
||||||
display: inline;
|
display: inline;
|
||||||
height: 16px;
|
|
||||||
margin: 2px 0 0 -101px;
|
|
||||||
position: absolute;
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
height: 16px;
|
||||||
|
position:absolute;
|
||||||
|
margin: 6px 60px 0 0px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
top:0;
|
||||||
|
right:0;
|
||||||
|
z-index:4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thread-icon-has-display{
|
||||||
|
transform: translate(68px, -4px);
|
||||||
|
scale: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.offline-icon {
|
.offline-icon {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
|
|||||||
@@ -378,7 +378,11 @@ const AllCatalog = () => {
|
|||||||
) : null}
|
) : null}
|
||||||
</Link>
|
</Link>
|
||||||
) : null}
|
) : null}
|
||||||
<div key={`ti-`} className="thread-icons" >
|
<div key={`ti-`} className={`thread-icons ${(commentMediaInfo && (
|
||||||
|
commentMediaInfo.type === 'image' ||
|
||||||
|
commentMediaInfo.type === 'video' ||
|
||||||
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
|
commentMediaInfo.thumbnail))) ? "thread-icon-has-display" :""}`} >
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
commentMediaInfo.type === 'video' ||
|
commentMediaInfo.type === 'video' ||
|
||||||
@@ -386,7 +390,7 @@ const AllCatalog = () => {
|
|||||||
commentMediaInfo.thumbnail))) ? (
|
commentMediaInfo.thumbnail))) ? (
|
||||||
<OfflineIndicator
|
<OfflineIndicator
|
||||||
address={thread.subplebbitAddress}
|
address={thread.subplebbitAddress}
|
||||||
className="thread-icon offline-icon"
|
className={`thread-icon offline-icon `}
|
||||||
tooltipPlace="top" />
|
tooltipPlace="top" />
|
||||||
) : (
|
) : (
|
||||||
<OfflineIndicator
|
<OfflineIndicator
|
||||||
|
|||||||
@@ -351,7 +351,8 @@ const SubscriptionsCatalog = () => {
|
|||||||
src={commentMediaInfo.url} alt={commentMediaInfo.type}
|
src={commentMediaInfo.url} alt={commentMediaInfo.type}
|
||||||
onError={(e) => {
|
onError={(e) => {
|
||||||
e.target.src = fallbackImgUrl
|
e.target.src = fallbackImgUrl
|
||||||
e.target.onerror = null;}} />
|
e.target.onerror = null;
|
||||||
|
}} />
|
||||||
) : null}
|
) : null}
|
||||||
{commentMediaInfo?.type === "video" ? (
|
{commentMediaInfo?.type === "video" ? (
|
||||||
<video className="card" key={`fti-`}
|
<video className="card" key={`fti-`}
|
||||||
@@ -368,7 +369,11 @@ const SubscriptionsCatalog = () => {
|
|||||||
) : null}
|
) : null}
|
||||||
</Link>
|
</Link>
|
||||||
) : null}
|
) : null}
|
||||||
<div key={`ti-`} className="thread-icons" >
|
<div key={`ti-`} className={`thread-icons ${(commentMediaInfo && (
|
||||||
|
commentMediaInfo.type === 'image' ||
|
||||||
|
commentMediaInfo.type === 'video' ||
|
||||||
|
(commentMediaInfo.type === 'webpage' &&
|
||||||
|
commentMediaInfo.thumbnail))) ? "thread-icon-has-display" : ""}`} >
|
||||||
{(commentMediaInfo && (
|
{(commentMediaInfo && (
|
||||||
commentMediaInfo.type === 'image' ||
|
commentMediaInfo.type === 'image' ||
|
||||||
commentMediaInfo.type === 'video' ||
|
commentMediaInfo.type === 'video' ||
|
||||||
@@ -396,9 +401,11 @@ const SubscriptionsCatalog = () => {
|
|||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
<PostMenu
|
<PostMenu
|
||||||
style={{ display: isHoveringOnThread === thread.cid ? 'inline-block' : 'none',
|
style={{
|
||||||
|
display: isHoveringOnThread === thread.cid ? 'inline-block' : 'none',
|
||||||
position: 'absolute', lineHeight: '1em', marginTop: '-1px', outline: 'none',
|
position: 'absolute', lineHeight: '1em', marginTop: '-1px', outline: 'none',
|
||||||
zIndex: '999'}}
|
zIndex: '999'
|
||||||
|
}}
|
||||||
key={`pmb-`}
|
key={`pmb-`}
|
||||||
title="Post menu"
|
title="Post menu"
|
||||||
ref={el => {
|
ref={el => {
|
||||||
@@ -422,9 +429,11 @@ const SubscriptionsCatalog = () => {
|
|||||||
<PostMenuCatalog selectedStyle={selectedStyle}
|
<PostMenuCatalog selectedStyle={selectedStyle}
|
||||||
ref={el => { postMenuCatalogRef.current = el }}
|
ref={el => { postMenuCatalogRef.current = el }}
|
||||||
onClick={(event) => event.stopPropagation()}
|
onClick={(event) => event.stopPropagation()}
|
||||||
style={{position: "absolute",
|
style={{
|
||||||
|
position: "absolute",
|
||||||
top: menuPosition.top + 7,
|
top: menuPosition.top + 7,
|
||||||
left: menuPosition.left}}>
|
left: menuPosition.left
|
||||||
|
}}>
|
||||||
<div className={`post-menu-thread post-menu-thread-${thread.cid}`}
|
<div className={`post-menu-thread post-menu-thread-${thread.cid}`}
|
||||||
style={{ display: openMenuCid === thread.cid ? 'block' : 'none' }}
|
style={{ display: openMenuCid === thread.cid ? 'block' : 'none' }}
|
||||||
>
|
>
|
||||||
@@ -571,7 +580,7 @@ const SubscriptionsCatalog = () => {
|
|||||||
<span className="boardList">
|
<span className="boardList">
|
||||||
[
|
[
|
||||||
<Link to={`/p/all`} onClick={() => window.scrollTo(0, 0)}>All</Link>
|
<Link to={`/p/all`} onClick={() => window.scrollTo(0, 0)}>All</Link>
|
||||||
/
|
/
|
||||||
<Link to={`/p/subscriptions`} onClick={() => window.scrollTo(0, 0)}>Subscriptions</Link>
|
<Link to={`/p/subscriptions`} onClick={() => window.scrollTo(0, 0)}>Subscriptions</Link>
|
||||||
] [
|
] [
|
||||||
{defaultSubplebbits.map((subplebbit, index) => (
|
{defaultSubplebbits.map((subplebbit, index) => (
|
||||||
@@ -620,7 +629,7 @@ const SubscriptionsCatalog = () => {
|
|||||||
<option key={`option-${subplebbit.address}`} value={subplebbit.address}
|
<option key={`option-${subplebbit.address}`} value={subplebbit.address}
|
||||||
>{subplebbit.title ? subplebbit.title : subplebbit.address}</option>
|
>{subplebbit.title ? subplebbit.title : subplebbit.address}</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
<span id="button-span" style={{ cursor: 'pointer' }} onClick={
|
<span id="button-span" style={{ cursor: 'pointer' }} onClick={
|
||||||
() => alert(
|
() => alert(
|
||||||
'You can create a board with the desktop version of plebchan:\nhttps://github.com/plebbit/plebchan/releases/latest\n\nIf you are comfortable with the command line, use plebbit-cli:\nhttps://github.com/plebbit/plebbit-cli\n\n'
|
'You can create a board with the desktop version of plebchan:\nhttps://github.com/plebbit/plebchan/releases/latest\n\nIf you are comfortable with the command line, use plebbit-cli:\nhttps://github.com/plebbit/plebbit-cli\n\n'
|
||||||
@@ -660,7 +669,7 @@ const SubscriptionsCatalog = () => {
|
|||||||
<hr />
|
<hr />
|
||||||
<span className="style-changer">
|
<span className="style-changer">
|
||||||
Style:
|
Style:
|
||||||
|
|
||||||
<select id="style-selector" onChange={handleStyleChange} value={selectedStyle}>
|
<select id="style-selector" onChange={handleStyleChange} value={selectedStyle}>
|
||||||
<option value="Yotsuba">Yotsuba</option>
|
<option value="Yotsuba">Yotsuba</option>
|
||||||
<option value="Yotsuba-B">Yotsuba B</option>
|
<option value="Yotsuba-B">Yotsuba B</option>
|
||||||
@@ -720,7 +729,7 @@ const SubscriptionsCatalog = () => {
|
|||||||
marginTop: "2px",
|
marginTop: "2px",
|
||||||
}}>
|
}}>
|
||||||
Style:
|
Style:
|
||||||
|
|
||||||
<select id="style-selector" onChange={handleStyleChange} value={selectedStyle}>
|
<select id="style-selector" onChange={handleStyleChange} value={selectedStyle}>
|
||||||
<option value="Yotsuba">Yotsuba</option>
|
<option value="Yotsuba">Yotsuba</option>
|
||||||
<option value="Yotsuba-B">Yotsuba B</option>
|
<option value="Yotsuba-B">Yotsuba B</option>
|
||||||
|
|||||||
Reference in New Issue
Block a user