mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-14 14:10:26 -04:00
Fix
This commit is contained in:
parent
5fc6a079b2
commit
cfa52b5569
1 changed files with 9 additions and 23 deletions
|
@ -34,19 +34,6 @@ interface GroupData {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const constants = {
|
|
||||||
pluginLabel: "IRememberYou",
|
|
||||||
pluginId: "iremeberyou",
|
|
||||||
|
|
||||||
DM: "dm",
|
|
||||||
DataUIDescription:
|
|
||||||
"Provides a list of users you have mentioned or replied to, or those who own the servers you belong to (owner*), or are members of your guild",
|
|
||||||
marks: {
|
|
||||||
Owner: "owner"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
declare usersCollection: Record<string, GroupData>;
|
declare usersCollection: Record<string, GroupData>;
|
||||||
declare _storageAutoSaveProtocol_interval;
|
declare _storageAutoSaveProtocol_interval;
|
||||||
|
@ -103,9 +90,9 @@ class Data {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const groupKey = source?.id ?? constants.DM;
|
const groupKey = source?.id ?? "dm";
|
||||||
const group = (target[groupKey] ||= {
|
const group = (target[groupKey] ||= {
|
||||||
name: source?.name || constants.DM,
|
name: source?.name || "dm",
|
||||||
id: source?.id || user.id,
|
id: source?.id || user.id,
|
||||||
users: {}
|
users: {}
|
||||||
});
|
});
|
||||||
|
@ -202,7 +189,7 @@ class DataUI {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSectionDescription() {
|
renderSectionDescription() {
|
||||||
return <Text>{constants.DataUIDescription}</Text>;
|
return <Text>{"Provides a list of users you have mentioned or replied to, or those who own the servers you belong to (owner*), or are members of your guild"}</Text>;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderUsersCollectionAsRows(usersCollection: Data["usersCollection"]) {
|
renderUsersCollectionAsRows(usersCollection: Data["usersCollection"]) {
|
||||||
|
@ -255,7 +242,7 @@ class DataUI {
|
||||||
{this.renderUserAvatar(user)}
|
{this.renderUserAvatar(user)}
|
||||||
<Tooltip text={this.userTooltipText(user)}>
|
<Tooltip text={this.userTooltipText(user)}>
|
||||||
{props =>
|
{props =>
|
||||||
<Text {...props} selectable>{user.tag} {allowExtra.owner && user.extra?.isOwner && `(${constants.marks.Owner})`}</Text>
|
<Text {...props} selectable>{user.tag} {allowExtra.owner && user.extra?.isOwner && "(owner)"}</Text>
|
||||||
}
|
}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -341,7 +328,7 @@ class DataUI {
|
||||||
*/
|
*/
|
||||||
<main style={{ color: "#ffffff", paddingBottom: "4em" }}>
|
<main style={{ color: "#ffffff", paddingBottom: "4em" }}>
|
||||||
<Text tag="h1" variant="heading-lg/bold">
|
<Text tag="h1" variant="heading-lg/bold">
|
||||||
{constants.pluginLabel}{" "}
|
{"IRememberYou"}{" "}
|
||||||
<Heart />
|
<Heart />
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
|
@ -360,9 +347,8 @@ class DataUI {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: constants.pluginLabel,
|
name: "IRememberYou",
|
||||||
description:
|
description: "Locally saves everyone you've been communicating with (including servers), in case of lose",
|
||||||
"Locally saves everyone you've been communicating with (including servers), in case of lose",
|
|
||||||
authors: [EquicordDevs.zoodogood],
|
authors: [EquicordDevs.zoodogood],
|
||||||
dependencies: ["MessageEventsAPI"],
|
dependencies: ["MessageEventsAPI"],
|
||||||
|
|
||||||
|
@ -382,8 +368,8 @@ export default definePlugin({
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
Vencord.Plugins.plugins.Settings.customSections.push(ID => ({
|
Vencord.Plugins.plugins.Settings.customSections.push(ID => ({
|
||||||
section: `${constants.pluginId}.display-data`,
|
section: "iremeberyou.display-data",
|
||||||
label: constants.pluginLabel,
|
label: "IRememberYou",
|
||||||
element: () => ui.toElement(data.usersCollection),
|
element: () => ui.toElement(data.usersCollection),
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue