Skip to content

Commit

Permalink
Option to blur message links from NSFW channels
Browse files Browse the repository at this point in the history
  • Loading branch information
lolsuffocate committed Dec 24, 2024
1 parent 3f04f5f commit 22c94fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/messageLinkEmbeds/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { definePluginSettings } from "@api/Settings";
import { getUserSettingLazy } from "@api/UserSettings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants.js";
import { getIntlMessage } from "@utils/discord";
import { classes } from "@utils/misc";
import { Queue } from "@utils/Queue";
import definePlugin, { OptionType } from "@utils/types";
Expand All @@ -31,7 +32,6 @@ import {
ChannelStore,
Constants,
GuildStore,
i18n,
Icons,
IconUtils,
MessageStore,
Expand Down Expand Up @@ -309,7 +309,7 @@ function Spoiler(props: { children: JSX.Element }) : JSX.Element {

return (
<div
aria-label={!visible && i18n.Messages.EXPLICIT_CONTENT_WARNING_TOOLTIP}
aria-label={!visible && getIntlMessage("EXPLICIT_CONTENT_WARNING_TOOLTIP")}
aria-expanded={visible}
className={classes(spoilerContainer, !visible && classes(hidden, spoilerContent))}
role={visible ? "presentation" : "button"}
Expand All @@ -320,7 +320,7 @@ function Spoiler(props: { children: JSX.Element }) : JSX.Element {
<Icons.ImageWarningIcon size="lg" color="white"/>
<Text variant="text-sm/normal" color="always-white"
className={classes(explicitContentWarningText)}>
{i18n.Messages.EXPLICIT_CONTENT_WARNING}
{getIntlMessage("EXPLICIT_CONTENT_WARNING")}
</Text>
</div>
}
Expand All @@ -332,7 +332,7 @@ function Spoiler(props: { children: JSX.Element }) : JSX.Element {
</div>
<div className={obscureButtonContainer}>
<Icons.Clickable onClick={() => setVisible(!visible)}
aria-label={i18n.Messages.EXPLICIT_CONTENT_BUTTON_TOOLTIP}
aria-label={getIntlMessage("EXPLICIT_CONTENT_BUTTON_TOOLTIP")}
className={obscureHoverButton}>
{visible ? <Icons.EyeIcon size="md" color="currentColor"/> :
<Icons.EyeSlashIcon size="md" color="currentColor"/>}
Expand Down

0 comments on commit 22c94fb

Please sign in to comment.