S3+S4: user param auth, static file serving, Docker deploy config
- replace hardcoded benji with ?user= query param - add GET /api/users and GET /api/me?user= endpoints - serve frontend static files via tower-http ServeDir - add multi-stage Dockerfile (Rust + Vite → single image) - add docker-compose.yml + Caddyfile for apes.unslope.com - frontend: getCurrentUsername() from URL param → localStorage - sidebar shows current user Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import type { Channel } from "@/types/Channel";
|
||||
import { createChannel } from "@/api";
|
||||
import { createChannel, getCurrentUsername } from "@/api";
|
||||
|
||||
interface Props {
|
||||
channels: Channel[];
|
||||
@@ -61,6 +61,12 @@ export function ChannelSidebar({
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Current user */}
|
||||
<div className="px-3 py-2 border-t border-sidebar-border text-[11px]">
|
||||
<span className="text-muted-foreground">logged in as </span>
|
||||
<span className="font-bold text-foreground">{getCurrentUsername()}</span>
|
||||
</div>
|
||||
|
||||
{/* New channel input */}
|
||||
<div className="p-2 border-t border-sidebar-border">
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user