feat: 프로필 사진 업로드·프로필 페이지 + 모달/이름 개선
- 프로필 페이지 /u/:sabun 신설 (본인=비공개 포함, 타인=공개만). 헤더 "내 프로필", 카드·모달·댓글 작성자 클릭 시 프로필로 이동. - 프로필 사진 업로드: users.avatar(bytea) 저장, GET /avatar/:sabun (업로드본 없으면 identicon SVG 폴백), POST /profile/avatar(express.raw). 브라우저 canvas 크롭(256px webp) — 서버 이미지 라이브러리/멀터 불필요. identicon 6개 렌더 지점을 avatar() 헬퍼로 통일. - 상세 모달 폭 640→760px, 소유자 액션(비공개 전환·삭제)을 우측 그룹으로 묶어 한 줄 정렬. - 표시 이름을 한국식 성+이름(family_name+given_name)으로 교정. - .project-env.example ADMIN_ROLE→ADMIN_GROUP 정리. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,10 +5,14 @@ CREATE TABLE IF NOT EXISTS users (
|
||||
sabun text PRIMARY KEY, -- 사번 (Keycloak preferred_username)
|
||||
name text NOT NULL,
|
||||
email text,
|
||||
avatar_seed text, -- 아바타 색/이니셜용
|
||||
avatar_seed text, -- 아바타 색/이니셜용(미업로드 시 identicon 시드)
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
last_login timestamptz
|
||||
);
|
||||
-- 업로드한 프로필 사진(1:1 크롭·256px webp 등, 브라우저에서 축소). 없으면 identicon 폴백.
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS avatar bytea;
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS avatar_mime text;
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS avatar_updated_at timestamptz;
|
||||
|
||||
-- 공유 프로젝트 (직원이 만든 앱/repo 를 포털에 공유)
|
||||
CREATE TABLE IF NOT EXISTS projects (
|
||||
|
||||
Reference in New Issue
Block a user