From 8cfa01803fe248707fd9135a1eeff7d0e4c9b2ca Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 15 Mar 2025 12:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E7=89=88=E6=9C=AC=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B00.0.9=E7=89=88=E6=9C=AC=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8F=AF=E8=A7=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webui.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/webui.py b/webui.py index e22f250ea..7d42a143e 100644 --- a/webui.py +++ b/webui.py @@ -12,6 +12,9 @@ is_share = False debug = True config_data = toml.load("config/bot_config.toml") +CONFIG_VERSION = config_data["inner"]["version"] +PARSED_CONFIG_VERSION = float(CONFIG_VERSION[2:]) + #============================================== #env环境配置文件读取部分 def parse_env_config(config_file): @@ -1099,6 +1102,16 @@ with gr.Blocks(title="MaimBot配置文件编辑") as app: enable_debug_output = gr.Checkbox(value=config_data['others']['enable_debug_output'], label="是否开启调试输出") with gr.Row(): enable_friend_chat = gr.Checkbox(value=config_data['others']['enable_friend_chat'], label="是否开启好友聊天") + if PARSED_CONFIG_VERSION > 0.8: + with gr.Row(): + gr.Markdown( + """### 远程统计设置\n + 测试功能,发送统计信息,主要是看全球有多少只麦麦 + """ + ) + with gr.Row(): + remote_status = gr.Checkbox(value=config_data['remote']['enable'], label="是否开启麦麦在线全球统计") + with gr.Row(): gr.Markdown( """### 中文错别字设置"""