1
0
forked from lxh/go-wxhelper

🎨 群组管理页面优化

This commit is contained in:
李寻欢 2024-06-18 17:14:46 +08:00
parent b14dbe0d1d
commit c0dcffce9d

View File

@ -21,7 +21,7 @@
<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"> <ul role="list" class="grid grid-cols-1 gap-x-6 gap-y-8 lg:grid-cols-2 xl:gap-x-8">
{{ range .groups }} {{ range .groups }}
<li class="overflow-hidden rounded-xl border border-gray-200"> <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"> <div class="flex items -center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-6">
@ -49,26 +49,42 @@
</div> </div>
<!-- AI --> <!-- AI -->
<div class="flex justify-between gap-x-4 py-3 items-center"> <div class="flex justify-between gap-x-4 py-3 items-center">
<dt class="text-gray-500">AI</dt> <dt class="text-gray-500">AI(模型可选默认或者指定模型)</dt>
<dd class="flex items-start gap-x-2"> <dd class="flex items-start gap-x-2 items-center">
<div> <div>
{{ template "ai" . }} {{ template "ai" . }}
</div> </div>
{{ if eq .EnableAi true }} {{ if eq .EnableAi true }}
<div class="float-end"> <div class="float-end">
<select <div>
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" <label>
onchange="aiAssistantChange(event, {{.Wxid}})"> <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}})">
<option value="" {{ if eq .Prompt {{$useModel := .AiModel}}
"" }}selected{{ end }}>默认</option> {{ 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}} {{$usePrompt := .Prompt}}
{{ range $.assistant }} {{ range $.assistant }}
<option value="{{.Id}}" {{ if eq $usePrompt .Id}}selected{{ end }}> <option value="{{.Id}}" {{ if eq $usePrompt .Id}}selected{{ end }}>
{{.Name}} {{.Name}}
</option> </option>
{{ end }} {{ end }}
</select> </select>
</label>
</div>
</div> </div>
{{ end }} {{ end }}
</dd> </dd>
@ -111,7 +127,7 @@
<!-- 自动清理不活跃成员 --> <!-- 自动清理不活跃成员 -->
<div class="flex justify-between gap-x-4 py-3 items-center"> <div class="flex justify-between gap-x-4 py-3 items-center">
<dt class="text-gray-500">末位淘汰</dt> <dt class="text-gray-500">末位淘汰</dt>
<dd class="flex items-start gap-x-2"> <dd class="flex items-start gap-x-2 items-center">
<div class="relative rounded-md shadow-sm"> <div class="relative rounded-md shadow-sm">
<label> <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天不活跃自动移除" <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天不活跃自动移除"