mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
chore: set new features behind feature flags
This commit is contained in:
parent
c1e0e65823
commit
3074db0a21
1 changed files with 26 additions and 22 deletions
|
@ -4,7 +4,8 @@ import {
|
||||||
MainSide,
|
MainSide,
|
||||||
Title,
|
Title,
|
||||||
} from '@roleypoly/design-system/molecules/server-utilities/ServerUtilities.styled';
|
} from '@roleypoly/design-system/molecules/server-utilities/ServerUtilities.styled';
|
||||||
import { GuildData } from '@roleypoly/types';
|
import { hasFeature } from '@roleypoly/misc-utils/hasFeature';
|
||||||
|
import { Features, GuildData } from '@roleypoly/types';
|
||||||
import { GoArchive, GoChevronRight, GoReport, GoShield, GoSync } from 'react-icons/go';
|
import { GoArchive, GoChevronRight, GoReport, GoShield, GoSync } from 'react-icons/go';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -29,27 +30,30 @@ const Utility = (props: {
|
||||||
|
|
||||||
export const ServerUtilities = (props: Props) => (
|
export const ServerUtilities = (props: Props) => (
|
||||||
<div>
|
<div>
|
||||||
{/* <LargeText>Server Utilities</LargeText> */}
|
{hasFeature(props.guildData.features, Features.AccessControl) && (
|
||||||
<Utility
|
<Utility
|
||||||
title={
|
title={
|
||||||
<>
|
<>
|
||||||
<GoShield />
|
<GoShield />
|
||||||
Access Control
|
Access Control
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
description="Set up who can use Roleypoly in your server"
|
description="Set up who can use Roleypoly in your server"
|
||||||
link={`/s/${props.guildData.id}/edit/access-control`}
|
link={`/s/${props.guildData.id}/edit/access-control`}
|
||||||
/>
|
/>
|
||||||
<Utility
|
)}
|
||||||
title={
|
{hasFeature(props.guildData.features, Features.AuditLogging) && (
|
||||||
<>
|
<Utility
|
||||||
<GoReport />
|
title={
|
||||||
Audit Logging
|
<>
|
||||||
</>
|
<GoReport />
|
||||||
}
|
Audit Logging
|
||||||
description="Setup audit logging via a Discord webhook"
|
</>
|
||||||
link={`/s/${props.guildData.id}/edit/audit-logging`}
|
}
|
||||||
/>
|
description="Setup audit logging via a Discord webhook"
|
||||||
|
link={`/s/${props.guildData.id}/edit/audit-logging`}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Utility
|
<Utility
|
||||||
title={
|
title={
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Add table
Reference in a new issue