From bf52a63a523c866241aeee59447e5abb87cd82c2 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Thu, 22 Jan 2026 16:28:21 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B1=97=EB=B4=87=20=EC=BA=90=EB=A6=AD?= =?UTF-8?q?=ED=84=B0=20=EB=93=B1=EB=A1=9D=EC=8B=9C=20=EB=A6=AC=EC=A0=84=20?= =?UTF-8?q?=EC=84=A0=ED=83=9D=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Chat/CharacterForm.vue | 48 ++++++++++++++++++++++++++++---- src/views/Chat/CharacterList.vue | 15 +++++++++- 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/views/Chat/CharacterForm.vue b/src/views/Chat/CharacterForm.vue index 731c1a8..a563a52 100644 --- a/src/views/Chat/CharacterForm.vue +++ b/src/views/Chat/CharacterForm.vue @@ -109,11 +109,11 @@ - + + + + + + (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요') @@ -1197,6 +1227,10 @@ export default { const hasNonIdField = Object.keys(changed || {}).some(k => k !== 'id'); const imageChanged = !!this.character.image; // 새 이미지 선택 여부 return !(hasNonIdField || imageChanged); + }, + regionDisplayText() { + const option = this.regionOptions.find(opt => opt.value === this.character.region); + return option ? option.text : this.character.region; } }, @@ -1569,9 +1603,12 @@ export default { const result = { ...data }; // 기본값 보정 if (result.originalWorkId == null) result.originalWorkId = null; + // 리전 정보가 없는 경우 기본값 KR 설정 + if (!result.region) result.region = 'KR'; + const simpleFields = [ 'name', 'systemPrompt', 'description', 'age', 'gender', 'mbti', - 'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl' + 'characterType', 'speechPattern', 'speechStyle', 'appearance', 'imageUrl', 'region' ]; simpleFields.forEach(f => { if (result[f] == null) result[f] = ''; @@ -1595,6 +1632,7 @@ export default { speechPattern: this.character.speechPattern, speechStyle: this.character.speechStyle, appearance: this.character.appearance, + region: this.character.region, tags: this.character.tags || [], hobbies: this.character.hobbies || [], values: this.character.values || [], @@ -1615,7 +1653,7 @@ export default { // 기본 필드 비교 const simpleFields = [ 'name', 'description', 'age', 'gender', 'mbti', 'characterType', 'originalWorkId', - 'speechPattern', 'speechStyle', 'isActive' + 'speechPattern', 'speechStyle', 'isActive', 'region' ]; simpleFields.forEach(field => { diff --git a/src/views/Chat/CharacterList.vue b/src/views/Chat/CharacterList.vue index 117c5c4..dd54418 100644 --- a/src/views/Chat/CharacterList.vue +++ b/src/views/Chat/CharacterList.vue @@ -79,6 +79,9 @@ 태그 + + 리전 + 등록일 @@ -150,6 +153,7 @@ - + {{ getRegionText(item.region) }} {{ item.createdAt }} {{ item.updatedAt || '-' }} @@ -284,7 +288,11 @@ export default { total_page: 0, characters: [], selected_character: {}, - searchTerm: '' + searchTerm: '', + regionOptions: [ + { text: '한국', value: 'KR' }, + { text: '일본', value: 'JP' } + ] } }, @@ -301,6 +309,11 @@ export default { this.$dialog.notify.success(message) }, + getRegionText(region) { + if (!region) return '-'; + const option = this.regionOptions.find(opt => opt.value === region); + return option ? option.text : region; + }, showDetailDialog(item, type) { this.selected_character = item;