From 2d88463453abfad1e9e45bbd6cdbcd5824a7e770 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 14 Oct 2024 22:09:47 +0300 Subject: Remove top padding from shell, move down into individual screens (#5548) --- src/view/screens/DebugMod.tsx | 577 ++++++++++++++++++++++-------------------- 1 file changed, 297 insertions(+), 280 deletions(-) (limited to 'src/view/screens/DebugMod.tsx') diff --git a/src/view/screens/DebugMod.tsx b/src/view/screens/DebugMod.tsx index d83623adc..b87fc8683 100644 --- a/src/view/screens/DebugMod.tsx +++ b/src/view/screens/DebugMod.tsx @@ -21,6 +21,7 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useGlobalLabelStrings} from '#/lib/moderation/useGlobalLabelStrings' +import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' import {moderationOptsOverrideContext} from '#/state/preferences/moderation-opts' import {FeedNotification} from '#/state/queries/notifications/types' import { @@ -28,7 +29,6 @@ import { shouldFilterNotif, } from '#/state/queries/notifications/util' import {useSession} from '#/state/session' -import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types' import {CenteredView, ScrollView} from '#/view/com/util/Views' import {ProfileHeaderStandard} from '#/screens/Profile/Header/ProfileHeaderStandard' import {atoms as a, useTheme} from '#/alf' @@ -41,6 +41,7 @@ import { ChevronBottom_Stroke2_Corner0_Rounded as ChevronBottom, ChevronTop_Stroke2_Corner0_Rounded as ChevronTop, } from '#/components/icons/Chevron' +import * as Layout from '#/components/Layout' import {H1, H3, P, Text} from '#/components/Typography' import {ScreenHider} from '../../components/moderation/ScreenHider' import {FeedItem as NotifFeedItem} from '../com/notifications/FeedItem' @@ -264,309 +265,325 @@ export const DebugModScreen = ({}: NativeStackScreenProps< }, [post, modOpts]) return ( - - - -

Moderation states

- - - - - Label - - - Block - - - Mute - - - - {scenario[0] === 'label' && ( - <> - - - - {LABEL_VALUES.map(labelValue => { - let targetFixed = target[0] - if ( - targetFixed !== 'account' && - targetFixed !== 'profile' - ) { - targetFixed = 'content' - } - const disabled = - isSelfLabel && - LABELS[labelValue].flags.includes('no-self') - return ( - - - {labelValue} - - ) - })} - - - Custom label - - - - - {label[0] === 'custom' ? ( - - ) : ( - <> - - - - )} - - - - + + + + +

+ Moderation states +

+ + + + + Label + + + Block + + + Mute + + + + {scenario[0] === 'label' && ( + <> + - - - - Target is me - - - - Following target - - - - Self label - - - - Adult disabled - - - - Logged out + type="radio" + values={label} + onChange={setLabel}> + + {LABEL_VALUES.map(labelValue => { + let targetFixed = target[0] + if ( + targetFixed !== 'account' && + targetFixed !== 'profile' + ) { + targetFixed = 'content' + } + const disabled = + isSelfLabel && + LABELS[labelValue].flags.includes('no-self') + return ( + + + {labelValue} + + ) + })} + + + Custom label - {LABELS[label[0] as keyof typeof LABELS]?.configurable !== - false && ( - - - Preference - - - + ) : ( + <> + + + + )} + + + + + + + + + Target is me + + + + Following target + + + + Self label + + + + Adult disabled + + + + Logged out + + + + + {LABELS[label[0] as keyof typeof LABELS]?.configurable !== + false && ( + + - + Preference + + + + + + Hide + + + + Warn + + + + Ignore + + + + + )} + + + + + + + Target + + + + + + + Account + + - Hide + Profile - + - Warn + Post - + - Ignore + Embed - )} -
-
- - - - - Target - - - - - - - Account - - - - Profile - - - - Post - - - - Embed - - - - - - )} - - - - - - - - Post - - - Notifications - - - Account - - - Data - - - - - {view[0] === 'post' && ( - <> - - - - - - - - - - )} - - {view[0] === 'notifications' && ( - <> - - - - - )} - {view[0] === 'account' && ( - <> - - - - - - - )} + + + + + + + Post + + + Notifications + + + Account + + + Data + + + + + {view[0] === 'post' && ( + <> + + + + + + + + + + )} + + {view[0] === 'notifications' && ( + <> + + + + + + + )} + + {view[0] === 'account' && ( + <> + + - {view[0] === 'data' && ( - <> - - - - - - - )} - + + + + )} + + {view[0] === 'data' && ( + <> + + + + + + + )} + - -
-
-
+ + + + + ) } -- cgit 1.4.1