fix: resolve profile photo rendering and upload issues
This commit is contained in:
parent
fa5d400a0d
commit
b399992dc5
3 changed files with 10 additions and 4 deletions
|
|
@ -39,9 +39,11 @@ services:
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
- "traefik.http.routers.minio.rule=Host(`minio-task2.beetech.dev`)"
|
- "traefik.http.routers.minio.rule=Host(`minio-task2.beetech.dev`)"
|
||||||
- "traefik.http.routers.minio.entrypoints=web"
|
- "traefik.http.routers.minio.entrypoints=web"
|
||||||
|
- "traefik.http.routers.minio.service=minio"
|
||||||
- "traefik.http.services.minio.loadbalancer.server.port=9000"
|
- "traefik.http.services.minio.loadbalancer.server.port=9000"
|
||||||
- "traefik.http.routers.minio-console.rule=Host(`console-task2.beetech.dev`)"
|
- "traefik.http.routers.minio-console.rule=Host(`console-task2.beetech.dev`)"
|
||||||
- "traefik.http.routers.minio-console.entrypoints=web"
|
- "traefik.http.routers.minio-console.entrypoints=web"
|
||||||
|
- "traefik.http.routers.minio-console.service=minio-console"
|
||||||
- "traefik.http.services.minio-console.loadbalancer.server.port=9001"
|
- "traefik.http.services.minio-console.loadbalancer.server.port=9001"
|
||||||
|
|
||||||
minio-init:
|
minio-init:
|
||||||
|
|
@ -82,7 +84,7 @@ services:
|
||||||
MINIO_ACCESS_KEY: ${MINIO_ROOT_USER:-beetask123}
|
MINIO_ACCESS_KEY: ${MINIO_ROOT_USER:-beetask123}
|
||||||
MINIO_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-beetaskpassword}
|
MINIO_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-beetaskpassword}
|
||||||
MINIO_BUCKET: avatars
|
MINIO_BUCKET: avatars
|
||||||
MINIO_PUBLIC_URL: http://localhost:9000
|
MINIO_PUBLIC_URL: ${MINIO_PUBLIC_URL:-http://localhost:9000}
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
||||||
|
|
@ -397,10 +397,14 @@ export function AppShell() {
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<button
|
<button
|
||||||
onClick={() => setShowAvatarDropdown(!showAvatarDropdown)}
|
onClick={() => setShowAvatarDropdown(!showAvatarDropdown)}
|
||||||
className="flex h-9 w-9 items-center justify-center rounded-full bg-brand/10 text-brand hover:bg-brand hover:text-white transition-all"
|
className="flex h-9 w-9 items-center justify-center rounded-full bg-brand/10 text-brand transition-all overflow-hidden border border-brand/20 hover:border-brand"
|
||||||
title={user?.name}
|
title={user?.name}
|
||||||
>
|
>
|
||||||
<User size={18} />
|
{user?.photo ? (
|
||||||
|
<img src={user.photo} alt={user.name} className="h-full w-full object-cover" />
|
||||||
|
) : (
|
||||||
|
<User size={18} />
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{showAvatarDropdown && (
|
{showAvatarDropdown && (
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ export const ProfilePage: React.FC = () => {
|
||||||
<input
|
<input
|
||||||
ref={fileInputRef}
|
ref={fileInputRef}
|
||||||
type="file"
|
type="file"
|
||||||
accept="image/*"
|
accept="image/jpeg, image/png, image/webp"
|
||||||
className="hidden"
|
className="hidden"
|
||||||
onChange={handleFileChange}
|
onChange={handleFileChange}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue