fix: /simplify 리뷰 — UX/코드 품질 10건 수정
- EditableSegment: readOnly prop 추가, hover 배경색 효과 - MeetingDetailTabs: useMemo(parseSegments), 이중 debounce 제거, cleanup - MeetingChatPanel: sessionId deps, 에러 표시, key=timestamp - ExportMenu: i18n 위반 수정 (하드코딩 → t()) - MeetingModePage: 에러 Snackbar 피드백 (startRecording, viewDetail) - TranscriptTab: polish 실패 피드백 - 12개 locale i18n 키 5개 추가
This commit is contained in:
parent
403985e2cd
commit
f0e221058d
18 changed files with 179 additions and 49 deletions
|
|
@ -12,6 +12,7 @@ interface EditableSegmentProps {
|
|||
text: string
|
||||
edited: boolean // 수정 여부
|
||||
onEdit: (segmentId: string, newText: string) => void
|
||||
readOnly?: boolean
|
||||
}
|
||||
|
||||
function formatTimestamp(ms: number): string {
|
||||
|
|
@ -27,6 +28,7 @@ export function EditableSegment({
|
|||
text,
|
||||
edited,
|
||||
onEdit,
|
||||
readOnly = false,
|
||||
}: EditableSegmentProps): React.ReactElement {
|
||||
const { t } = useI18n()
|
||||
const [editing, setEditing] = useState(false)
|
||||
|
|
@ -34,9 +36,10 @@ export function EditableSegment({
|
|||
const inputRef = useRef<HTMLInputElement>(null)
|
||||
|
||||
const handleClick = useCallback(() => {
|
||||
if (readOnly) return
|
||||
setDraft(text)
|
||||
setEditing(true)
|
||||
}, [text])
|
||||
}, [readOnly, text])
|
||||
|
||||
const handleCommit = useCallback(() => {
|
||||
const trimmed = draft.trim()
|
||||
|
|
@ -104,12 +107,17 @@ export function EditableSegment({
|
|||
fontFamily: d3roFontMono,
|
||||
fontSize: 13,
|
||||
color: d3roPalette.text.primary,
|
||||
cursor: 'text',
|
||||
cursor: readOnly ? 'default' : 'text',
|
||||
borderBottom: edited ? `1px dashed ${d3roPalette.text.inactive}` : 'none',
|
||||
'&:hover': {
|
||||
color: d3roPalette.text.primary,
|
||||
borderBottomColor: edited ? d3roPalette.accent.amber : undefined,
|
||||
},
|
||||
borderRadius: '2px',
|
||||
px: readOnly ? 0 : '2px',
|
||||
'&:hover': readOnly
|
||||
? {}
|
||||
: {
|
||||
color: d3roPalette.text.primary,
|
||||
borderBottomColor: edited ? d3roPalette.accent.amber : undefined,
|
||||
bgcolor: edited ? undefined : d3roPalette.bg.elevated,
|
||||
},
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue