mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Nicer UI for allowed command pills (#37)
This commit is contained in:
@@ -237,17 +237,36 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
|
|||||||
</VSCodeButton>
|
</VSCodeButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ marginTop: '10px' }}>
|
<div style={{
|
||||||
|
marginTop: '10px',
|
||||||
|
display: 'flex',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
gap: '5px'
|
||||||
|
}}>
|
||||||
{(allowedCommands ?? []).map((cmd, index) => (
|
{(allowedCommands ?? []).map((cmd, index) => (
|
||||||
<div key={index} style={{
|
<div key={index} style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
gap: '5px',
|
gap: '5px',
|
||||||
marginBottom: '5px'
|
backgroundColor: 'var(--vscode-button-secondaryBackground)',
|
||||||
|
padding: '2px 6px',
|
||||||
|
borderRadius: '4px',
|
||||||
|
border: '1px solid var(--vscode-button-secondaryBorder)',
|
||||||
|
height: '24px'
|
||||||
}}>
|
}}>
|
||||||
<span>{cmd}</span>
|
<span>{cmd}</span>
|
||||||
<VSCodeButton
|
<VSCodeButton
|
||||||
appearance="icon"
|
appearance="icon"
|
||||||
|
style={{
|
||||||
|
padding: 0,
|
||||||
|
margin: 0,
|
||||||
|
height: '20px',
|
||||||
|
width: '20px',
|
||||||
|
minWidth: '20px',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center'
|
||||||
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const newCommands = (allowedCommands ?? []).filter((_, i) => i !== index)
|
const newCommands = (allowedCommands ?? []).filter((_, i) => i !== index)
|
||||||
setAllowedCommands(newCommands)
|
setAllowedCommands(newCommands)
|
||||||
|
|||||||
Reference in New Issue
Block a user