| <!DOCTYPE html>
|
| <html lang="zh-CN">
|
| <head>
|
| <meta charset="UTF-8">
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| <title>{{ .title }}</title>
|
| <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
|
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| <link rel="stylesheet" href="/static/css/styles.css">
|
| <style>
|
| :root {
|
| --primary-color: #4285f4;
|
| --primary-dark: #3367d6;
|
| --secondary-color: #34a853;
|
| --danger-color: #ea4335;
|
| --warning-color: #fbbc05;
|
| --dark-bg: #202124;
|
| --light-bg: #f8f9fa;
|
| --card-bg: #ffffff;
|
| --border-color: #dadce0;
|
| --sidebar-width: 240px;
|
| }
|
|
|
| body {
|
| font-family: 'Roboto', sans-serif;
|
| margin: 0;
|
| padding: 0;
|
| min-height: 100vh;
|
| display: flex;
|
| background: var(--light-bg);
|
| }
|
|
|
|
|
| .sidebar {
|
| width: var(--sidebar-width);
|
| background: var(--dark-bg);
|
| color: white;
|
| position: fixed;
|
| height: 100vh;
|
| left: 0;
|
| top: 0;
|
| z-index: 100;
|
| box-shadow: 2px 0 10px rgba(0,0,0,0.1);
|
| transition: all 0.3s ease;
|
| }
|
|
|
| .sidebar-header {
|
| height: 64px;
|
| display: flex;
|
| align-items: center;
|
| padding: 0 20px;
|
| border-bottom: 1px solid rgba(255,255,255,0.1);
|
| }
|
|
|
| .sidebar-logo {
|
| font-size: 1.5rem;
|
| font-weight: 700;
|
| color: white;
|
| display: flex;
|
| align-items: center;
|
| gap: 10px;
|
| text-decoration: none;
|
| }
|
|
|
| .sidebar-logo i {
|
| color: var(--primary-color);
|
| }
|
|
|
| .sidebar-menu {
|
| padding: 20px 0;
|
| }
|
|
|
| .menu-item {
|
| padding: 12px 20px;
|
| display: flex;
|
| align-items: center;
|
| gap: 12px;
|
| color: rgba(255,255,255,0.8);
|
| text-decoration: none;
|
| transition: all 0.2s ease;
|
| border-left: 3px solid transparent;
|
| }
|
|
|
| .menu-item:hover {
|
| background: rgba(255,255,255,0.05);
|
| color: white;
|
| }
|
|
|
| .menu-item.active {
|
| background: rgba(234, 67, 53, 0.1);
|
| color: var(--danger-color);
|
| border-left: 3px solid var(--danger-color);
|
| }
|
|
|
| .menu-item i {
|
| font-size: 1.2rem;
|
| width: 24px;
|
| text-align: center;
|
| }
|
|
|
|
|
| .main-content {
|
| flex: 1;
|
| margin-left: var(--sidebar-width);
|
| padding: 30px;
|
| display: flex;
|
| justify-content: center;
|
| align-items: flex-start;
|
| }
|
|
|
| .reset-container {
|
| width: 100%;
|
| max-width: 600px;
|
| animation: fadeIn 0.6s ease-out;
|
| }
|
|
|
| .reset-card {
|
| background: var(--card-bg);
|
| border-radius: 10px;
|
| box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
| overflow: hidden;
|
| }
|
|
|
| .reset-header {
|
| background: var(--danger-color);
|
| padding: 20px;
|
| color: white;
|
| position: relative;
|
| }
|
|
|
| .reset-header h1 {
|
| margin: 0;
|
| font-size: 1.8rem;
|
| font-weight: 500;
|
| display: flex;
|
| align-items: center;
|
| gap: 10px;
|
| }
|
|
|
| .reset-body {
|
| padding: 30px;
|
| }
|
|
|
| .alert-danger {
|
| background-color: rgba(234, 67, 53, 0.1);
|
| border-radius: 8px;
|
| padding: 20px;
|
| margin-bottom: 25px;
|
| border-left: 4px solid var(--danger-color);
|
| display: flex;
|
| align-items: flex-start;
|
| gap: 15px;
|
| }
|
|
|
| .alert-icon {
|
| font-size: 2rem;
|
| color: var(--danger-color);
|
| animation: pulse 2s infinite;
|
| }
|
|
|
| .alert-content {
|
| flex: 1;
|
| }
|
|
|
| .alert-title {
|
| font-weight: 600;
|
| margin-bottom: 10px;
|
| color: var(--danger-color);
|
| font-size: 1.1rem;
|
| }
|
|
|
| .alert-text {
|
| color: #555;
|
| line-height: 1.5;
|
| }
|
|
|
| .btn {
|
| display: inline-block;
|
| padding: 12px 20px;
|
| background: var(--primary-color);
|
| color: white;
|
| border: none;
|
| border-radius: 5px;
|
| font-size: 1rem;
|
| font-weight: 500;
|
| cursor: pointer;
|
| transition: all 0.3s ease;
|
| text-align: center;
|
| text-decoration: none;
|
| }
|
|
|
| .btn-block {
|
| display: block;
|
| width: 100%;
|
| }
|
|
|
| .btn-danger {
|
| background: var(--danger-color);
|
| }
|
|
|
| .btn-danger:hover {
|
| background: #c62828;
|
| transform: translateY(-2px);
|
| box-shadow: 0 5px 15px rgba(234, 67, 53, 0.3);
|
| }
|
|
|
| .btn-outline {
|
| background: transparent;
|
| border: 1px solid var(--primary-color);
|
| color: var(--primary-color);
|
| }
|
|
|
| .btn-outline:hover {
|
| background: rgba(66, 133, 244, 0.1);
|
| }
|
|
|
| .form-actions {
|
| display: flex;
|
| justify-content: space-between;
|
| align-items: center;
|
| margin-top: 30px;
|
| }
|
|
|
| @keyframes fadeIn {
|
| from {
|
| opacity: 0;
|
| transform: translateY(20px);
|
| }
|
| to {
|
| opacity: 1;
|
| transform: translateY(0);
|
| }
|
| }
|
|
|
| @keyframes pulse {
|
| 0% {
|
| transform: scale(1);
|
| }
|
| 50% {
|
| transform: scale(1.1);
|
| }
|
| 100% {
|
| transform: scale(1);
|
| }
|
| }
|
|
|
|
|
| @media (max-width: 992px) {
|
| .sidebar {
|
| width: 70px;
|
| }
|
|
|
| .sidebar-logo span,
|
| .menu-item span {
|
| display: none;
|
| }
|
|
|
| .main-content {
|
| margin-left: 70px;
|
| }
|
| }
|
|
|
| @media (max-width: 768px) {
|
| .main-content {
|
| padding: 20px;
|
| }
|
|
|
| .form-actions {
|
| flex-direction: column;
|
| gap: 15px;
|
| }
|
|
|
| .form-actions .btn {
|
| width: 100%;
|
| }
|
| }
|
| </style>
|
| </head>
|
| <body>
|
|
|
| <div class="sidebar">
|
| <div class="sidebar-header">
|
| <a href="/admin/credentials" class="sidebar-logo">
|
| <i class="fas fa-shield-alt"></i>
|
| <span>管理控制台</span>
|
| </a>
|
| </div>
|
| <div class="sidebar-menu">
|
| <a href="/admin/credentials" class="menu-item">
|
| <i class="fas fa-key"></i>
|
| <span>凭据管理</span>
|
| </a>
|
| <a href="/admin/change-password" class="menu-item">
|
| <i class="fas fa-lock"></i>
|
| <span>修改密码</span>
|
| </a>
|
| <a href="/admin/reset-password" class="menu-item active">
|
| <i class="fas fa-sync-alt"></i>
|
| <span>重置密码</span>
|
| </a>
|
| <a href="/admin/login" class="menu-item">
|
| <i class="fas fa-sign-out-alt"></i>
|
| <span>退出登录</span>
|
| </a>
|
| </div>
|
| </div>
|
|
|
|
|
| <div class="main-content">
|
| <div class="reset-container">
|
| <div class="reset-card">
|
| <div class="reset-header">
|
| <h1><i class="fas fa-sync-alt"></i> {{ .title }}</h1>
|
| </div>
|
|
|
| <div class="reset-body">
|
| <div class="alert-danger">
|
| <div class="alert-icon">
|
| <i class="fas fa-exclamation-triangle"></i>
|
| </div>
|
| <div class="alert-content">
|
| <div class="alert-title">警告:此操作不可撤销</div>
|
| <div class="alert-text">
|
| 重置密码将生成一个新的随机密码,并使当前密码失效。您需要使用新密码重新登录系统。
|
| <br><br>
|
| 请确保您真的需要重置密码,因为此操作完成后无法恢复。
|
| </div>
|
| </div>
|
| </div>
|
|
|
| <form action="/admin/reset-password" method="POST" onsubmit="return confirmReset()">
|
| <div class="form-actions">
|
| <a href="/admin/credentials" class="btn btn-outline">
|
| <i class="fas fa-arrow-left"></i> 返回
|
| </a>
|
|
|
| <button type="submit" class="btn btn-danger">
|
| <i class="fas fa-sync-alt"></i> 重置密码
|
| </button>
|
| </div>
|
| </form>
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
|
|
|
|
| <script>
|
| function confirmReset() {
|
| return confirm('确定要重置密码吗?此操作不可撤销。');
|
| }
|
| </script>
|
| </body>
|
| </html> |