diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-03-21 03:07:16 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 06:07:16 +0000 |
commit | 586b26d2d4736e401beba41a29cf03d27e69ca7f (patch) | |
tree | 234bcc6edc597ca976e55c7db22c0aa6c590dbe4 /src/plugins/showHiddenChannels/components | |
parent | d482d33d6f93632b1277524efc5aa392f596f095 (diff) | |
download | Vencord-586b26d2d4736e401beba41a29cf03d27e69ca7f.tar.gz Vencord-586b26d2d4736e401beba41a29cf03d27e69ca7f.tar.bz2 Vencord-586b26d2d4736e401beba41a29cf03d27e69ca7f.zip |
Fixes and ShowHiddenChannels improvements (#634)
~ Fixes #630
~ Fixes #618
Diffstat (limited to 'src/plugins/showHiddenChannels/components')
-rw-r--r-- | src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx index 01bc3a7..d2adbb0 100644 --- a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx +++ b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx @@ -20,10 +20,12 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { LazyComponent } from "@utils/misc"; import { formatDuration } from "@utils/text"; import { find, findByPropsLazy } from "@webpack"; -import { FluxDispatcher, GuildMemberStore, GuildStore, moment, Parser, SnowflakeUtils, Text, Timestamp, Tooltip } from "@webpack/common"; -import { Channel } from "discord-types/general"; +import { FluxDispatcher, GuildMemberStore, GuildStore, moment, Parser, PermissionStore, SnowflakeUtils, Text, Timestamp, Tooltip } from "@webpack/common"; +import type { Channel } from "discord-types/general"; import type { ComponentType } from "react"; +import { VIEW_CHANNEL } from ".."; + enum SortOrderTypes { LATEST_ACTIVITY = 0, @@ -167,7 +169,7 @@ function HiddenChannelLockScreen({ channel }: { channel: ExtendedChannel; }) { <img className="shc-lock-screen-logo" src={HiddenChannelLogo} /> <div className="shc-lock-screen-heading-container"> - <Text variant="heading-xxl/bold">This is a hidden {ChannelTypesToChannelNames[type]} channel.</Text> + <Text variant="heading-xxl/bold">This is a {!PermissionStore.can(VIEW_CHANNEL, channel) ? "hidden" : "locked"} {ChannelTypesToChannelNames[type]} channel.</Text> {channel.isNSFW() && <Tooltip text="NSFW"> {({ onMouseLeave, onMouseEnter }) => ( |