diff --git a/assets/icons/squareBehindSquare4_stroke2_corner0_rounded.svg b/assets/icons/squareBehindSquare4_stroke2_corner0_rounded.svg new file mode 100644 index 0000000000..3fa7e5d390 --- /dev/null +++ b/assets/icons/squareBehindSquare4_stroke2_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/src/components/icons/SquareBehindSquare4.tsx b/src/components/icons/SquareBehindSquare4.tsx new file mode 100644 index 0000000000..425599cbce --- /dev/null +++ b/src/components/icons/SquareBehindSquare4.tsx @@ -0,0 +1,5 @@ +import {createSinglePathSVG} from './TEMPLATE' + +export const SquareBehindSquare4_Stroke2_Corner0_Rounded = createSinglePathSVG({ + path: 'M8 8V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-5v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h5Zm1 8a1 1 0 0 1-1-1v-5H4v10h10v-4H9Z', +}) diff --git a/src/screens/Moderation/index.tsx b/src/screens/Moderation/index.tsx index 620133f1ad..8ed51dd5cb 100644 --- a/src/screens/Moderation/index.tsx +++ b/src/screens/Moderation/index.tsx @@ -26,11 +26,12 @@ import { } from '#/state/queries/preferences' import {useModServicesDetailedInfoQuery} from '#/state/queries/modservice' -import {useTheme, atoms as a, useBreakpoints} from '#/alf' +import {useTheme, atoms as a, useBreakpoints, native} from '#/alf' import {Divider} from '#/components/Divider' import {CircleBanSign_Stroke2_Corner0_Rounded as CircleBanSign} from '#/components/icons/CircleBanSign' import {Group3_Stroke2_Corner0_Rounded as Group} from '#/components/icons/Group' import {Person_Stroke2_Corner0_Rounded as Person} from '#/components/icons/Person' +import {SquareBehindSquare4_Stroke2_Corner0_Rounded as SquareBehindSquare} from '#/components/icons/SquareBehindSquare4' import {Text} from '#/components/Typography' import * as Toggle from '#/components/forms/Toggle' import * as ToggleButton from '#/components/forms/ToggleButton' @@ -38,7 +39,7 @@ import {InlineLink, Link} from '#/components/Link' import {Loader} from '#/components/Loader' import {useLabelGroupStrings} from '#/lib/moderation/useLabelGroupStrings' import * as Dialog from '#/components/Dialog' -import {Button} from '#/components/Button' +import {Button, ButtonText, ButtonIcon} from '#/components/Button' import { getModerationServiceTitle, useConfigurableLabelGroups, @@ -365,79 +366,90 @@ function LabelGroup({ {!!mods.length && ( - + + + {mods.map(mod => { + const modservicePreferences = + preferences.moderationOpts.mods.find( + ({did}) => did === mod.creator.did, + ) + const labelGroupEnabled = + !modservicePreferences?.disabledLabelGroups?.includes( + labelGroup, + ) + const isLabelerEnabled = modservicePreferences?.enabled + const enabled = labelGroupEnabled && isLabelerEnabled + return ( + + + + {getModerationServiceTitle({ + displayName: mod.creator.displayName, + handle: mod.creator.handle, + })} + + + ) + })} + + )}