feat: add projects page route and navigation link
- Add GET /projects route in server.js with authentication check - Serve projects.html when authenticated, redirect to login otherwise - Add navigation header to both landing page and projects page - Include Sessions, Projects navigation links with active state styling - Add logout button to navigation header - Style navigation with dark theme matching existing design - Make navigation responsive for mobile devices Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
11
server.js
11
server.js
@@ -89,6 +89,17 @@ app.get('/claude/ide/*', requireAuth, (req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'public', 'claude-ide', 'index.html'));
|
||||
});
|
||||
|
||||
// Projects page route
|
||||
app.get('/projects', (req, res) => {
|
||||
if (req.session.userId) {
|
||||
// Authenticated - serve projects page
|
||||
res.sendFile(path.join(__dirname, 'public', 'projects.html'));
|
||||
} else {
|
||||
// Not authenticated - redirect to login
|
||||
res.redirect('/claude/');
|
||||
}
|
||||
});
|
||||
|
||||
// Serve static files (must come after specific routes)
|
||||
app.use('/claude', express.static(path.join(__dirname, 'public')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user