Fix: fix the case mistake in config logic.
**Issue:** When changing the mode, Clash server will return an error `{"message":"Body invalid"}`. **Changes:** According to the https://github.com/Dreamacro/clash/blob/master/tunnel/mode.go. Make first-letter uppercase to make the mode-changing work. Tested locally.
This commit is contained in:
parent
263a4335eb
commit
c0adc3a792
1 changed files with 4 additions and 4 deletions
|
@ -27,15 +27,15 @@ const propsList = [{ id: 0 }, { id: 1 }, { id: 2 }, { id: 3 }];
|
||||||
const optionsRule = [
|
const optionsRule = [
|
||||||
{
|
{
|
||||||
label: 'Global',
|
label: 'Global',
|
||||||
value: 'global',
|
value: 'Global',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Rule',
|
label: 'Rule',
|
||||||
value: 'rule',
|
value: 'Rule',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Direct',
|
label: 'Direct',
|
||||||
value: 'direct',
|
value: 'Direct',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ function ConfigImpl({
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
options={optionsRule}
|
options={optionsRule}
|
||||||
name="mode"
|
name="mode"
|
||||||
value={configState.mode && configState.mode.toLowerCase()}
|
value={configState.mode}
|
||||||
onChange={handleInputOnChange}
|
onChange={handleInputOnChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue