From ccb973ecafa6c334bd604439d7d5285758c225b4 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sun, 1 Dec 2024 22:24:53 -0500 Subject: [PATCH] Nicer UI for allowed command pills (#37) --- .../src/components/settings/SettingsView.tsx | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 556a68c..0a8acb2 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -237,17 +237,36 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { -
+
{(allowedCommands ?? []).map((cmd, index) => (
{cmd} { const newCommands = (allowedCommands ?? []).filter((_, i) => i !== index) setAllowedCommands(newCommands)