diff --git a/src/components/common/ServerHeader.tsx b/src/components/common/ServerHeader.tsx index e1d816f6..6c384290 100644 --- a/src/components/common/ServerHeader.tsx +++ b/src/components/common/ServerHeader.tsx @@ -4,7 +4,7 @@ import { observer } from "mobx-react-lite"; import { Link } from "react-router-dom"; import { ServerPermission } from "revolt.js/dist/api/permissions"; import { Server } from "revolt.js/dist/maps/Servers"; -import styled from "styled-components"; +import styled, { css } from "styled-components"; import { Text } from "preact-i18n"; @@ -17,14 +17,30 @@ interface Props { server: Server; } -const ServerBanner = styled.div` +interface Props { + background?: boolean; +} + +const ServerBanner = styled.div` background-color: var(--secondary-header); - //height: 120px; //USE IF SERVER BANNER IS APPLIED flex-shrink: 0; display: flex; flex-direction: column; justify-content: end; + ${(props) => + props.background && + css` + height: 120px; + .container { + background: linear-gradient( + 0deg, + var(--secondary-background), + transparent + ); + } + `} + .container { height: 48px; display: flex; @@ -49,76 +65,80 @@ export default observer(({ server }: Props) => { const bannerURL = server.generateBannerURL({ width: 480 }); return ( -
- -
-
- {server.flags && server.flags & 1 ? ( - - } - placement={"bottom-start"}> - - +
+
+ {server.flags && server.flags & 1 ? ( + + } + placement={"bottom-start"}> + + + + + + ) : undefined} + {server.flags && server.flags & 2 ? ( + + } + placement={"bottom-start"}> + + + + - - - - ) : undefined} - {server.flags && server.flags & 2 ? ( - - } - placement={"bottom-start"}> - - - - - - - - ) : undefined} - -
{server.name}
- {(server.permission & ServerPermission.ManageServer) > - 0 && ( -
- - - - - -
- )} + + + + ) : undefined} - - +
{server.name}
+ {(server.permission & ServerPermission.ManageServer) > 0 && ( +
+ + + + + +
+ )} + + /*