🎨 优化登录页面样式,修复按钮图标对齐问题;增强定时任务删除错误处理
All checks were successful
BuildImage / build-image (push) Successful in 1m51s
All checks were successful
BuildImage / build-image (push) Successful in 1m51s
This commit is contained in:
parent
5247077479
commit
932d754b8a
@ -74,5 +74,8 @@ func DeleteJob(robotId uint) {
|
||||
log.Printf("定时任务不存在,robotId: %d", robotId)
|
||||
return
|
||||
}
|
||||
_ = scheduler.RemoveJob(jobId.(uuid.UUID))
|
||||
if err := scheduler.RemoveJob(jobId.(uuid.UUID)); err != nil {
|
||||
log.Printf("删除定时任务失败: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -14,18 +14,18 @@
|
||||
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
background-color: #f8fafc;
|
||||
}
|
||||
|
||||
|
||||
.pattern-grid {
|
||||
background-image: linear-gradient(#e5e7eb 1px, transparent 1px), linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
|
||||
background-size: 30px 30px;
|
||||
background-position: center center;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
|
||||
.animate-float {
|
||||
animation: float 6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes float {
|
||||
0% { transform: translateY(0px) rotate(0deg); }
|
||||
50% { transform: translateY(-10px) rotate(1deg); }
|
||||
@ -38,7 +38,7 @@
|
||||
<div class="absolute inset-0 pattern-grid"></div>
|
||||
<div class="absolute top-20 left-20 w-64 h-64 rounded-full bg-blue-50 blur-3xl opacity-50"></div>
|
||||
<div class="absolute bottom-20 right-20 w-64 h-64 rounded-full bg-indigo-50 blur-3xl opacity-50"></div>
|
||||
|
||||
|
||||
<div class="w-full max-w-md relative z-10">
|
||||
<!-- 登录卡片 -->
|
||||
<div class="bg-white rounded-2xl shadow-xl overflow-hidden border border-gray-100">
|
||||
@ -50,12 +50,12 @@
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold text-gray-800 mb-1">欢迎回来</h1>
|
||||
<p class="text-sm text-gray-500">请输入您的管理密钥进入系统</p>
|
||||
|
||||
|
||||
<!-- 装饰元素 -->
|
||||
<div class="absolute right-6 top-6 w-12 h-12 bg-gray-50 rounded-full opacity-10"></div>
|
||||
<div class="absolute left-6 bottom-6 w-8 h-8 bg-gray-50 rounded-full opacity-10"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<div class="p-8">
|
||||
{{if .ErrorMsg}}
|
||||
@ -66,31 +66,27 @@
|
||||
<span class="text-sm text-red-700">{{.ErrorMsg}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
<form method="POST" action="/login" class="space-y-6">
|
||||
<div>
|
||||
<label for="token" class="block text-sm font-medium text-gray-700 mb-2">
|
||||
访问密钥
|
||||
</label>
|
||||
<div class="relative">
|
||||
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
||||
<i class="fas fa-key text-gray-400"></i>
|
||||
</div>
|
||||
<input id="token" name="token" type="password" required
|
||||
<input id="token" name="token" type="password" required
|
||||
class="block w-full pl-10 pr-3 py-3 border border-gray-200 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm bg-gray-50 text-gray-900 transition-all"
|
||||
placeholder="请输入访问密钥"
|
||||
autocomplete="current-password">
|
||||
</div>
|
||||
<p class="mt-2 text-xs text-gray-500">默认密钥为 admin,仅供演示使用</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 修改登录按钮样式,使颜色与整体设计风格一致并修复图标与文本对齐问题 -->
|
||||
<button type="submit" class="w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-white bg-slate-800 hover:bg-slate-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500 font-medium transition-all">
|
||||
<i class="fas fa-sign-in-alt mr-2 text-center"></i> 登录系统
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 页脚区域 -->
|
||||
<div class="py-4 px-8 bg-gray-50 text-center border-t border-gray-100">
|
||||
<a href="/" class="text-sm text-gray-600 hover:text-indigo-600 flex items-center justify-center">
|
||||
@ -98,7 +94,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 页脚版权信息 -->
|
||||
<div class="mt-8 text-center text-xs text-gray-500">
|
||||
<p>© 2025 WeChatBot 微信机器人管理系统</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user