diff --git a/web/src/pages/ServerDashboard/ServerDashboard.tsx b/web/src/pages/ServerDashboard/ServerDashboard.tsx index cd681a6..77b4f58 100644 --- a/web/src/pages/ServerDashboard/ServerDashboard.tsx +++ b/web/src/pages/ServerDashboard/ServerDashboard.tsx @@ -5,7 +5,6 @@ import { InputBox } from '@revoltchat/ui/lib/components/atoms/inputs/InputBox'; import { Checkbox } from '@revoltchat/ui/lib/components/atoms/inputs/Checkbox'; import { ComboBox } from '@revoltchat/ui/lib/components/atoms/inputs/ComboBox'; import { LineDivider } from '@revoltchat/ui/lib/components/atoms/layout/LineDivider'; -import { H1 } from '@revoltchat/ui/lib/components/atoms/heading/H1'; import { H3 } from '@revoltchat/ui/lib/components/atoms/heading/H3'; import { H4 } from '@revoltchat/ui/lib/components/atoms/heading/H4'; import { Icon } from '@mdi/react'; @@ -15,6 +14,7 @@ import { getAuthHeaders } from "../../utils"; import { Link, useParams } from "react-router-dom"; import defaultChannelIcon from '../../assets/channel-default-icon.svg'; import CategorySelector from '../../components/CategorySelector'; +import { CSSProperties } from 'styled-components'; type User = { id: string, username?: string, avatarURL?: string } type Channel = { id: string, name: string, icon?: string, type: 'VOICE'|'TEXT', nsfw: boolean } @@ -40,6 +40,11 @@ type AntispamRule = { message: string | null; } +const STYLE_DISABLED: CSSProperties = { + filter: 'grayscale(100%)', + pointerEvents: 'none', +} + const ServerDashboard: FunctionComponent = () => { const [category, setCategory] = useState('home'); @@ -163,7 +168,7 @@ const ServerDashboard: FunctionComponent = () => {
{category == 'home' && ( - <> +
<>

Prefix

{ - +
)} {category == 'automod' && ( @@ -366,10 +371,7 @@ const ServerDashboard: FunctionComponent = () => { style={{ display: 'flex', flexWrap: 'wrap', - ...(props.disabled ? { - filter: 'grayscale(100%)', - pointerEvents: 'none', - } : {}) + ...(props.disabled ? STYLE_DISABLED : {}) }} > {props.children}