mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
update mod queue styling
This commit is contained in:
@@ -53,11 +53,11 @@
|
|||||||
|
|
||||||
.tableHeader {
|
.tableHeader {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 8px;
|
padding: 5px;
|
||||||
border-bottom: var(--mod-queue-header-border-bottom);
|
border-bottom: var(--mod-queue-header-border-bottom);
|
||||||
background: var(--mod-queue-header-background-color);
|
background: var(--mod-queue-header-background-color);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 13px;
|
font-size: 9pt;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,26 +97,42 @@
|
|||||||
/* ModQueueRow styles */
|
/* ModQueueRow styles */
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 4px 8px;
|
padding: 2px;
|
||||||
border-top: none;
|
border: none;
|
||||||
border-left: none;
|
|
||||||
border-right: none;
|
|
||||||
border-bottom: var(--mod-queue-row-border-bottom);
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
background-color: var(--mod-queue-row-background-color);
|
|
||||||
color: var(--body-font-color);
|
color: var(--body-font-color);
|
||||||
font-size: 13px;
|
font-size: 9pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row:hover {
|
/* Odd rows - theme-specific background colors */
|
||||||
background-color: var(--mod-queue-row-hover-background-color);
|
:global(body.yotsuba) .rowOdd {
|
||||||
|
background-color: #ede2d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(body.yotsuba-b) .rowOdd {
|
||||||
|
background-color: #e0e5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(body.futaba) .rowOdd {
|
||||||
|
background-color: #ede2d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(body.burichan) .rowOdd {
|
||||||
|
background-color: #e0e5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(body.tomorrow) .rowOdd {
|
||||||
|
background-color: rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(body.photon) .rowOdd {
|
||||||
|
background-color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.board {
|
.board {
|
||||||
@@ -147,7 +163,6 @@
|
|||||||
width: auto;
|
width: auto;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: var(--mod-queue-time-color);
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,12 +47,13 @@ const ModQueueFooter = ({ hasMore, subplebbitAddresses }: ModQueueFooterProps) =
|
|||||||
interface ModQueueRowProps {
|
interface ModQueueRowProps {
|
||||||
comment: Comment;
|
comment: Comment;
|
||||||
showBoardColumn?: boolean;
|
showBoardColumn?: boolean;
|
||||||
|
isOdd?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track which action was initiated to show appropriate completion message
|
// Track which action was initiated to show appropriate completion message
|
||||||
type ModerationAction = 'approve' | 'reject' | null;
|
type ModerationAction = 'approve' | 'reject' | null;
|
||||||
|
|
||||||
const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) => {
|
const ModQueueRow = ({ comment, showBoardColumn = false, isOdd = false }: ModQueueRowProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { getAlertThresholdSeconds } = useModQueueStore();
|
const { getAlertThresholdSeconds } = useModQueueStore();
|
||||||
const [initiatedAction, setInitiatedAction] = useState<ModerationAction>(null);
|
const [initiatedAction, setInitiatedAction] = useState<ModerationAction>(null);
|
||||||
@@ -191,8 +192,8 @@ const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) =>
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.row}>
|
<div className={`${styles.row} ${isOdd ? styles.rowOdd : ''}`}>
|
||||||
<div className={styles.number}>{number ?? '—'}</div>
|
<div className={styles.number}>{number ?? 'N/A'}</div>
|
||||||
{showBoardColumn && <div className={styles.board}>{boardPath ? <Link to={`/${boardPath}`}>/{boardPath}/</Link> : <span>—</span>}</div>}
|
{showBoardColumn && <div className={styles.board}>{boardPath ? <Link to={`/${boardPath}`}>/{boardPath}/</Link> : <span>—</span>}</div>}
|
||||||
<div className={styles.excerpt}>
|
<div className={styles.excerpt}>
|
||||||
{postUrl ? (
|
{postUrl ? (
|
||||||
@@ -524,7 +525,7 @@ export const ModQueueView = ({ boardIdentifier: propBoardIdentifier }: ModQueueV
|
|||||||
data={feed}
|
data={feed}
|
||||||
totalCount={feed.length}
|
totalCount={feed.length}
|
||||||
endReached={loadMore}
|
endReached={loadMore}
|
||||||
itemContent={(index, comment) => <ModQueueRow key={comment.cid} comment={comment} showBoardColumn={showBoardColumn} />}
|
itemContent={(index, comment) => <ModQueueRow key={comment.cid} comment={comment} showBoardColumn={showBoardColumn} isOdd={index % 2 === 1} />}
|
||||||
components={footerComponents}
|
components={footerComponents}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user