This commit is contained in:
Mirco Wittrien 2022-04-30 18:18:26 +02:00
parent 753156f285
commit cd738ac0f6
3 changed files with 13 additions and 5 deletions

View File

@ -150,7 +150,7 @@ module.exports = (_ => {
}
processChannelTextAreaContainer (e) {
if (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) {
if (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "SlateCharacterCount"});
if (index > -1 && children[index].props.textValue && children[index].props.textValue.length > maxMessageLength && !this.isSlowDowned(e.instance.props.channel)) children[index] = BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCNS.textareacharcounter + BDFDB.disCN.textareacharcountererror,
@ -165,7 +165,7 @@ module.exports = (_ => {
}
processChannelEditorContainer (e) {
if (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) {
if (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) {
e.instance.props.uploadPromptCharacterCount = 999999999999999;
BDFDB.PatchUtils.patch(this, e.instance, "handlePasteItem", {instead: e2 => {
if (!e2.methodArguments[1] || e2.methodArguments[1].kind != "string") e2.callOriginalMethod();

View File

@ -2,7 +2,7 @@
* @name Translator
* @author DevilBro
* @authorId 278543574059057154
* @version 2.3.7
* @version 2.3.8
* @description Allows you to translate Messages and your outgoing Messages within Discord
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "Translator",
"author": "DevilBro",
"version": "2.3.7",
"version": "2.3.8",
"description": "Allows you to translate Messages and your outgoing Messages within Discord"
}
};
@ -657,7 +657,9 @@ module.exports = (_ => {
}
processChannelTextAreaButtons (e) {
if (this.settings.general.addTranslateButton && (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) && !e.instance.props.disabled) {
console.log(e);
console.log(this.settings.general.addTranslateButton && (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) && !e.instance.props.disabled);
if (this.settings.general.addTranslateButton && (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) && !e.instance.props.disabled) {
e.returnvalue.props.children.unshift(BDFDB.ReactUtils.createElement(TranslateButtonComponent, {
channelId: e.instance.props.channel.id
}));

View File

@ -127,6 +127,7 @@
17. NICKNAMEMODAL
18. NITROFEATUREMODAL
19. GUILDBOOSTPROGESSINFO
20. GUILDACTIVITY
11. POPOUTS
1. CONTEXTMENU
2. USERPOPOUT
@ -1927,6 +1928,11 @@ a.metadataName-1KMZtB {
fill: rgb(var(--accentcolor));
}
/* ---- 10.20. GUILDACTIVITY ---- */
.guildBoostingIconPink-1nDlMP {
color: rgb(var(--accentcolor2));
}
/* ~~~~ 11. POPOUTS ~~~~ */