feat: hide notifications from untrusted users

This commit is contained in:
codytseng
2025-06-01 23:00:01 +08:00
parent 587038d51a
commit c17d1b8ab5
18 changed files with 81 additions and 33 deletions

View File

@@ -16,7 +16,7 @@ const GeneralSettingsPage = forwardRef(({ index }: { index?: number }, ref) => {
const [language, setLanguage] = useState<TLanguage>(i18n.language as TLanguage)
const { themeSetting, setThemeSetting } = useTheme()
const { autoplay, setAutoplay } = useAutoplay()
const { enabled: hideUntrustedRepliesEnabled, updateEnabled: updateHideUntrustedRepliesEnabled } =
const { enabled: hideUntrustedEventsEnabled, updateEnabled: updateHideUntrustedEventsEnabled } =
useUserTrust()
const handleLanguageChange = (value: TLanguage) => {
@@ -67,16 +67,16 @@ const GeneralSettingsPage = forwardRef(({ index }: { index?: number }, ref) => {
<Switch id="autoplay" checked={autoplay} onCheckedChange={setAutoplay} />
</SettingItem>
<SettingItem>
<Label htmlFor="hide-untrusted-replies" className="text-base font-normal">
{t('Hide replies from untrusted users')}
<Label htmlFor="hide-untrusted-events" className="text-base font-normal">
{t('Hide content from untrusted users')}
<div className="text-muted-foreground">
{t('Only show replies from your followed users and the users they follow')}
{t('Only show content from your followed users and the users they follow')}
</div>
</Label>
<Switch
id="hide-untrusted-replies"
checked={hideUntrustedRepliesEnabled}
onCheckedChange={updateHideUntrustedRepliesEnabled}
id="hide-untrusted-events"
checked={hideUntrustedEventsEnabled}
onCheckedChange={updateHideUntrustedEventsEnabled}
/>
</SettingItem>
</div>