Skip to content

Commit

Permalink
Fix edit message style (#105)
Browse files Browse the repository at this point in the history
Co-authored-by: AceDataCloud <[email protected]>
  • Loading branch information
Germey and AceDataCloud authored Aug 14, 2024
1 parent 907ee27 commit 895f93d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix edit message",
"packageName": "@acedatacloud/nexior",
"email": "[email protected]",
"dependentChangeType": "patch"
}
23 changes: 3 additions & 20 deletions src/components/chat/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@
@keydown.enter.exact.prevent="sendEdit"
></el-input>
<div class="button-group">
<el-button size="small" class="cancel-button" @click="cancelEdit">取消</el-button>
<el-button type="primary" size="small" class="send-button" @click="sendEdit">发送</el-button>
<el-button size="small" round @click="cancelEdit">{{ $t('common.button.cancel') }}</el-button>
<el-button type="primary" size="small" round @click="sendEdit">{{ $t('common.button.confirm') }}</el-button>
</div>
</div>
<answering-mark v-if="message.state === messageState.PENDING" />
</div>

<div class="operations">
<copy-to-clipboard v-if="!Array.isArray(message.content)" :content="message.content!" class="btn-copy" />
</div>
Expand Down Expand Up @@ -270,6 +269,7 @@ export default defineComponent({
// background-color: var(--el-bg-color-page);
// color: var(--el-text-color-primary);
padding: 10px;
min-width: 400px;
width: 100%;
height: 100%;
.chat-input {
Expand All @@ -282,23 +282,6 @@ export default defineComponent({
position: absolute;
bottom: 10px;
right: 10px;
.cancel-button {
// background-color: #333;
// color: white;
background-color: var(--el-bg-color-page);
color: var(--el-text-color-primary);
border-radius: 20px;
// border: none;
}
.send-button {
// background-color: white;
// color: black;
background-color: var(--el-bg-color-page);
color: var(--el-text-color-primary);
border-radius: 20px;
// border: none;
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/chat/Conversation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export default defineComponent({
id: conversationId,
messages: this.messages
});
console.debug('finished update conversation', this.messages);
// 3. Send edited questions
this.messages.push({
Expand Down Expand Up @@ -282,6 +283,7 @@ export default defineComponent({
},
// Get answers to questions
async onFetchAnswer() {
console.debug('start to get answer', this.messages);
const token = this.credential?.token;
const question = this.question;
const references = this.references;
Expand Down

0 comments on commit 895f93d

Please sign in to comment.