stuff
This commit is contained in:
parent
5d3d39f006
commit
0a0ef1c5cf
|
@ -4129,10 +4129,10 @@
|
|||
chatCounter: "chatCounter-XOMPsh",
|
||||
counterAdded: "charCounterAdded-zz9O4t",
|
||||
editCounter: "editCounter-pNT1Xe",
|
||||
formCounter: "formCounter-iEGQQk",
|
||||
nickCounter: "nickCounter-tJrO_4",
|
||||
popoutNoteCounter: "popoutNoteCounter-62U4Rh",
|
||||
profileNoteCounter: "profileNoteCounter-p0fWA_"
|
||||
profileNoteCounter: "profileNoteCounter-p0fWA_",
|
||||
uploadCounter: "uploadCounter-iEGQQk"
|
||||
};
|
||||
DiscordClassModules.DisplayLargeMessages = {
|
||||
injectButton: "injectButton-8eKqGu"
|
||||
|
@ -4499,10 +4499,10 @@
|
|||
_charcounterchatcounter: ["CharCounter", "chatCounter"],
|
||||
_charcountercounteradded: ["CharCounter", "counterAdded"],
|
||||
_charcountereditcounter: ["CharCounter", "editCounter"],
|
||||
_charcounterformcounter: ["CharCounter", "formCounter"],
|
||||
_charcounternickcounter: ["CharCounter", "nickCounter"],
|
||||
_charcounterpopoutnotecounter: ["CharCounter", "popoutNoteCounter"],
|
||||
_charcounterprofilenotecounter: ["CharCounter", "profileNoteCounter"],
|
||||
_charcounteruploadcounter: ["CharCounter", "uploadCounter"],
|
||||
_displaylargemessagesinjectbutton: ["DisplayLargeMessages", "injectButton"],
|
||||
_displayserversaschannelsbadge: ["DisplayServersAsChannels", "badge"],
|
||||
_displayserversaschannelsname: ["DisplayServersAsChannels", "name"],
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,11 +4,15 @@ var CharCounter = (_ => {
|
|||
const maxLenghts = {
|
||||
chat: 2000,
|
||||
edit: 2000,
|
||||
form: 2000,
|
||||
upload: 2000,
|
||||
nick: 32,
|
||||
popoutnote: 256,
|
||||
profilenote: 256
|
||||
};
|
||||
const typeMap = {
|
||||
normal: "chat",
|
||||
form: "upload"
|
||||
};
|
||||
|
||||
return class CharCounter {
|
||||
getName () {return "CharCounter";}
|
||||
|
@ -49,7 +53,7 @@ var CharCounter = (_ => {
|
|||
right: 0;
|
||||
bottom: -1.3em;
|
||||
}
|
||||
${BDFDB.dotCN._charcounterformcounter} {
|
||||
${BDFDB.dotCN._charcounteruploadcounter} {
|
||||
right: 0;
|
||||
bottom: -1.0em;
|
||||
}
|
||||
|
@ -143,7 +147,7 @@ var CharCounter = (_ => {
|
|||
|
||||
injectCounter (parent, children, type, refClass, parsing) {
|
||||
if (!children) return;
|
||||
if (type == "normal") type = "chat";
|
||||
type = typeMap[type] || type;
|
||||
parent.props.className = BDFDB.DOMUtils.formatClassName(parent.props.className, BDFDB.disCN._charcountercounteradded);
|
||||
children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CharCounter, {
|
||||
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN._charcountercounter, type && BDFDB.disCN[`_charcounter${type}counter`]),
|
||||
|
|
Loading…
Reference in New Issue