Compare commits
No commits in common. "765e0ead7f8bdc1e99cfbe7add4db0cbff452e36" and "5024fb4b0541feaf42f2f760cdffca43eea3db5c" have entirely different histories.
765e0ead7f
...
5024fb4b05
24
app/pages.go
24
app/pages.go
@ -20,28 +20,8 @@ func Index(ctx *gin.Context) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
result["msg"] = fmt.Sprintf("数据获取失败: %s", err.Error())
|
result["msg"] = fmt.Sprintf("数据获取失败: %s", err.Error())
|
||||||
}
|
}
|
||||||
var in, notIn int
|
result["friendCount"] = len(friends)
|
||||||
for _, d := range friends {
|
result["groupCount"] = len(groups)
|
||||||
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["vnc"] = config.Conf.Wechat.VncUrl
|
||||||
result["isVnc"] = config.Conf.Wechat.VncUrl != ""
|
result["isVnc"] = config.Conf.Wechat.VncUrl != ""
|
||||||
result["aiModels"] = config.Conf.Ai.Models
|
result["aiModels"] = config.Conf.Ai.Models
|
||||||
|
@ -21,79 +21,87 @@
|
|||||||
<main class="-mt-32">
|
<main class="-mt-32">
|
||||||
<div class="mx-auto max-w-7xl px-4 pb-12 sm:px-6 lg:px-8">
|
<div class="mx-auto max-w-7xl px-4 pb-12 sm:px-6 lg:px-8">
|
||||||
<div class="rounded-lg bg-white px-5 py-6 shadow sm:px-6 text-2xl">
|
<div class="rounded-lg bg-white px-5 py-6 shadow sm:px-6 text-2xl">
|
||||||
<ul role="list" class="grid grid-cols-1 gap-x-6 gap-y-8 lg:grid-cols-3 xl:gap-x-8">
|
<table class="min-w-full divide-y divide-gray-300">
|
||||||
|
<thead class="bg-gray-50">
|
||||||
|
<tr>
|
||||||
|
<th scope="col"
|
||||||
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
微信Id
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
微信号
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">昵称
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
最后活跃时间
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
是否在通讯录
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
是否启用AI
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
是否启用指令
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{ range .friends }}
|
{{ range .friends }}
|
||||||
<li class="overflow-hidden rounded-xl border border-gray-200">
|
<tr class="even:bg-gray-50">
|
||||||
<div class="flex items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
||||||
<img src="assets/img/status-{{ if eq .IsOk true }}ok{{else}}fail{{end}}.png" alt="Tuple" class="h-12 w-12 flex-none rounded-lg bg-white object-cover ring-1 ring-gray-900/10">
|
{{ .Wxid }}
|
||||||
<div class="flex-1">
|
</td>
|
||||||
<div class="text-sm font-medium leading-6 text-gray-900">{{ .Nickname }}</div>
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{
|
||||||
{{ if eq .IsOk true }}
|
.CustomAccount }}
|
||||||
<span class="inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20">正常</span>
|
</td>
|
||||||
{{ else }}
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{
|
||||||
<span class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20">已删除</span>
|
.Nickname }}
|
||||||
{{ end }}
|
</td>
|
||||||
</div>
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
</div>
|
|
||||||
<dl class="-my-3 divide-y divide-gray-100 px-6 py-4 text-sm leading-6">
|
|
||||||
<div class="flex justify-between gap-x-4 py-3">
|
|
||||||
<dt class="text-gray-500">原始微信Id<br/>微信号</dt>
|
|
||||||
<dd>
|
|
||||||
<div class="text-gray-700">{{ .Wxid }}</div>
|
|
||||||
{{ if not (eq .CustomAccount "") }}
|
|
||||||
<div class="truncate text-gray-500">{{ .CustomAccount }}</div>
|
|
||||||
{{end}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between gap-x-4 py-3">
|
|
||||||
<dt class="text-gray-500">最后活跃时间</dt>
|
|
||||||
<dd class="flex items-start gap-x-2">
|
|
||||||
<div class="font-medium text-gray-900">
|
|
||||||
{{ if eq .LastActive.IsNil true }}
|
{{ if eq .LastActive.IsNil true }}
|
||||||
无数据
|
无数据
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<time datetime="{{ .LastActive }}">{{ .LastActive }}</time>
|
{{ .LastActive }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</td>
|
||||||
</dd>
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
</div>
|
{{ if eq .IsOk true }}
|
||||||
|
<span
|
||||||
<div class="flex justify-between gap-x-4 py-3">
|
class="inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20">是</span>
|
||||||
<dt class="text-gray-500">AI</dt>
|
{{ else }}
|
||||||
<dd class="flex items-start gap-x-2">
|
<span
|
||||||
|
class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 ring-1 ring-inset ring-red-600/20">否</span>
|
||||||
|
{{ end }}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
{{ template "ai" . }}
|
{{ template "ai" . }}
|
||||||
</dd>
|
<!-- 使用的模型 -->
|
||||||
</div>
|
|
||||||
{{ if eq .EnableAi true }}
|
{{ if eq .EnableAi true }}
|
||||||
<div class="flex justify-between gap-x-4 py-3">
|
<select id="location" name="location"
|
||||||
<dt class="text-gray-500 mt-2">AI模型</dt>
|
class="mt-2 block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-green-600 sm:text-sm sm:leading-6"
|
||||||
<dd class="flex items-start gap-x-2">
|
onchange="aiModelChange(event, {{.Wxid}})">
|
||||||
<label>
|
<option value="" {{ if eq .AiModel
|
||||||
<select class="block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-green-600 sm:text-sm sm:leading-6" onchange="aiModelChange(event, {{.Wxid}})">
|
"" }}selected{{ end }}>默认(gpt-3.5-turbo-0613)
|
||||||
|
</option>
|
||||||
|
|
||||||
{{$useModel := .AiModel}}
|
{{$useModel := .AiModel}}
|
||||||
{{ range $.aiModels }}
|
{{ range $.aiModels }}
|
||||||
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }}>
|
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }}>
|
||||||
{{.Name}}
|
{{.Name}}({{.Model}})
|
||||||
</option>
|
</option>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</td>
|
||||||
<div class="flex justify-between gap-x-4 py-3">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
<dt class="text-gray-500">指令</dt>
|
|
||||||
<dd class="flex items-start gap-x-2">
|
|
||||||
{{ template "command" . }}
|
{{ template "command" . }}
|
||||||
</dd>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
|
||||||
</dl>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
@ -24,13 +24,11 @@
|
|||||||
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
||||||
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500">好友数量</dt>
|
<dt class="truncate text-sm font-medium text-gray-500">好友数量</dt>
|
||||||
<dd class="mt-1 text-2xl font-semibold tracking-tight text-gray-900">{{ .friendCount }}/{{ .friendWithoutCount }}</dd>
|
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">{{ .friendCount }}</dd>
|
||||||
<dd class="mt-1 text-xs font-semibold tracking-tight text-red-300">通讯录/已删除</dd>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500">群组数量</dt>
|
<dt class="truncate text-sm font-medium text-gray-500">群组数量</dt>
|
||||||
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">{{ .groupCount }}/{{ .groupWithoutCount }}</dd>
|
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">{{ .groupCount }}</dd>
|
||||||
<dd class="mt-1 text-xs font-semibold tracking-tight text-red-300">在群聊/已退出</dd>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
<div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
|
||||||
<dt class="truncate text-sm font-medium text-gray-500">是否配置VNC</dt>
|
<dt class="truncate text-sm font-medium text-gray-500">是否配置VNC</dt>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 210 KiB |
Binary file not shown.
Before Width: | Height: | Size: 123 KiB |
Loading…
Reference in New Issue
Block a user