From 448ac83514e699263b5dc6a02dd7d18a387689bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 24 Apr 2024 15:49:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:art:=20=E9=A6=96=E9=A1=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=95=88=E6=9E=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pages.go | 24 ++++++++++++++++++++++-- views/index.html | 6 ++++-- 2 files changed, 26 insertions(+), 4 deletions(-) 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/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
From e7117d227b9922570a24c02df01ed0c078e18351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 24 Apr 2024 17:23:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:art:=20=E5=A5=BD=E5=8F=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/friend.html | 146 +++++++++++++++---------------- views/static/img/status-fail.png | Bin 0 -> 214672 bytes views/static/img/status-ok.png | Bin 0 -> 125907 bytes 3 files changed, 69 insertions(+), 77 deletions(-) create mode 100644 views/static/img/status-fail.png create mode 100644 views/static/img/status-ok.png 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/static/img/status-fail.png b/views/static/img/status-fail.png new file mode 100644 index 0000000000000000000000000000000000000000..1576c010f9bbb8cf584b382f2defa60fefcff65d GIT binary patch literal 214672 zcmb4Mc|6qJ_eYdyF)7Ltsi>@lvV^HbB}*~(trTgj*|M8@iW2oy)@-HFF!r%8Q;9+p z&4_HJ$iDB}?+lT?c{0C0p4T(4%-qkt=brOE=e*Ck_j5~4MR7d?8v_*;)%uesREZTF?Nn6UR43(+Xk0byYH&>tcR~qIN!F-52n?hV zWYs(Vdi3fMWFHlSV%+UvADSzpRM)uoXo&c5eyFpU3|;q52%cWvWh5gzZIB z4=El^PtSo?Pmh_(e8XP#=np?`V|CZtjvx1;!c;KO8#_1-ujYHd9zzt?l|9rAB4^6yL%S1`}RIJa~*d;OD={C8< zne3X*>1vdg!Enm-zJq8e?^?qv7L5lg;Ew}B4Ugn}KSz5Chx z3dBVVALBD73JVkQ86O1^)ti==_}qho1u^AQK|W)b(B07?<3X^z0YSYCH+wO*X-kxW zv|dBUP1r0nGZR7gQBdq!rr;+?6mG_c;5y`zpQ~6Tqla$VgoyVvobLDXK>X!7+#=pI zA3OKcc*-G}i=KU7$%5QbX}2CM49m znwz&bB5dyx@1fA$5eVCXgwaH~KXhm5<`whyg_KYAT^2zP`|5;@KkiH_oH-`!^1*ke z_tU;CA6SeD6BB`L)f0YtChbBbs=-5CpV&Fv^I3Ots@F$*Iu&I-ohkLVo$?|)VW^*a zoiKW_by6Yv!zApsYkbE8U#X;QdZu7^YU+gArhhlA6}UstF$;IdwfvmnUQ$(6wF