mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-29 00:14:23 -04:00
ShowMeYourName: ShowGradient Setting
This commit is contained in:
parent
9e588eeb77
commit
24787d33ce
2 changed files with 15 additions and 3 deletions
|
@ -66,6 +66,11 @@ const settings = definePluginSettings({
|
|||
description: "Show usernames in emoji reactions",
|
||||
restartNeeded: true
|
||||
},
|
||||
showGradient: {
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
description: "Whether to show gradient for suffix",
|
||||
},
|
||||
});
|
||||
|
||||
function getUsername(user: any, guildId: string): string {
|
||||
|
@ -81,7 +86,7 @@ function getUsername(user: any, guildId: string): string {
|
|||
export default definePlugin({
|
||||
name: "ShowMeYourName",
|
||||
description: "Display usernames next to nicks, or no nicks at all",
|
||||
authors: [Devs.Rini, Devs.TheKodeToad],
|
||||
authors: [Devs.Rini, Devs.TheKodeToad, Devs.nyx],
|
||||
patches: [
|
||||
{
|
||||
find: '"BaseUsername"',
|
||||
|
@ -130,14 +135,16 @@ export default definePlugin({
|
|||
const { nick } = author;
|
||||
const prefix = withMentionPrefix ? "@" : "";
|
||||
|
||||
const classes = settings.store.showGradient ? "vc-smyn-suffix" : "vc-smyn-suffix vc-smyn-hide-gradient";
|
||||
|
||||
if (isRepliedMessage && !settings.store.inReplies || username.toLowerCase() === nick.toLowerCase())
|
||||
return <>{prefix}{nick}</>;
|
||||
|
||||
if (settings.store.mode === "user-nick")
|
||||
return <>{prefix}{username} <span className="vc-smyn-suffix">{nick}</span></>;
|
||||
return <>{prefix}{username} <span className={classes}>{nick}</span></>;
|
||||
|
||||
if (settings.store.mode === "nick-user")
|
||||
return <>{prefix}{nick} <span className="vc-smyn-suffix">{username}</span></>;
|
||||
return <>{prefix}{nick} <span className={classes}>{username}</span></>;
|
||||
|
||||
return <>{prefix}{username}</>;
|
||||
} catch {
|
||||
|
|
|
@ -9,3 +9,8 @@
|
|||
.vc-smyn-suffix::after {
|
||||
content: ")";
|
||||
}
|
||||
|
||||
.vc-smyn-hide-gradient {
|
||||
-webkit-text-fill-color: initial;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue