@@ -804,10 +804,10 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
:key="ri"
class="c-reply"
>
-
{{ r.author.name }}{{ r.time }}
@@ -841,10 +841,10 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
class="reply-form"
:class="{ open: replyOpen === i }"
>
-
{{ me.initial }}
+
-
{{ task.issuer.initial }}
+
{{ task.issuer.name }}
{{ task.issuer.role }}
@@ -1606,7 +1606,10 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
v-else-if="item.type === 'user'"
class="ag-msg user"
>
- 정
+
{{ item.text }}
@@ -3121,7 +3124,7 @@ a.file-info {
}
.ag-msg.user .ava {
order: 2;
- background: #0ea5a3;
+ /* 내부 UserAvatar 가 이미지/placeholder 로 배경을 채운다 */
color: #fff;
border-radius: 50%;
}
diff --git a/frontend/src/shared/utils/format.ts b/frontend/src/shared/utils/format.ts
index ec39a96..e744e95 100644
--- a/frontend/src/shared/utils/format.ts
+++ b/frontend/src/shared/utils/format.ts
@@ -26,25 +26,6 @@ export function formatDate(input: Date | string): string {
* (서버는 타임스탬프/카운트만 내려주고 여기서 계산한다)
* ============================================================ */
-/** 아바타 색상 키 (relay.css 의 .av-* 클래스와 대응) */
-export type AvatarColorKey = 'av-a' | 'av-b' | 'av-c' | 'av-d' | 'av-e' | 'av-f'
-
-const AVATAR_COLORS: AvatarColorKey[] = ['av-a', 'av-b', 'av-c', 'av-d', 'av-e', 'av-f']
-
-/** 식별자(문자열)를 결정적으로 아바타 색상에 매핑 */
-export function avatarColor(seed: string): AvatarColorKey {
- let hash = 0
- for (let i = 0; i < seed.length; i++) {
- hash = (hash * 31 + seed.charCodeAt(i)) >>> 0
- }
- return AVATAR_COLORS[hash % AVATAR_COLORS.length] ?? 'av-a'
-}
-
-/** 이름의 첫 글자(아바타 이니셜) */
-export function initialOf(name: string): string {
- return name.trim().charAt(0) || '?'
-}
-
/** ISO 문자열/Date 를 한국어 상대시간으로 (예: "2시간 전", "어제", "3일 전") */
export function relativeTimeKo(input: Date | string): string {
const date = typeof input === 'string' ? new Date(input) : input
diff --git a/frontend/src/stores/activity.store.ts b/frontend/src/stores/activity.store.ts
index d7344d6..9e23181 100644
--- a/frontend/src/stores/activity.store.ts
+++ b/frontend/src/stores/activity.store.ts
@@ -2,10 +2,8 @@ import { ref } from 'vue'
import { defineStore } from 'pinia'
import { useActivity } from '@/composables/useActivity'
import {
- avatarColor,
dayGroupKo,
escapeHtml,
- initialOf,
monthDayKo,
relativeTimeKo,
taskStatusLabel,
@@ -24,10 +22,11 @@ function pstr(payload: Record
, key: string): string {
}
// 행위자/시간 등 공통 필드
-function baseOf(api: ApiActivity): Pick {
+function baseOf(
+ api: ApiActivity,
+): Pick {
return {
- initial: initialOf(api.actor?.name ?? '?'),
- color: avatarColor(api.actor?.id ?? ''),
+ avatarUrl: api.actor?.avatarUrl ?? null,
time: relativeTimeKo(api.createdAt),
}
}
diff --git a/frontend/src/stores/member.store.ts b/frontend/src/stores/member.store.ts
index cd2fd2e..e1b049d 100644
--- a/frontend/src/stores/member.store.ts
+++ b/frontend/src/stores/member.store.ts
@@ -2,7 +2,6 @@ import { ref } from 'vue'
import { defineStore } from 'pinia'
import { useMember } from '@/composables/useMember'
import { useAuthStore } from '@/stores/auth.store'
-import { avatarColor, initialOf } from '@/shared/utils/format'
import { DEFAULT_PAGE_SIZE } from '@/types/pagination'
import type {
ApiRepoMember,
@@ -18,8 +17,7 @@ function toMemberView(api: ApiRepoMember, currentUserId: string | null): MemberV
id: api.user.id,
name: api.user.name,
role: api.user.role ?? '',
- initial: initialOf(api.user.name),
- color: avatarColor(api.user.id),
+ avatarUrl: api.user.avatarUrl,
},
email: api.email,
taskCount: api.taskCount,
diff --git a/frontend/src/stores/my-task.store.ts b/frontend/src/stores/my-task.store.ts
index 9e0f2a1..7f04137 100644
--- a/frontend/src/stores/my-task.store.ts
+++ b/frontend/src/stores/my-task.store.ts
@@ -2,7 +2,7 @@ import { computed, ref } from 'vue'
import { defineStore } from 'pinia'
import { useMyTask } from '@/composables/useMyTask'
import { DEFAULT_PAGE_SIZE } from '@/types/pagination'
-import { avatarColor, initialOf, taskDueInfo, taskStatusLabel } from '@/shared/utils/format'
+import { taskDueInfo, taskStatusLabel } from '@/shared/utils/format'
import type { ApiMember } from '@/types/repo'
import type { ApiMyTaskRow } from '@/types/my-task'
import type {
@@ -18,8 +18,7 @@ function toUserView(m: ApiMember): UserView {
id: m.id,
name: m.name,
role: m.role ?? '',
- initial: initialOf(m.name),
- color: avatarColor(m.id),
+ avatarUrl: m.avatarUrl,
}
}
diff --git a/frontend/src/stores/repo.store.ts b/frontend/src/stores/repo.store.ts
index b690911..8913025 100644
--- a/frontend/src/stores/repo.store.ts
+++ b/frontend/src/stores/repo.store.ts
@@ -2,7 +2,7 @@ import { computed, ref } from 'vue'
import { defineStore } from 'pinia'
import { useRepo } from '@/composables/useRepo'
import { DEFAULT_PAGE_SIZE } from '@/types/pagination'
-import { avatarColor, initialOf, progressOf, relativeTimeKo } from '@/shared/utils/format'
+import { progressOf, relativeTimeKo } from '@/shared/utils/format'
import type { ApiMember, ApiRepo, CreateRepoPayload, UpdateRepoPayload } from '@/types/repo'
import type { Repo as RepoView, User as UserView } from '@/mock/relay.mock'
@@ -15,8 +15,7 @@ function toUserView(member: ApiMember): UserView {
id: member.id,
name: member.name,
role: member.role ?? '',
- initial: initialOf(member.name),
- color: avatarColor(member.id),
+ avatarUrl: member.avatarUrl,
}
}
diff --git a/frontend/src/stores/task.store.ts b/frontend/src/stores/task.store.ts
index b76749f..3d60ab5 100644
--- a/frontend/src/stores/task.store.ts
+++ b/frontend/src/stores/task.store.ts
@@ -3,10 +3,8 @@ import { defineStore } from 'pinia'
import { useTask } from '@/composables/useTask'
import { DEFAULT_PAGE_SIZE } from '@/types/pagination'
import {
- avatarColor,
escapeHtml,
formatBytes,
- initialOf,
monthDayKo,
relativeTimeKo,
taskDueInfo,
@@ -42,8 +40,7 @@ function toUserView(m: ApiMember): UserView {
id: m.id,
name: m.name,
role: m.role ?? '',
- initial: initialOf(m.name),
- color: avatarColor(m.id),
+ avatarUrl: m.avatarUrl,
}
}
@@ -52,8 +49,6 @@ const UNKNOWN_USER: UserView = {
id: '',
name: '알 수 없음',
role: '',
- initial: '?',
- color: 'av-a',
}
// API 업무 목록 행 → 화면용 RepoTask
diff --git a/frontend/src/types/auth.ts b/frontend/src/types/auth.ts
index 7c1a25b..931136e 100644
--- a/frontend/src/types/auth.ts
+++ b/frontend/src/types/auth.ts
@@ -4,6 +4,7 @@ export interface AuthUser {
email: string
name: string
role: string | null
+ avatarUrl: string | null
}
// 로그인 요청 페이로드
diff --git a/frontend/src/types/repo.ts b/frontend/src/types/repo.ts
index 757b2b6..eecef62 100644
--- a/frontend/src/types/repo.ts
+++ b/frontend/src/types/repo.ts
@@ -6,6 +6,7 @@ export interface ApiMember {
email: string
name: string
role: string | null
+ avatarUrl: string | null
}
// 저장소(API 원시) — 백엔드 RepoResponse 와 1:1