aboutsummaryrefslogtreecommitdiff
path: root/src/components/PluginSettings/index.tsx
diff options
context:
space:
mode:
authorMrDiamondDog <84212701+MrDiamondDog@users.noreply.github.com>2023-07-13 11:35:40 -0600
committerGitHub <noreply@github.com>2023-07-13 19:35:40 +0200
commit065ab756274e41467f57cfe5260832dc0a89919f (patch)
tree6fab5a33b17c36a70bd0e1dca0ef5b33909424b0 /src/components/PluginSettings/index.tsx
parent8aea72c1be3635afae3225b5a90eaf837342bef4 (diff)
downloadVencord-065ab756274e41467f57cfe5260832dc0a89919f.tar.gz
Vencord-065ab756274e41467f57cfe5260832dc0a89919f.tar.bz2
Vencord-065ab756274e41467f57cfe5260832dc0a89919f.zip
Add "Show New" option in plugin settings (#1416)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src/components/PluginSettings/index.tsx')
-rw-r--r--src/components/PluginSettings/index.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx
index 8d7524d..7749abd 100644
--- a/src/components/PluginSettings/index.tsx
+++ b/src/components/PluginSettings/index.tsx
@@ -176,7 +176,8 @@ function PluginCard({ plugin, disabled, onRestartNeeded, onMouseEnter, onMouseLe
const enum SearchStatus {
ALL,
ENABLED,
- DISABLED
+ DISABLED,
+ NEW
}
export default function PluginSettings() {
@@ -229,6 +230,7 @@ export default function PluginSettings() {
const enabled = settings.plugins[plugin.name]?.enabled;
if (enabled && searchValue.status === SearchStatus.DISABLED) return false;
if (!enabled && searchValue.status === SearchStatus.ENABLED) return false;
+ if (searchValue.status === SearchStatus.NEW && !newPlugins?.includes(plugin.name)) return false;
if (!searchValue.value.length) return true;
const v = searchValue.value.toLowerCase();
@@ -321,7 +323,8 @@ export default function PluginSettings() {
options={[
{ label: "Show All", value: SearchStatus.ALL, default: true },
{ label: "Show Enabled", value: SearchStatus.ENABLED },
- { label: "Show Disabled", value: SearchStatus.DISABLED }
+ { label: "Show Disabled", value: SearchStatus.DISABLED },
+ { label: "Show New", value: SearchStatus.NEW }
]}
serialize={String}
select={onStatusChange}