diff --git a/app/pages.go b/app/pages.go index c1ab8b7..13d5fc7 100644 --- a/app/pages.go +++ b/app/pages.go @@ -20,8 +20,28 @@ func Index(ctx *gin.Context) { if err != nil { result["msg"] = fmt.Sprintf("数据获取失败: %s", err.Error()) } - result["friendCount"] = len(friends) - result["groupCount"] = len(groups) + var in, notIn int + for _, d := range friends { + if d.IsOk { + in++ + } else { + notIn++ + } + } + result["friendCount"] = in + result["friendWithoutCount"] = notIn + + var gin, gnotIn int + for _, d := range groups { + if d.IsOk { + gin++ + } else { + gnotIn++ + } + } + result["groupCount"] = gin + result["groupWithoutCount"] = gnotIn + result["vnc"] = config.Conf.Wechat.VncUrl result["isVnc"] = config.Conf.Wechat.VncUrl != "" result["aiModels"] = config.Conf.Ai.Models diff --git a/views/friend.html b/views/friend.html index 979b7f9..ee74506 100644 --- a/views/friend.html +++ b/views/friend.html @@ -21,87 +21,79 @@
- - - - - - - - - - - - - +
    {{ range .friends }} -
- - - - - - - - + +
+
指令
+
+ {{ template "command" . }} +
+
+ + + {{ end }} - -
- 微信Id - - 微信号 - 昵称 - - 最后活跃时间 - - 是否在通讯录 - - 是否启用AI - - 是否启用指令 -
- {{ .Wxid }} - {{ - .CustomAccount }} - {{ - .Nickname }} - - {{ if eq .LastActive.IsNil true }} - 无数据 - {{ else }} - {{ .LastActive }} - {{ end }} - - {{ if eq .IsOk true }} - - {{ else }} - - {{ end }} - - {{ template "ai" . }} - - {{ if eq .EnableAi true }} - + + +
+
+
原始微信Id
微信号
+
+
{{ .Wxid }}
+ {{ if not (eq .CustomAccount "") }} +
{{ .CustomAccount }}
+ {{end}} +
+
+
+
最后活跃时间
+
+
+ {{ if eq .LastActive.IsNil true }} + 无数据 + {{ else }} + + {{ end }} +
+
+
+ +
+
AI
+
+ {{ template "ai" . }} +
+
+ {{ if eq .EnableAi true }} +
+
AI模型
+
+ +
+
{{ end }} -
- {{ template "command" . }} -
+ +
diff --git a/views/index.html b/views/index.html index 53988cc..d0bfbf7 100644 --- a/views/index.html +++ b/views/index.html @@ -24,11 +24,13 @@
好友数量
-
{{ .friendCount }}
+
{{ .friendCount }}/{{ .friendWithoutCount }}
+
通讯录/已删除
群组数量
-
{{ .groupCount }}
+
{{ .groupCount }}/{{ .groupWithoutCount }}
+
在群聊/已退出
是否配置VNC
diff --git a/views/static/img/status-fail.png b/views/static/img/status-fail.png new file mode 100644 index 0000000..1576c01 Binary files /dev/null and b/views/static/img/status-fail.png differ diff --git a/views/static/img/status-ok.png b/views/static/img/status-ok.png new file mode 100644 index 0000000..5806d9a Binary files /dev/null and b/views/static/img/status-ok.png differ