stuff
This commit is contained in:
parent
973d9a6baf
commit
0ded0824a5
|
@ -250,7 +250,7 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
processChannelEditorContainer (e) {
|
||||
if (!e.instance.props.disabled && e.instance.props.channel && changedChannels[e.instance.props.channel.id] && (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) && this.settings.places.chatTextarea) {
|
||||
if (!e.instance.props.disabled && e.instance.props.channel && changedChannels[e.instance.props.channel.id] && (e.instance.props.type == BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.SIDEBAR) && this.settings.places.chatTextarea) {
|
||||
if (changedChannels[e.instance.props.channel.id].name) e.instance.props.placeholder = BDFDB.LanguageUtils.LanguageStringsFormat("TEXTAREA_PLACEHOLDER", `#${changedChannels[e.instance.props.channel.id].name}`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -484,7 +484,7 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
processChannelEditorContainer (e) {
|
||||
if (!e.instance.props.disabled && e.instance.props.channel && e.instance.props.channel.isDM() && (e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.LibraryComponents.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY) && this.settings.places.chatTextarea) {
|
||||
if (!e.instance.props.disabled && e.instance.props.channel && e.instance.props.channel.isDM() && (e.instance.props.type == BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL_WITH_ACTIVITY) && this.settings.places.chatTextarea) {
|
||||
let user = BDFDB.LibraryStores.UserStore.getUser(e.instance.props.channel.recipients[0]);
|
||||
if (user) e.instance.props.placeholder = BDFDB.LanguageUtils.LanguageStringsFormat("TEXTAREA_PLACEHOLDER", `@${changedUsers[user.id] && changedUsers[user.id].name || user.username}`);
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
processChannelTextAreaContainer (e) {
|
||||
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) {
|
||||
if (e.instance.props.type == BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.DiscordConstants.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,
|
||||
|
@ -157,7 +157,7 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
processChannelEditorContainer (e) {
|
||||
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) {
|
||||
if (e.instance.props.type == BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.DiscordConstants.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();
|
||||
|
|
|
@ -676,7 +676,7 @@ module.exports = (_ => {
|
|||
}
|
||||
|
||||
processChannelTextAreaButtons (e) {
|
||||
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) {
|
||||
if (this.settings.general.addTranslateButton && (e.instance.props.type == BDFDB.DiscordConstants.ChannelTextAreaTypes.NORMAL || e.instance.props.type == BDFDB.DiscordConstants.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, {
|
||||
guildId: e.instance.props.channel.guild_id ? e.instance.props.channel.guild_id : "@me",
|
||||
channelId: e.instance.props.channel.id
|
||||
|
|
Loading…
Reference in New Issue