settings.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>设置 - TG Admin</title>
  7. <link rel="stylesheet" href="../src/styles/main.css">
  8. </head>
  9. <body class="min-h-screen bg-gray-50">
  10. <div class="flex min-h-screen">
  11. <!-- Sidebar Overlay (Mobile) -->
  12. <div id="sidebar-overlay" class="fixed inset-0 bg-black/50 z-40 lg:hidden hidden"></div>
  13. <!-- Sidebar -->
  14. <aside id="sidebar" class="fixed lg:static inset-y-0 left-0 z-50 w-64 bg-gradient-to-b from-gray-900 via-gray-900 to-black transform -translate-x-full lg:translate-x-0 transition-transform duration-200">
  15. <div class="flex flex-col h-full">
  16. <div class="flex items-center justify-between h-16 px-6 border-b border-white/10">
  17. <div class="flex items-center gap-3">
  18. <div class="w-8 h-8 bg-white rounded-lg flex items-center justify-center">
  19. <svg class="w-4 h-4 text-black" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  20. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"/>
  21. </svg>
  22. </div>
  23. <span class="text-white font-semibold">TG Admin</span>
  24. </div>
  25. <button id="sidebar-close" class="lg:hidden text-gray-400 hover:text-white">
  26. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  27. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
  28. </svg>
  29. </button>
  30. </div>
  31. <nav class="flex-1 px-4 py-6 space-y-1 overflow-y-auto">
  32. <a href="dashboard.html" class="nav-item">
  33. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  34. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
  35. </svg>
  36. <span>Dashboard</span>
  37. </a>
  38. <a href="users.html" class="nav-item">
  39. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  40. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z"/>
  41. </svg>
  42. <span>用户管理</span>
  43. </a>
  44. <a href="settings.html" class="nav-item active">
  45. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  46. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/>
  47. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
  48. </svg>
  49. <span>设置</span>
  50. </a>
  51. </nav>
  52. <div class="px-6 py-4 border-t border-white/10">
  53. <a href="auth/login.html" class="flex items-center gap-3 text-gray-400 hover:text-white transition-colors">
  54. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  55. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"/>
  56. </svg>
  57. <span>退出登录</span>
  58. </a>
  59. </div>
  60. </div>
  61. </aside>
  62. <!-- Main Content -->
  63. <div class="flex-1 flex flex-col min-w-0">
  64. <!-- Header -->
  65. <header class="h-16 bg-white border-b border-gray-200 flex items-center justify-between px-4 lg:px-8">
  66. <button id="sidebar-toggle" class="lg:hidden p-2 -ml-2 text-gray-600 hover:text-black">
  67. <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  68. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
  69. </svg>
  70. </button>
  71. <h1 class="text-lg font-semibold text-black hidden lg:block">设置</h1>
  72. <div class="relative">
  73. <button data-dropdown-toggle="user-dropdown" class="flex items-center gap-3 cursor-pointer">
  74. <div class="w-8 h-8 bg-gray-900 rounded-full flex items-center justify-center">
  75. <span class="text-white text-sm font-medium">A</span>
  76. </div>
  77. <span class="hidden sm:block text-sm font-medium text-gray-700">Admin</span>
  78. </button>
  79. <div id="user-dropdown" data-dropdown class="hidden absolute right-0 mt-2 w-48 bg-white border border-gray-200 shadow-lg z-50">
  80. <a href="settings.html" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">设置</a>
  81. <a href="auth/login.html" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50">退出登录</a>
  82. </div>
  83. </div>
  84. </header>
  85. <!-- Page Content -->
  86. <main class="flex-1 p-4 lg:p-8 overflow-auto">
  87. <div class="mb-8">
  88. <h2 class="text-2xl lg:text-3xl font-bold text-black">设置</h2>
  89. <p class="text-gray-400 mt-1">管理您的账户和系统设置</p>
  90. </div>
  91. <div class="max-w-2xl space-y-6">
  92. <!-- Profile Section -->
  93. <div class="card">
  94. <h3 class="text-lg font-semibold text-black mb-6">个人资料</h3>
  95. <form class="space-y-6">
  96. <div class="flex items-center gap-6 pb-6 border-b border-gray-100">
  97. <div class="w-20 h-20 bg-gray-900 rounded-full flex items-center justify-center flex-shrink-0">
  98. <span class="text-white text-2xl font-medium">A</span>
  99. </div>
  100. <div>
  101. <button type="button" class="btn-secondary w-auto px-4 py-2 text-sm">更换头像</button>
  102. <p class="text-xs text-gray-400 mt-2">支持 JPG、PNG 格式,最大 2MB</p>
  103. </div>
  104. </div>
  105. <div class="grid grid-cols-1 sm:grid-cols-2 gap-6">
  106. <div>
  107. <label class="block text-sm font-medium text-gray-700 mb-2">用户名</label>
  108. <input type="text" value="Admin" class="input-box">
  109. </div>
  110. <div>
  111. <label class="block text-sm font-medium text-gray-700 mb-2">邮箱</label>
  112. <input type="email" value="admin@example.com" class="input-box">
  113. </div>
  114. </div>
  115. <div>
  116. <label class="block text-sm font-medium text-gray-700 mb-2">个人简介</label>
  117. <textarea rows="3" class="input-box" placeholder="介绍一下自己..."></textarea>
  118. </div>
  119. <div class="flex justify-end">
  120. <button type="submit" class="btn-primary w-auto px-6">保存更改</button>
  121. </div>
  122. </form>
  123. </div>
  124. <!-- Security Section -->
  125. <div class="card">
  126. <h3 class="text-lg font-semibold text-black mb-6">安全设置</h3>
  127. <form class="space-y-6">
  128. <div>
  129. <label class="block text-sm font-medium text-gray-700 mb-2">当前密码</label>
  130. <input type="password" placeholder="输入当前密码" class="input-box">
  131. </div>
  132. <div class="grid grid-cols-1 sm:grid-cols-2 gap-6">
  133. <div>
  134. <label class="block text-sm font-medium text-gray-700 mb-2">新密码</label>
  135. <input type="password" placeholder="输入新密码" class="input-box">
  136. </div>
  137. <div>
  138. <label class="block text-sm font-medium text-gray-700 mb-2">确认新密码</label>
  139. <input type="password" placeholder="再次输入新密码" class="input-box">
  140. </div>
  141. </div>
  142. <div class="flex justify-end">
  143. <button type="submit" class="btn-primary w-auto px-6">更新密码</button>
  144. </div>
  145. </form>
  146. </div>
  147. <!-- Notification Section -->
  148. <div class="card">
  149. <h3 class="text-lg font-semibold text-black mb-6">通知设置</h3>
  150. <div class="space-y-4">
  151. <label class="flex items-center justify-between cursor-pointer group">
  152. <div>
  153. <div class="font-medium text-gray-900">邮件通知</div>
  154. <div class="text-sm text-gray-400">接收系统通知和更新</div>
  155. </div>
  156. <input type="checkbox" checked class="w-5 h-5 rounded border-gray-300 text-black focus:ring-black cursor-pointer">
  157. </label>
  158. <label class="flex items-center justify-between cursor-pointer group border-t border-gray-100 pt-4">
  159. <div>
  160. <div class="font-medium text-gray-900">安全提醒</div>
  161. <div class="text-sm text-gray-400">登录异常时发送提醒</div>
  162. </div>
  163. <input type="checkbox" checked class="w-5 h-5 rounded border-gray-300 text-black focus:ring-black cursor-pointer">
  164. </label>
  165. <label class="flex items-center justify-between cursor-pointer group border-t border-gray-100 pt-4">
  166. <div>
  167. <div class="font-medium text-gray-900">营销邮件</div>
  168. <div class="text-sm text-gray-400">接收产品更新和优惠信息</div>
  169. </div>
  170. <input type="checkbox" class="w-5 h-5 rounded border-gray-300 text-black focus:ring-black cursor-pointer">
  171. </label>
  172. </div>
  173. </div>
  174. <!-- Danger Zone -->
  175. <div class="card border-red-200">
  176. <h3 class="text-lg font-semibold text-red-600 mb-4">危险区域</h3>
  177. <p class="text-sm text-gray-600 mb-4">删除账户后,所有数据将被永久清除,此操作不可撤销。</p>
  178. <button class="px-4 py-2 border border-red-600 text-red-600 hover:bg-red-50 transition-colors text-sm font-medium">
  179. 删除账户
  180. </button>
  181. </div>
  182. </div>
  183. </main>
  184. </div>
  185. </div>
  186. <script type="module" src="../src/js/main.js"></script>
  187. </body>
  188. </html>