mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
dcd4247a0e
3 changed files with 29 additions and 25 deletions
|
@ -185,7 +185,7 @@ export default definePlugin({
|
|||
{
|
||||
// Decide if we should render the expanded folder background if we are rendering the Better Folders sidebar
|
||||
predicate: () => settings.store.showFolderIcon !== FolderIconDisplay.Always,
|
||||
match: /(?<=\.wrapper,children:\[)/,
|
||||
match: /(?<=\.isExpanded\),children:\[)/,
|
||||
replace: "$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -66,6 +66,13 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
patches: [
|
||||
{
|
||||
find: "https://github.com/highlightjs/highlight.js/issues/2277",
|
||||
replacement: {
|
||||
match: /(?<=&&\()console.log\(`Deprecated.+?`\),/,
|
||||
replace: ""
|
||||
}
|
||||
},
|
||||
{
|
||||
find: 'react-spring: The "interpolate" function',
|
||||
replacement: {
|
||||
|
|
|
@ -91,34 +91,31 @@ export default definePlugin({
|
|||
name: "TypingTweaks",
|
||||
description: "Show avatars and role colours in the typing indicator",
|
||||
authors: [Devs.zt],
|
||||
settings,
|
||||
|
||||
patches: [
|
||||
// Style the indicator and add function call to modify the children before rendering
|
||||
{
|
||||
find: "getCooldownTextStyle",
|
||||
replacement: {
|
||||
match: /(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,
|
||||
replace: "$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"
|
||||
}
|
||||
},
|
||||
// Changes the indicator to keep the user object when creating the list of typing users
|
||||
{
|
||||
find: "getCooldownTextStyle",
|
||||
replacement: {
|
||||
match: /(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,
|
||||
replace: "$1"
|
||||
}
|
||||
},
|
||||
// Adds the alternative formatting for several users typing
|
||||
{
|
||||
find: "getCooldownTextStyle",
|
||||
replacement: {
|
||||
match: /(,{a:(\i),b:(\i),c:\i}\):)\i\.\i\.string\(\i\.\i#{intl::SEVERAL_USERS_TYPING}\)(?<=(\i)\.length.+?)/,
|
||||
replace: (_, rest, a, b, users) => `${rest}$self.buildSeveralUsers({ a: ${a}, b: ${b}, count: ${users}.length - 2 })`
|
||||
},
|
||||
predicate: () => settings.store.alternativeFormatting
|
||||
find: "#{intl::THREE_USERS_TYPING}",
|
||||
replacement: [
|
||||
{
|
||||
// Style the indicator and add function call to modify the children before rendering
|
||||
match: /(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i(?<=guildId:(\i).+?)/,
|
||||
replace: "$self.mutateChildren($2,$1,$&),style:$self.TYPING_TEXT_STYLE"
|
||||
},
|
||||
{
|
||||
// Changes the indicator to keep the user object when creating the list of typing users
|
||||
match: /\.map\((\i)=>\i\.\i\.getName\(\i,\i\.id,\1\)\)/,
|
||||
replace: ""
|
||||
},
|
||||
{
|
||||
// Adds the alternative formatting for several users typing
|
||||
match: /(,{a:(\i),b:(\i),c:\i}\):\i\.length>3&&\(\i=)\i\.\i\.string\(\i\.\i#{intl::SEVERAL_USERS_TYPING}\)(?<=(\i)\.length.+?)/,
|
||||
replace: (_, rest, a, b, users) => `${rest}$self.buildSeveralUsers({ a: ${a}, b: ${b}, count: ${users}.length - 2 })`,
|
||||
predicate: () => settings.store.alternativeFormatting
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
settings,
|
||||
|
||||
TYPING_TEXT_STYLE: {
|
||||
display: "grid",
|
||||
|
|
Loading…
Reference in a new issue