Fix edit message style (#105)

Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
Germey
2024-08-15 01:52:02 +08:00
committed by GitHub
co-authored by AceDataCloud
parent 907ee2796f
commit 895f93d636
3 changed files with 12 additions and 20 deletions
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix edit message",
"packageName": "@acedatacloud/nexior",
"email": "office@acedata.cloud",
"dependentChangeType": "patch"
}
+3 -20
View File
@@ -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>
@@ -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 {
@@ -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;
}
}
}
}
+2
View File
@@ -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({
@@ -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;