rename plugin
This commit is contained in:
parent
a2bd885094
commit
a40850a6bd
1 changed files with 26 additions and 22 deletions
12
index.tsx
12
index.tsx
|
@ -8,13 +8,13 @@ import "./style.css";
|
||||||
|
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { ChannelStore, DateUtils, GuildStore, IconUtils, NavigationRouter, Popout, SnowflakeUtils, Text, UserStore, useStateFromStores } from "@webpack/common";
|
import { ChannelStore, DateUtils, GuildStore, IconUtils, NavigationRouter, Popout, SelectedGuildStore, SnowflakeUtils, Text, UserStore, useStateFromStores } from "@webpack/common";
|
||||||
|
|
||||||
import { ArrowSvg, checkForIconExistence, cl, ServerProfileComponent } from "./utils";
|
import { ArrowSvg, checkForIconExistence, cl, ServerProfileComponent } from "./utils";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "MoreForwardMeta",
|
name: "BetterForwardMeta",
|
||||||
description: "Show server profile under forwarded messages (if available) and always show time",
|
description: "Access server profile under forwarded messages (if available) and always show time",
|
||||||
authors: [Devs.nin0dev],
|
authors: [Devs.nin0dev],
|
||||||
ForwardFooter(message: any) {
|
ForwardFooter(message: any) {
|
||||||
const { guild_id, channel_id, message_id } = message.message.messageReference;
|
const { guild_id, channel_id, message_id } = message.message.messageReference;
|
||||||
|
@ -23,7 +23,9 @@ export default definePlugin({
|
||||||
|
|
||||||
return <div className={cl("footer")} >
|
return <div className={cl("footer")} >
|
||||||
{
|
{
|
||||||
guild_id && <Popout
|
guild_id && <>
|
||||||
|
{
|
||||||
|
guild_id !== SelectedGuildStore.getGuildId() && <Popout
|
||||||
position="top"
|
position="top"
|
||||||
renderPopout={() => <ServerProfileComponent guildId={guild_id} />}
|
renderPopout={() => <ServerProfileComponent guildId={guild_id} />}
|
||||||
>
|
>
|
||||||
|
@ -44,6 +46,8 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
</Popout>
|
</Popout>
|
||||||
}
|
}
|
||||||
|
</>
|
||||||
|
}
|
||||||
{
|
{
|
||||||
channel && <div className={cl("footer-element")} onClick={() => NavigationRouter.transitionTo(`/channels/${guild_id ?? "@me"}/${channel_id}/${message_id}`)} >
|
channel && <div className={cl("footer-element")} onClick={() => NavigationRouter.transitionTo(`/channels/${guild_id ?? "@me"}/${channel_id}/${message_id}`)} >
|
||||||
<Text variant="text-sm/medium" className={cl("footer-text")}>{(() => {
|
<Text variant="text-sm/medium" className={cl("footer-text")}>{(() => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue