mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-11 23:53:03 -04:00
Some Fixes
Credit to sadan4
This commit is contained in:
parent
26c7feaa39
commit
05bef94b34
4 changed files with 9 additions and 17 deletions
|
@ -244,7 +244,7 @@ function FullPatchInput({ setFind, setParsedFind, setMatch, setReplacement }: Fu
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const parsed = (0, eval)(`(${fullPatch})`) as Patch;
|
const parsed = (0, eval)(`([${fullPatch}][0])`) as Patch;
|
||||||
|
|
||||||
if (!parsed.find) throw new Error("No 'find' field");
|
if (!parsed.find) throw new Error("No 'find' field");
|
||||||
if (!parsed.replacement) throw new Error("No 'replacement' field");
|
if (!parsed.replacement) throw new Error("No 'replacement' field");
|
||||||
|
|
|
@ -28,14 +28,6 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
).customSections;
|
).customSections;
|
||||||
|
|
||||||
const ThemeSection = () => ({
|
|
||||||
section: "ThemeLibrary",
|
|
||||||
label: "Theme Library",
|
|
||||||
searchableTitles: ["Theme Library"],
|
|
||||||
element: require("./components/ThemeTab").default,
|
|
||||||
id: "ThemeSection",
|
|
||||||
});
|
|
||||||
|
|
||||||
customSettingsSections.push(_ => ({
|
customSettingsSections.push(_ => ({
|
||||||
section: "ThemeLibrary",
|
section: "ThemeLibrary",
|
||||||
label: "Theme Library",
|
label: "Theme Library",
|
||||||
|
|
|
@ -275,16 +275,16 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
|
|
||||||
makeGuildsBarGuildListFilter(isBetterFolders: boolean) {
|
makeGuildsBarGuildListFilter(isBetterFolders: boolean) {
|
||||||
try {
|
return child => {
|
||||||
return child => {
|
if (isBetterFolders) {
|
||||||
if (isBetterFolders) {
|
try {
|
||||||
return child?.props?.["aria-label"] === getIntlMessage("SERVERS");
|
return child?.props?.["aria-label"] === getIntlMessage("SERVERS");
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
}
|
}
|
||||||
return true;
|
}
|
||||||
};
|
|
||||||
} catch {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
makeGuildsBarTreeFilter(isBetterFolders: boolean) {
|
makeGuildsBarTreeFilter(isBetterFolders: boolean) {
|
||||||
|
|
|
@ -134,7 +134,7 @@ export default definePlugin({
|
||||||
let element = 0;
|
let element = 0;
|
||||||
|
|
||||||
return children.map(c =>
|
return children.map(c =>
|
||||||
c.type === "strong"
|
c.type === "strong" || (typeof c !== "string" && !React.isValidElement(c))
|
||||||
? <TypingUser {...props} user={users[element++]} />
|
? <TypingUser {...props} user={users[element++]} />
|
||||||
: c
|
: c
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue