mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 18:55:28 +00:00
make antispam rule channel list align properly
This commit is contained in:
parent
b077943e41
commit
50eda695ab
|
@ -595,53 +595,55 @@ const ServerDashboard: FunctionComponent = () => {
|
||||||
If left empty, it will run in all channels.
|
If left empty, it will run in all channels.
|
||||||
</H4>
|
</H4>
|
||||||
<UserListTypeContainer>
|
<UserListTypeContainer>
|
||||||
{
|
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
||||||
channels.map(cid => {
|
{
|
||||||
const channel: Channel = serverInfo.channels.find(c => c.id == cid && c.type == 'TEXT')
|
channels.map(cid => {
|
||||||
|| { id: cid, name: 'Unknown channel', nsfw: false, type: 'TEXT' };
|
const channel: Channel = serverInfo.channels.find(c => c.id == cid && c.type == 'TEXT')
|
||||||
return (
|
|| { id: cid, name: 'Unknown channel', nsfw: false, type: 'TEXT' };
|
||||||
<div
|
return (
|
||||||
key={cid}
|
<div
|
||||||
style={{
|
key={cid}
|
||||||
display: 'block',
|
|
||||||
margin: '4px 6px',
|
|
||||||
padding: '4px',
|
|
||||||
backgroundColor: 'var(--tertiary-background)',
|
|
||||||
borderRadius: '5px',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
src={channel.icon ?? defaultChannelIcon}
|
|
||||||
style={{
|
style={{
|
||||||
width: '32px',
|
display: 'block',
|
||||||
height: '32px',
|
margin: '4px 6px',
|
||||||
objectFit: 'cover',
|
padding: '4px',
|
||||||
borderRadius: '10%',
|
backgroundColor: 'var(--tertiary-background)',
|
||||||
verticalAlign: 'middle',
|
borderRadius: '5px',
|
||||||
display: 'inline-block',
|
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
<span
|
<img
|
||||||
style={{
|
src={channel.icon ?? defaultChannelIcon}
|
||||||
fontSize: '20px',
|
style={{
|
||||||
verticalAlign: 'middle',
|
width: '32px',
|
||||||
marginLeft: '4px',
|
height: '32px',
|
||||||
}}
|
objectFit: 'cover',
|
||||||
>{channel.name}</span>
|
borderRadius: '10%',
|
||||||
<RemoveButton onClick={() => {
|
verticalAlign: 'middle',
|
||||||
setChannels(channels.filter(c => c != cid));
|
display: 'inline-block',
|
||||||
setChannelsChanged(true);
|
}}
|
||||||
}} />
|
/>
|
||||||
</div>
|
<span
|
||||||
)
|
style={{
|
||||||
})
|
fontSize: '20px',
|
||||||
}
|
verticalAlign: 'middle',
|
||||||
<ChannelListAddField onInput={channel => {
|
marginLeft: '4px',
|
||||||
if (!channels.includes(channel.id)) {
|
}}
|
||||||
setChannels([ ...channels, channel.id ]);
|
>{channel.name}</span>
|
||||||
setChannelsChanged(true);
|
<RemoveButton onClick={() => {
|
||||||
|
setChannels(channels.filter(c => c != cid));
|
||||||
|
setChannelsChanged(true);
|
||||||
|
}} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}} />
|
<ChannelListAddField onInput={channel => {
|
||||||
|
if (!channels.includes(channel.id)) {
|
||||||
|
setChannels([ ...channels, channel.id ]);
|
||||||
|
setChannelsChanged(true);
|
||||||
|
}
|
||||||
|
}} />
|
||||||
|
</div>
|
||||||
</UserListTypeContainer>
|
</UserListTypeContainer>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in a new issue