mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
style(mod queue): align title with table when filter by board is not rendered
This commit is contained in:
@@ -5,6 +5,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -13,9 +22,14 @@
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.controlsLeft {
|
||||||
font-size: 1.5em;
|
display: flex;
|
||||||
font-weight: bold;
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controlsRight {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alertThresholdSetting {
|
.alertThresholdSetting {
|
||||||
@@ -270,7 +284,6 @@ span.reject:hover {
|
|||||||
|
|
||||||
/* ModQueueBoardFilter styles */
|
/* ModQueueBoardFilter styles */
|
||||||
.filterContainer {
|
.filterContainer {
|
||||||
margin-bottom: 10px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
@@ -354,6 +367,10 @@ span.reject:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -475,42 +475,63 @@ export const ModQueueView = ({ boardIdentifier: propBoardIdentifier }: ModQueueV
|
|||||||
[hasMore, subplebbitAddresses],
|
[hasMore, subplebbitAddresses],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const alertThresholdControl = (
|
||||||
|
<div className={styles.alertThresholdSetting}>
|
||||||
|
<label>
|
||||||
|
{t('alert_threshold')}:
|
||||||
|
<input
|
||||||
|
type='number'
|
||||||
|
min='1'
|
||||||
|
step={alertThresholdUnit === 'minutes' ? '1' : '1'}
|
||||||
|
value={alertThresholdValue}
|
||||||
|
onChange={(e) => setAlertThreshold(Number(e.target.value), alertThresholdUnit)}
|
||||||
|
className={styles.alertThresholdInput}
|
||||||
|
/>
|
||||||
|
<select
|
||||||
|
value={alertThresholdUnit}
|
||||||
|
onChange={(e) => {
|
||||||
|
const newUnit = e.target.value as 'hours' | 'minutes';
|
||||||
|
const newValue =
|
||||||
|
alertThresholdUnit === 'hours' && newUnit === 'minutes'
|
||||||
|
? alertThresholdValue * 60
|
||||||
|
: alertThresholdUnit === 'minutes' && newUnit === 'hours'
|
||||||
|
? Math.round(alertThresholdValue / 60)
|
||||||
|
: alertThresholdValue;
|
||||||
|
setAlertThreshold(Math.max(1, newValue), newUnit);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<option value='minutes'>{t('minutes')}</option>
|
||||||
|
<option value='hours'>{t('hours')}</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className={styles.header}>
|
{!resolvedAddress && (
|
||||||
<div className={styles.title}>{t('moderation_queue')}</div>
|
<div className={styles.header}>
|
||||||
<div className={styles.alertThresholdSetting}>
|
<div className={styles.title}>{t('moderation_queue')}</div>
|
||||||
<label>
|
|
||||||
{t('alert_threshold')}:
|
|
||||||
<input
|
|
||||||
type='number'
|
|
||||||
min='1'
|
|
||||||
step={alertThresholdUnit === 'minutes' ? '1' : '1'}
|
|
||||||
value={alertThresholdValue}
|
|
||||||
onChange={(e) => setAlertThreshold(Number(e.target.value), alertThresholdUnit)}
|
|
||||||
className={styles.alertThresholdInput}
|
|
||||||
/>
|
|
||||||
<select
|
|
||||||
value={alertThresholdUnit}
|
|
||||||
onChange={(e) => {
|
|
||||||
const newUnit = e.target.value as 'hours' | 'minutes';
|
|
||||||
const newValue =
|
|
||||||
alertThresholdUnit === 'hours' && newUnit === 'minutes'
|
|
||||||
? alertThresholdValue * 60
|
|
||||||
: alertThresholdUnit === 'minutes' && newUnit === 'hours'
|
|
||||||
? Math.round(alertThresholdValue / 60)
|
|
||||||
: alertThresholdValue;
|
|
||||||
setAlertThreshold(Math.max(1, newValue), newUnit);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<option value='minutes'>{t('minutes')}</option>
|
|
||||||
<option value='hours'>{t('hours')}</option>
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
|
|
||||||
{!resolvedAddress && <ModQueueBoardFilter subplebbits={subplebbitsWithMetadata} />}
|
<div className={styles.controls}>
|
||||||
|
{!resolvedAddress ? (
|
||||||
|
<>
|
||||||
|
<div className={styles.controlsLeft}>
|
||||||
|
<ModQueueBoardFilter subplebbits={subplebbitsWithMetadata} />
|
||||||
|
</div>
|
||||||
|
<div className={styles.controlsRight}>{alertThresholdControl}</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<div className={styles.controlsLeft}>
|
||||||
|
<div className={styles.title}>{t('moderation_queue')}</div>
|
||||||
|
</div>
|
||||||
|
<div className={styles.controlsRight}>{alertThresholdControl}</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
{feed.length === 0 && !hasMore ? (
|
{feed.length === 0 && !hasMore ? (
|
||||||
<div className={styles.empty}>{t('queue_is_empty')}</div>
|
<div className={styles.empty}>{t('queue_is_empty')}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user