mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 09:56:24 +00:00
review changes
This commit is contained in:
parent
5c843bdbb7
commit
4e7e09f4ff
1 changed files with 7 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
||||||
import "./style.css";
|
import "./style.css";
|
||||||
|
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { Button, ChannelStore, Forms, SearchableSelect,SelectedChannelStore, TabBar, TextInput, UserStore, UserUtils, useState } from "@webpack/common";
|
import { Button, ChannelStore, Forms, Select,SelectedChannelStore, TabBar, TextInput, UserStore, UserUtils, useState } from "@webpack/common";
|
||||||
import { classNameFactory } from "@api/Styles";
|
import { classNameFactory } from "@api/Styles";
|
||||||
import { DataStore } from "@api/index";
|
import { DataStore } from "@api/index";
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
|
@ -147,16 +147,17 @@ function ListedIds({ listIds, setListIds }) {
|
||||||
|
|
||||||
function ListTypeSelector({ listType, setListType }) {
|
function ListTypeSelector({ listType, setListType }) {
|
||||||
return (
|
return (
|
||||||
<SearchableSelect
|
<Select
|
||||||
options={[
|
options={[
|
||||||
{ label: "Whitelist", value: ListType.Whitelist },
|
{ label: "Whitelist", value: ListType.Whitelist },
|
||||||
{ label: "Blacklist", value: ListType.BlackList }
|
{ label: "Blacklist", value: ListType.BlackList }
|
||||||
]}
|
]}
|
||||||
placeholder={"Select a list type"}
|
placeholder={"Select a list type"}
|
||||||
maxVisibleItems={2}
|
isSelected={v => v === listType}
|
||||||
closeOnSelect={true}
|
closeOnSelect={true}
|
||||||
value={listType}
|
value={listType}
|
||||||
onChange={setListType}
|
select={setListType}
|
||||||
|
serialize={v => v}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -303,7 +304,7 @@ export default definePlugin({
|
||||||
applyKeywordEntries(m: Message) {
|
applyKeywordEntries(m: Message) {
|
||||||
let matches = false;
|
let matches = false;
|
||||||
|
|
||||||
keywordEntries.forEach(entry => {
|
for (let entry of keywordEntries) {
|
||||||
if (entry.regex === "") {
|
if (entry.regex === "") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -345,7 +346,7 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
m.mentions.push(currentUser);
|
m.mentions.push(currentUser);
|
||||||
|
|
Loading…
Reference in a new issue