Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2024-09-06 13:20:53 +00:00
commit 86bee7731c
3 changed files with 6 additions and 5 deletions

View file

@ -66,14 +66,14 @@ export function addPatch(newPatch: Omit<Patch, "plugin">, pluginName: string) {
patch.replacement = [patch.replacement]; patch.replacement = [patch.replacement];
} }
patch.replacement = patch.replacement.filter(({ predicate }) => !predicate || predicate());
if (IS_REPORTER) { if (IS_REPORTER) {
patch.replacement.forEach(r => { patch.replacement.forEach(r => {
delete r.predicate; delete r.predicate;
}); });
} }
patch.replacement = patch.replacement.filter(({ predicate }) => !predicate || predicate());
patches.push(patch); patches.push(patch);
} }

View file

@ -48,7 +48,7 @@ export default definePlugin({
find: ".Messages.FRIEND_REQUEST_CANCEL", find: ".Messages.FRIEND_REQUEST_CANCEL",
replacement: { replacement: {
predicate: () => settings.store.showDates, predicate: () => settings.store.showDates,
match: /subText:(\i)(?=,className:\i\.userInfo}\))(?<=user:(\i).+?)/, match: /subText:(\i)(?<=user:(\i).+?)/,
replace: (_, subtext, user) => `subText:$self.makeSubtext(${subtext},${user})` replace: (_, subtext, user) => `subText:$self.makeSubtext(${subtext},${user})`
} }
}], }],
@ -66,7 +66,7 @@ export default definePlugin({
makeSubtext(text: string, user: User) { makeSubtext(text: string, user: User) {
const since = this.getSince(user); const since = this.getSince(user);
return ( return (
<Flex flexDirection="row" style={{ gap: 0, flexWrap: "wrap", lineHeight: "0.9rem" }}> <Flex flexDirection="column" style={{ gap: 0, flexWrap: "wrap", lineHeight: "0.9rem" }}>
<span>{text}</span> <span>{text}</span>
{!isNaN(since.getTime()) && <span>Received &mdash; {since.toDateString()}</span>} {!isNaN(since.getTime()) && <span>Received &mdash; {since.toDateString()}</span>}
</Flex> </Flex>

View file

@ -41,7 +41,8 @@ export const Devs = /* #__PURE__*/ Object.freeze({
}, },
Arjix: { Arjix: {
name: "ArjixWasTaken", name: "ArjixWasTaken",
id: 674710789138939916n id: 674710789138939916n,
badge: false
}, },
Cyn: { Cyn: {
name: "Cynosphere", name: "Cynosphere",