Skip to content

Commit c95ac0a

Browse files
authored
Better alignment. (#417)
1 parent 4621bbd commit c95ac0a

File tree

1 file changed

+32
-34
lines changed

1 file changed

+32
-34
lines changed

src/components/DebuggerSettings/Content.tsx

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const DebuggerSettingsContent = () => {
7070
/>
7171
</div>
7272

73-
<div className="p-4 flex justify-between items-center mb-4">
73+
<div className="p-4 flex justify-between items-start mb-4">
7474
<span className="block text-xs font-bold">
7575
<WithHelp help="How frequently the UI should be refreshed.">UI refresh rate</WithHelp>
7676
</span>
@@ -90,43 +90,30 @@ export const DebuggerSettingsContent = () => {
9090
<SelectValue />
9191
</SelectTrigger>
9292
<SelectContent>
93-
<SelectItem value="instructions">After N instructions</SelectItem>
94-
<SelectItem value="block">After block</SelectItem>
93+
<SelectItem value="instructions">{debuggerState.uiRefreshRate.instructionCount} steps</SelectItem>
94+
<SelectItem value="block">Each block</SelectItem>
9595
</SelectContent>
9696
</Select>
97-
{debuggerState.uiRefreshRate.mode === "instructions" && (
98-
<Input
99-
className={commonClass}
100-
type="number"
101-
step={1}
102-
min={1}
103-
max={1000}
104-
placeholder="Number of instructions"
105-
onChange={(ev) => {
106-
dispatch(
107-
setUiRefreshRate({
108-
...debuggerState.uiRefreshRate,
109-
instructionCount: parseInt(ev.target.value) || 1,
110-
}),
111-
);
112-
}}
113-
value={debuggerState.uiRefreshRate.instructionCount}
114-
/>
115-
)}
97+
<Input
98+
className={commonClass}
99+
disabled={debuggerState.uiRefreshRate.mode !== "instructions"}
100+
type="number"
101+
step={1}
102+
min={1}
103+
max={10000}
104+
placeholder="Number of instructions"
105+
onChange={(ev) => {
106+
dispatch(
107+
setUiRefreshRate({
108+
...debuggerState.uiRefreshRate,
109+
instructionCount: parseInt(ev.target.value) || 1,
110+
}),
111+
);
112+
}}
113+
value={debuggerState.uiRefreshRate.instructionCount}
114+
/>
116115
</div>
117116
</div>
118-
<div className="p-4 flex justify-between items-center mb-2">
119-
<span className="block text-xs font-bold">
120-
<WithHelp
121-
help={`Configure storage for read & write host calls.
122-
Confirm empty, if you want to process.
123-
Storage can be modified by the program execution.`}
124-
>
125-
Host Calls Trace
126-
</WithHelp>
127-
</span>
128-
</div>
129-
130117
<div className="p-4 mt-2 flex justify-between items-center mb-4">
131118
<span className="block text-xs font-bold">
132119
<WithHelp help="Hex-encoded JAM SPI arguments written to the heap">JAM SPI arguments</WithHelp>
@@ -141,6 +128,17 @@ export const DebuggerSettingsContent = () => {
141128
value={debuggerState.spiArgs ?? ""}
142129
/>
143130
</div>
131+
<div className="p-4 flex justify-between items-center mb-2">
132+
<span className="block text-xs font-bold">
133+
<WithHelp
134+
help={`Configure storage for read & write host calls.
135+
Confirm empty, if you want to process.
136+
Storage can be modified by the program execution.`}
137+
>
138+
Host Calls Trace
139+
</WithHelp>
140+
</span>
141+
</div>
144142

145143
{error && <p className="text-red-500 text-sm mt-2">{error}</p>}
146144
</div>

0 commit comments

Comments
 (0)