Update clashctl

This commit is contained in:
Arvin
2026-03-22 18:02:37 +08:00
parent deb09932ad
commit dbbdba43e1
+19 -17
View File
@@ -837,20 +837,22 @@ cmd_status() {
local pid="-"
local controller="-"
local dashboard_url="-"
local config_source="-"
local generate_status="-"
local generate_reason="-"
local generate_at="-"
local run_status="-"
local run_mode="-"
local run_pid="-"
local run_at="-"
local http_port="-"
local dashboard_port="-"
local secret_status="未配置"
local config_exists="否"
local state_exists="否"
# 配置与运行(仅在有值时显示)
local gen_status=""
local gen_reason=""
local cfg_source=""
local gen_time=""
local run_result=""
local run_mode=""
local run_pid=""
local start_time=""
mode="$(detect_mode)"
case "$mode" in
@@ -921,16 +923,16 @@ cmd_status() {
ui_summary_end
ui_blank
if [ -n "$gen_status$gen_reason$config_source$gen_time$run_result$run_mode$run_pid$start_time" ]; then
if [ -n "${gen_status:-}${gen_reason:-}${cfg_source:-}${gen_time:-}${run_result:-}${run_mode:-}${run_pid:-}${start_time:-}" ]; then
ui_summary_begin "配置与运行"
[ -n "$gen_status" ] && ui_summary_row "生成状态" "$gen_status"
[ -n "$gen_reason" ] && ui_summary_row "失败原因" "$gen_reason"
[ -n "$config_source" ] && ui_summary_row "配置来源" "$config_source"
[ -n "$gen_time" ] && ui_summary_row "生成时间" "$gen_time"
[ -n "$run_result" ] && ui_summary_row "运行结果" "$run_result"
[ -n "$run_mode" ] && ui_summary_row "运行方式" "$run_mode"
[ -n "$run_pid" ] && ui_summary_row "运行进程" "$run_pid"
[ -n "$start_time" ] && ui_summary_row "启动时间" "$start_time"
[ -n "${gen_status:-}" ] && ui_summary_row "生成状态" "$gen_status"
[ -n "${gen_reason:-}" ] && ui_summary_row "失败原因" "$gen_reason"
[ -n "${cfg_source:-}" ] && ui_summary_row "配置来源" "$cfg_source"
[ -n "${gen_time:-}" ] && ui_summary_row "生成时间" "$gen_time"
[ -n "${run_result:-}" ] && ui_summary_row "运行结果" "$run_result"
[ -n "${run_mode:-}" ] && ui_summary_row "运行方式" "$run_mode"
[ -n "${run_pid:-}" ] && ui_summary_row "运行进程" "$run_pid"
[ -n "${start_time:-}" ] && ui_summary_row "启动时间" "$start_time"
ui_summary_end
fi