126 lines
4.1 KiB
HTML
126 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>码神的日记系统 - 仪表盘</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
.container { max-width: 1200px; margin: 0 auto; }
|
|
header {
|
|
text-align: center;
|
|
color: white;
|
|
margin-bottom: 30px;
|
|
}
|
|
header h1 { font-size: 2.5em; margin-bottom: 10px; }
|
|
.user-info {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background: white;
|
|
padding: 15px 20px;
|
|
border-radius: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.logout-btn {
|
|
background: #667eea;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
}
|
|
.logout-btn:hover { background: #5568d3; }
|
|
.content {
|
|
background: white;
|
|
padding: 40px;
|
|
border-radius: 10px;
|
|
text-align: center;
|
|
}
|
|
.content h2 { color: #333; margin-bottom: 20px; }
|
|
.content p { color: #666; margin-bottom: 30px; }
|
|
.feature-list {
|
|
text-align: left;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
.feature-item {
|
|
padding: 15px;
|
|
margin: 10px 0;
|
|
background: #f8f9fa;
|
|
border-radius: 5px;
|
|
border-left: 4px solid #667eea;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<header>
|
|
<h1>⚡ 码神的日记系统</h1>
|
|
<p>记录每天的进步与成长</p>
|
|
</header>
|
|
|
|
<div class="user-info">
|
|
<span>👤 欢迎,<strong id="username">用户</strong></span>
|
|
<button class="logout-btn" onclick="logout()">登出</button>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<h2>🎉 多用户系统已上线!</h2>
|
|
<p>你现在可以:</p>
|
|
<div class="feature-list">
|
|
<div class="feature-item">
|
|
<strong>📝 写日记</strong> - 记录每天的任务、学到的东西、反思和进步
|
|
</div>
|
|
<div class="feature-item">
|
|
<strong>📅 日历视图</strong> - 通过日历快速查看历史日记
|
|
</div>
|
|
<div class="feature-item">
|
|
<strong>💡 经验总结</strong> - 记录遇到的问题和解决方案
|
|
</div>
|
|
<div class="feature-item">
|
|
<strong>📊 任务管理</strong> - 追踪任务进展和完成率
|
|
</div>
|
|
<div class="feature-item">
|
|
<strong>🔒 数据隔离</strong> - 每个用户的数据完全独立
|
|
</div>
|
|
</div>
|
|
<p style="margin-top: 30px; color: #999;">
|
|
React 前端正在构建中,当前使用简化版界面<br>
|
|
完整功能即将上线...
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// 检查登录状态
|
|
fetch('/api/auth/me/')
|
|
.then(res => {
|
|
if (!res.ok) {
|
|
window.location.href = '/';
|
|
}
|
|
return res.json();
|
|
})
|
|
.then(data => {
|
|
document.getElementById('username').textContent = data.username;
|
|
})
|
|
.catch(() => {
|
|
window.location.href = '/';
|
|
});
|
|
|
|
function logout() {
|
|
fetch('/api/auth/logout/', { method: 'POST' })
|
|
.then(() => {
|
|
window.location.href = '/';
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|