go-wxhelper/views/group.html

165 lines
7.4 KiB
HTML
Raw Permalink Normal View History

<!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">
2024-06-18 17:14:46 +08:00
<ul role="list" class="grid grid-cols-1 gap-x-6 gap-y-8 lg:grid-cols-2 xl:gap-x-8">
{{ range .groups }}
2024-06-18 16:23:09 +08:00
<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">
2024-06-18 17:14:46 +08:00
<dt class="text-gray-500">AI(模型可选默认或者指定模型)</dt>
<dd class="flex items-start gap-x-2 items-center">
2024-06-18 16:23:09 +08:00
<div>
{{ template "ai" . }}
</div>
{{ if eq .EnableAi true }}
<div class="float-end">
2024-06-18 17:14:46 +08:00
<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>
2024-06-18 16:23:09 +08:00
2024-06-18 17:14:46 +08:00
{{$usePrompt := .Prompt}}
{{ range $.assistant }}
<option value="{{.Id}}" {{ if eq $usePrompt .Id}}selected{{ end }}>
{{.Name}}
</option>
{{ end }}
</select>
</label>
</div>
2024-06-18 16:23:09 +08:00
</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>
2024-07-15 14:14:24 +08:00
<!-- 热榜 -->
<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 "hotTop" . }}
</dd>
</div>
2024-06-18 16:23:09 +08:00
<!-- 指令 -->
<div class="flex justify-between gap-x-4 py-3 items-center">
2024-06-19 14:21:07 +08:00
<dt class="text-gray-500">指令</dt>
2024-06-18 16:23:09 +08:00
<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>
2024-06-18 17:14:46 +08:00
<dd class="flex items-start gap-x-2 items-center">
2024-06-19 08:41:58 +08:00
<div class="relative rounded-md">
2024-06-18 16:23:09 +08:00
<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>
2024-07-16 11:36:10 +08:00
</li>
{{ end }}
2024-06-18 16:23:09 +08:00
</ul>
</div>
</div>
</main>
{{ template "footer.html" }}
2024-05-09 09:44:57 +08:00
{{ template "groupuser.html" }}
</div>
</body>