forked from lxh/go-wxhelper
157 lines
7.1 KiB
HTML
157 lines
7.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" class="h-full bg-gray-100">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>水群助手</title>
|
|
|
|
<link href="assets/css/daisyui-4.4.14-full.min.css" rel="stylesheet" type="text/css"/>
|
|
<link href="assets/css/index.css" rel="stylesheet" type="text/css"/>
|
|
|
|
<script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio,line-clamp"></script>
|
|
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.5.0/axios.min.js"></script>
|
|
|
|
<script src="assets/js/index.js"></script>
|
|
</head>
|
|
|
|
<body class="h-full">
|
|
<div class="min-h-full">
|
|
{{ template "head.html" "group" }}
|
|
|
|
<main class="-mt-32">
|
|
<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">
|
|
<ul role="list" class="grid grid-cols-1 gap-x-6 gap-y-8 lg:grid-cols-2 xl:gap-x-8">
|
|
{{ range .groups }}
|
|
<li class="overflow-hidden rounded-xl border border-gray-200">
|
|
<div class="flex items -center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-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">
|
|
<div class="text-sm flex-1">
|
|
<div class="font-medium leading-6 text-gray-900">{{ .Nickname }}</div>
|
|
<div class="font-medium text-gray-500">{{ .Wxid }}</div>
|
|
{{ template "flagTag" .IsOk }}
|
|
<button type="button" class="btn-link float-end text-red-600" onclick="getGroupUsers({{.Wxid}}, {{.Nickname}})">群成员</button>
|
|
</div>
|
|
</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 items-center">
|
|
<dt class="text-gray-500">最后活跃时间</dt>
|
|
<dd class="flex items-start gap-x-2">
|
|
{{ if eq .LastActive.IsNil true }}
|
|
无活跃数据
|
|
{{ else }}
|
|
<time datetime="{{ .LastActive }}">{{ .LastActive }}</time>
|
|
{{ end }}
|
|
</dd>
|
|
</div>
|
|
<!-- AI -->
|
|
<div class="flex justify-between gap-x-4 py-3 items-center">
|
|
<dt class="text-gray-500">AI(模型可选默认或者指定模型)</dt>
|
|
<dd class="flex items-start gap-x-2 items-center">
|
|
<div>
|
|
{{ template "ai" . }}
|
|
</div>
|
|
{{ if eq .EnableAi true }}
|
|
<div class="float-end">
|
|
<div>
|
|
<label>
|
|
<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}})">
|
|
{{$useModel := .AiModel}}
|
|
{{ range $.aiModels }}
|
|
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }}>
|
|
{{.Name}}
|
|
</option>
|
|
{{ end }}
|
|
</select>
|
|
</label>
|
|
</div>
|
|
<div class="float-end mt-1">
|
|
<label>
|
|
<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="aiAssistantChange(event, {{.Wxid}})">
|
|
<option value="" {{ if eq .Prompt
|
|
"" }}selected{{ end }}>默认</option>
|
|
|
|
{{$usePrompt := .Prompt}}
|
|
{{ range $.assistant }}
|
|
<option value="{{.Id}}" {{ if eq $usePrompt .Id}}selected{{ end }}>
|
|
{{.Name}}
|
|
</option>
|
|
{{ end }}
|
|
</select>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
</dd>
|
|
</div>
|
|
<!-- 水群排行榜 -->
|
|
<div class="flex justify-between gap-x-4 py-3 items-center">
|
|
<dt class="text-gray-500">水群排行榜</dt>
|
|
<dd class="flex items-start gap-x-2">
|
|
{{ template "chatRank" . }}
|
|
</dd>
|
|
</div>
|
|
<!-- 群聊总结 -->
|
|
<div class="flex justify-between gap-x-4 py-3 items-center">
|
|
<dt class="text-gray-500">群聊总结</dt>
|
|
<dd class="flex items-start gap-x-2">
|
|
{{ template "summary" . }}
|
|
</dd>
|
|
</div>
|
|
<!-- 迎新 -->
|
|
<div class="flex justify-between gap-x-4 py-3 items-center">
|
|
<dt class="text-gray-500">迎新</dt>
|
|
<dd class="flex items-start gap-x-2">
|
|
{{ template "welcome" . }}
|
|
</dd>
|
|
</div>
|
|
<!-- 早报 -->
|
|
<div class="flex justify-between gap-x-4 py-3 items-center">
|
|
<dt class="text-gray-500">早报</dt>
|
|
<dd class="flex items-start gap-x-2">
|
|
{{ template "news" . }}
|
|
</dd>
|
|
</div>
|
|
<!-- 指令 -->
|
|
<div class="flex justify-between gap-x-4 py-3 items-center">
|
|
<dt class="text-gray-500">迎新</dt>
|
|
<dd class="flex items-start gap-x-2">
|
|
{{ template "command" . }}
|
|
</dd>
|
|
</div>
|
|
<!-- 自动清理不活跃成员 -->
|
|
<div class="flex justify-between gap-x-4 py-3 items-center">
|
|
<dt class="text-gray-500">末位淘汰</dt>
|
|
<dd class="flex items-start gap-x-2 items-center">
|
|
<div class="relative rounded-md shadow-sm">
|
|
<label>
|
|
<input type="number" id="auto-cm-{{ .Wxid }}" min="0" class="block w-1/2 float-end rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" placeholder="N天不活跃自动移除"
|
|
value="{{.ClearMember}}"
|
|
onblur="changeClearMember({{.Wxid}}, {{.ClearMember}}, this.value)"
|
|
>
|
|
</label>
|
|
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3">
|
|
<span class="text-gray-500 sm:text-sm" id="price-currency">天</span>
|
|
</div>
|
|
</div>
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
{{ template "footer.html" }}
|
|
|
|
{{ template "groupuser.html" }}
|
|
</div>
|
|
|
|
</body>
|