1
0
forked from lxh/go-wxhelper
go-wxhelper/views/manager-one.html
2024-07-23 22:03:32 +08:00

168 lines
7.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 flex items-center justify-center">
<div 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 .info.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">{{ .info.Nickname }}</div>
<div class="font-medium text-gray-500">{{ .info.Wxid }}</div>
{{ template "flagTag" .info.IsOk }}
<!-- <button type="button" class="btn-link float-end text-red-600" onclick="getGroupUsers({{.info.Wxid}}, {{.info.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 .info.LastActive.IsNil true }}
无活跃数据
{{ else }}
<time datetime="{{ .LastActive }}">{{ .info.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" .info }}
</div>
{{ if eq .info.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, {{.info.Wxid}})">
{{$useModel := .info.AiModel}}
{{ range $.aiModels }}
<option value="{{.Model}}" {{ if eq $useModel .Model}}selected{{ end }} {{ if not .CanManager}}disabled{{ 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, {{.info.Wxid}})">
<option value="" {{ if eq .info.Prompt
"" }}selected{{ end }}>默认</option>
{{$usePrompt := .info.Prompt}}
{{ range $.assistant }}
<option value="{{.Id}}" {{ if eq $usePrompt .Id}}selected{{ end }}>
{{.Name}}
</option>
{{ end }}
</select>
</label>
</div>
</div>
{{ end }}
</dd>
</div>
{{$isGroup := checkIsGroup .info.Wxid}}
{{ if eq $isGroup true }}
<!-- 水群排行榜 -->
<div class="flex justify-between gap-x-4 py-3 items-center">
<dt class="text-gray-500">
水群排行榜
<br/>
<span class="text-red-300">* 每天早上七点半定时发送</span>
</dt>
<dd class="flex items-start gap-x-2">
{{ template "chatRank" .info }}
</dd>
</div>
<!-- 群聊总结 -->
<div class="flex justify-between gap-x-4 py-3 items-center">
<dt class="text-gray-500">
群聊总结
<br/>
<span class="text-red-300">* 每天0点30定时发送</span>
</dt>
<dd class="flex items-start gap-x-2">
{{ template "summary" .info }}
</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" .info }}
</dd>
</div>
{{ end }}
<!-- 早报 -->
<div class="flex justify-between gap-x-4 py-3 items-center">
<dt class="text-gray-500">
早报
<br/>
<span class="text-red-300">* 每天早上八点定时发送</span>
</dt>
<dd class="flex items-start gap-x-2">
{{ template "news" .info }}
</dd>
</div>
<!-- 热榜 -->
<!-- <div class="flex justify-between gap-x-4 py-3 items-center">-->
<!-- <dt class="text-gray-500">-->
<!-- 热榜-->
<!-- <br/>-->
<!-- <span class="text-red-300">* 每个整点定时发送</span>-->
<!-- </dt>-->
<!-- <dd class="flex items-start gap-x-2">-->
<!-- {{ template "hotTop" .info }}-->
<!-- </dd>-->
<!-- </div>-->
{{ if eq $isGroup true }}
<!-- 自动清理不活跃成员 -->
<div class="flex justify-between gap-x-4 py-3 items-center">
<dt class="text-gray-500">
末位淘汰(需要机器人是<span class="text-red-500">管理员</span>)
<br/>
<span class="text-red-300">* 清理多少天不说话的成员0表示不清理</span>
</dt>
<dd class="flex items-start gap-x-2 items-center">
<div class="relative rounded-md">
<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="{{.info.ClearMember}}"
onblur="changeClearMember({{.info.Wxid}}, {{.info.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>
{{ end }}
</dl>
</div>
</div>
</body>
</html>