Fix likes display, add avatar system (presets+upload), improve desktop layout, fix profile viewing

This commit is contained in:
2026-05-29 14:21:40 +03:00
parent 3664b60f10
commit 025e52e6b1
19 changed files with 346 additions and 94 deletions

View File

@@ -1,7 +1,7 @@
import { Link, useLocation } from 'react-router-dom';
import { useAuth } from '@/hooks/useAuth';
import { Avatar, AvatarFallback } from '@/components/ui/avatar';
import { Home, PlusCircle, User, Shield } from 'lucide-react';
import UserAvatar from '@/components/UserAvatar';
import { Home, PlusCircle, Shield } from 'lucide-react';
export default function Navbar() {
const { user } = useAuth();
@@ -11,7 +11,7 @@ export default function Navbar() {
return (
<nav className="sticky top-0 z-50 nav-glass border-b border-[var(--border-light)]">
<div className="mx-auto flex h-14 max-w-[540px] items-center justify-between px-5">
<div className="mx-auto flex h-14 max-w-[900px] items-center justify-between px-5">
<Link to="/feed" className="text-[15px] font-800 tracking-tight text-[var(--fg)]">
Котограм
</Link>
@@ -24,11 +24,7 @@ export default function Navbar() {
<div className={`flex items-center justify-center h-8 w-8 rounded-full transition-all ${
location.pathname.startsWith('/profile') ? 'ring-2 ring-[var(--accent)] ring-offset-2 ring-offset-[var(--bg)]' : ''
}`}>
<Avatar className="h-8 w-8">
<AvatarFallback className="text-[11px] avatar-colored bg-[var(--accent)]">
{user.username.charAt(0).toUpperCase()}
</AvatarFallback>
</Avatar>
<UserAvatar avatarUrl={user.avatar_url} username={user.username} className="h-8 w-8" fallbackClassName="text-[11px] avatar-colored bg-[var(--accent)]" />
</div>
{user.is_admin && (
<span className="absolute -top-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-[var(--accent)] flex items-center justify-center ring-2 ring-[var(--bg)]">