mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 03:33:36 -05:00
Remove ColorMessage Temp
This commit is contained in:
parent
6af7e45336
commit
f22da4d6ed
3 changed files with 1 additions and 76 deletions
|
@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
|
|
||||||
### Extra included plugins
|
### Extra included plugins
|
||||||
<details>
|
<details>
|
||||||
<summary>127 additional plugins</summary>
|
<summary>126 additional plugins</summary>
|
||||||
|
|
||||||
- AllCallTimers by MaxHerbold & D3SOX
|
- AllCallTimers by MaxHerbold & D3SOX
|
||||||
- AltKrispSwitch by newwares
|
- AltKrispSwitch by newwares
|
||||||
|
@ -28,7 +28,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- ChannelTabs by TheSun, TheKodeToad, keifufu, Nickyux
|
- ChannelTabs by TheSun, TheKodeToad, keifufu, Nickyux
|
||||||
- CleanChannelName by AutumnVN
|
- CleanChannelName by AutumnVN
|
||||||
- ClientSideBlock by Samwich
|
- ClientSideBlock by Samwich
|
||||||
- ColorMessage by Kyuuhachi
|
|
||||||
- CommandPalette by Ethan
|
- CommandPalette by Ethan
|
||||||
- CopyUserMention by Cortex & castdrian
|
- CopyUserMention by Cortex & castdrian
|
||||||
- CustomSounds by TheKodeToad & SpikeHD
|
- CustomSounds by TheKodeToad & SpikeHD
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
/*
|
|
||||||
* Vencord, a Discord client mod
|
|
||||||
* Copyright (c) 2024 Vendicated and contributors
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { definePluginSettings } from "@api/Settings";
|
|
||||||
import * as Styles from "@api/Styles";
|
|
||||||
import { makeRange } from "@components/PluginSettings/components";
|
|
||||||
import { Devs } from "@utils/constants";
|
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
|
||||||
import { findByCodeLazy } from "@webpack";
|
|
||||||
|
|
||||||
const useMessageAuthor = findByCodeLazy('"Result cannot be null because the message is not null"');
|
|
||||||
|
|
||||||
import style from "./style.css?managed";
|
|
||||||
|
|
||||||
export const settings = definePluginSettings({
|
|
||||||
saturation: {
|
|
||||||
type: OptionType.SLIDER,
|
|
||||||
description: "Message color saturation",
|
|
||||||
markers: makeRange(0, 100, 10),
|
|
||||||
default: 20,
|
|
||||||
onChange() {
|
|
||||||
updateStyle();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
function updateStyle() {
|
|
||||||
(Styles.requireStyle(style).dom!.sheet!.cssRules[0] as CSSStyleRule)
|
|
||||||
.style.setProperty("--98-message-color-saturation", `${settings.store.saturation}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default definePlugin({
|
|
||||||
name: "ColorMessage",
|
|
||||||
description: "Colors message content with author's role color",
|
|
||||||
authors: [Devs.Kyuuhachi],
|
|
||||||
settings,
|
|
||||||
|
|
||||||
patches: [
|
|
||||||
{
|
|
||||||
find: '.Messages.MESSAGE_EDITED,")"',
|
|
||||||
replacement: {
|
|
||||||
match: /(?<=isUnsupported\]:(\i)\.isUnsupported\}\),)(?=children:\[)/,
|
|
||||||
replace: 'style:{"--98-message-color":$self.useMessageColor($1)},'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
useMessageColor(messageId: string) {
|
|
||||||
return useMessageAuthor(messageId).colorString;
|
|
||||||
},
|
|
||||||
|
|
||||||
start() {
|
|
||||||
Styles.enableStyle(style);
|
|
||||||
updateStyle();
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
Styles.disableStyle(style);
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* stylelint-disable custom-property-pattern */
|
|
||||||
:root {
|
|
||||||
--98-message-color-saturation: /*DYNAMIC*/;
|
|
||||||
}
|
|
||||||
|
|
||||||
div[class*="messageContent_"] {
|
|
||||||
color: color-mix(
|
|
||||||
in lab,
|
|
||||||
var(--98-message-color, var(--text-normal)) calc(var(--98-message-color-saturation) * 1%),
|
|
||||||
var(--text-normal)
|
|
||||||
)
|
|
||||||
}
|
|
Loading…
Reference in a new issue