From c0adc3a7923ad8bd204a515885337ee0a68118e2 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 16 Jun 2020 13:26:49 +0800 Subject: [PATCH] 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. --- src/components/Config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Config.js b/src/components/Config.js index 8f6e396..46c480d 100644 --- a/src/components/Config.js +++ b/src/components/Config.js @@ -27,15 +27,15 @@ const propsList = [{ id: 0 }, { id: 1 }, { id: 2 }, { id: 3 }]; const optionsRule = [ { label: 'Global', - value: 'global', + value: 'Global', }, { label: 'Rule', - value: 'rule', + value: 'Rule', }, { label: 'Direct', - value: 'direct', + value: 'Direct', }, ]; @@ -220,7 +220,7 @@ function ConfigImpl({