Skip to content

Commit 8169c12

Browse files
fix: Fix style confusion
1 parent 1e8e3a9 commit 8169c12

File tree

15 files changed

+86
-178
lines changed

15 files changed

+86
-178
lines changed

ui/src/components/ai-chat/component/answer-content/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<div class="item-content mb-16 lighter">
3+
34
<template v-for="(answer_text, index) in answer_text_list" :key="index">
45
<div class="avatar mr-8" v-if="application.show_avatar">
56
<img v-if="application.avatar" :src="application.avatar" height="28px" width="28px" />

ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@touchstart="onTouchStart"
99
@touchmove="onTouchMove"
1010
@touchend="onTouchEnd"
11+
:disabled="props.disabled"
1112
>
1213
按住说话
1314
</el-button>
@@ -47,6 +48,10 @@ const props = defineProps({
4748
start: {
4849
type: Boolean,
4950
default: false
51+
},
52+
disabled: {
53+
type: Boolean,
54+
default: false
5055
}
5156
})
5257
const emit = defineEmits(['TouchStart', 'TouchEnd'])
@@ -57,11 +62,19 @@ const dialogVisible = ref(false)
5762
const message = ref('按住说话')
5863
5964
watch(
60-
() => props.time,
61-
(val) => {
62-
if (val && val === 60) {
65+
() => [props.time, props.start],
66+
([time, start]) => {
67+
if (start) {
68+
isTouching.value = true
69+
dialogVisible.value = true
70+
message.value = '松开发送,上滑取消'
71+
if (time === 60) {
72+
dialogVisible.value = false
73+
emit('TouchEnd', isTouching.value)
74+
isTouching.value = false
75+
}
76+
} else {
6377
dialogVisible.value = false
64-
emit('TouchEnd', isTouching.value)
6578
isTouching.value = false
6679
}
6780
}

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
@TouchEnd="TouchEnd"
121121
:time="recorderTime"
122122
:start="!mediaRecorderStatus"
123+
:disabled="loading"
123124
/>
124125
<el-input
125126
v-else
@@ -149,7 +150,12 @@
149150
</el-button>
150151
</span>
151152
<span class="flex align-center" v-else>
152-
<el-button text @click="startRecording" v-if="mediaRecorderStatus">
153+
<el-button
154+
:disabled="loading"
155+
text
156+
@click="startRecording"
157+
v-if="mediaRecorderStatus"
158+
>
153159
<el-icon>
154160
<Microphone />
155161
</el-icon>
@@ -166,7 +172,7 @@
166172
</span>
167173
</template>
168174

169-
<template v-if="!startRecorderTime && !recorderLoading">
175+
<template v-if="(!startRecorderTime && !recorderLoading) || mode === 'mobile'">
170176
<span v-if="props.applicationDetails.file_upload_enable" class="flex align-center ml-4">
171177
<el-upload
172178
action="#"
@@ -515,7 +521,12 @@ const stopRecording = () => {
515521
// 上传录音文件
516522
const uploadRecording = async (audioBlob: Blob) => {
517523
try {
524+
// 非自动发送切换输入框
525+
if (!props.applicationDetails.stt_autosend) {
526+
isMicrophone.value = false
527+
}
518528
recorderLoading.value = true
529+
519530
const formData = new FormData()
520531
formData.append('file', audioBlob, 'recording.mp3')
521532
applicationApi

ui/src/components/dynamics-form/items/label/TooltipLabel.vue

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,4 @@ defineProps<{
1717
tooltip: string
1818
}>()
1919
</script>
20-
<style lang="scss" scoped>
21-
.aiMode-param-dialog {
22-
padding: 8px 8px 24px 8px;
23-
24-
.el-dialog__header {
25-
padding: 16px 16px 0 16px;
26-
}
27-
28-
.el-dialog__body {
29-
padding: 16px !important;
30-
}
31-
32-
.dialog-max-height {
33-
height: 550px;
34-
}
35-
36-
.custom-slider {
37-
.el-input-number.is-without-controls .el-input__wrapper {
38-
padding: 0 !important;
39-
}
40-
}
41-
}
42-
</style>
20+
<style lang="scss" scoped></style>

ui/src/locales/lang/zh-CN/views/dataset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default {
3434
datasetName: {
3535
label: '知识库名称',
3636
placeholder: '请输入知识库名称',
37-
requiredMessage: '请输入应用名称'
37+
requiredMessage: '请输入知识库名称'
3838
},
3939
datasetDescription: {
4040
label: '知识库描述',

ui/src/locales/lang/zh-Hant/views/dataset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
datasetName: {
3434
label: '知識庫名稱',
3535
placeholder: '請輸入知識庫名稱',
36-
requiredMessage: '請輸入應用名稱'
36+
requiredMessage: '請輸入知識庫名稱'
3737
},
3838
datasetDescription: {
3939
label: '知識庫描述',

ui/src/styles/app.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,3 +772,22 @@ h5 {
772772
background: #d6e2ff;
773773
line-height: 25px;
774774
}
775+
776+
// 参数设置dialog
777+
.param-dialog {
778+
padding: 8px 8px 24px 8px;
779+
.el-dialog__header {
780+
padding: 16px 16px 0 16px;
781+
}
782+
.el-dialog__body {
783+
padding: 0 !important;
784+
}
785+
.dialog-max-height {
786+
height: 550px;
787+
}
788+
.custom-slider {
789+
.el-input-number.is-without-controls .el-input__wrapper {
790+
padding: 0 !important;
791+
}
792+
}
793+
}

ui/src/views/application/component/AIModeParamSettingDialog.vue

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<el-dialog
33
align-center
44
:title="$t('common.paramSetting')"
5-
class="aiMode-param-dialog"
5+
class="param-dialog"
66
v-model="dialogVisible"
77
style="width: 550px"
88
append-to-body
@@ -89,26 +89,4 @@ const submit = async () => {
8989
defineExpose({ open, reset_default })
9090
</script>
9191

92-
<style lang="scss" scoped>
93-
.aiMode-param-dialog {
94-
padding: 8px 8px 24px 8px;
95-
96-
.el-dialog__header {
97-
padding: 16px 16px 0 16px;
98-
}
99-
100-
.el-dialog__body {
101-
padding: 16px !important;
102-
}
103-
104-
.dialog-max-height {
105-
height: 550px;
106-
}
107-
108-
.custom-slider {
109-
.el-input-number.is-without-controls .el-input__wrapper {
110-
padding: 0 !important;
111-
}
112-
}
113-
}
114-
</style>
92+
<style lang="scss" scoped></style>

ui/src/views/application/component/AddDatasetDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const refresh = () => {
144144
145145
defineExpose({ open })
146146
</script>
147-
<style lang="scss" scoped>
147+
<style lang="scss">
148148
.addDataset-dialog {
149149
padding: 0;
150150
.el-dialog__header {

ui/src/views/application/component/McpServersDialog.vue

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99
:close-on-click-modal="false"
1010
:close-on-press-escape="false"
1111
>
12-
<el-form label-position="top" ref="paramFormRef" :model="form"
13-
require-asterisk-position="right">
12+
<el-form
13+
label-position="top"
14+
ref="paramFormRef"
15+
:model="form"
16+
require-asterisk-position="right"
17+
>
1418
<el-form-item label="MCP" prop="mcp_enable">
1519
<el-switch v-model="form.mcp_enable" />
1620
</el-form-item>
17-
<el-form-item v-if="form.mcp_enable" label="MCP Server Config" prop="mcp_servers"
18-
:rules="[{ required: true, message: $t('common.required') }]">
21+
<el-form-item
22+
v-if="form.mcp_enable"
23+
label="MCP Server Config"
24+
prop="mcp_servers"
25+
:rules="[{ required: true, message: $t('common.required') }]"
26+
>
1927
<el-input
2028
v-model="form.mcp_servers"
2129
:rows="6"
@@ -49,7 +57,6 @@ const mcpServerJson = `{
4957
}
5058
}`
5159
52-
5360
const form = ref<any>({
5461
mcp_servers: '',
5562
mcp_enable: false
@@ -82,26 +89,4 @@ const submit = () => {
8289
8390
defineExpose({ open })
8491
</script>
85-
<style lang="scss" scoped>
86-
.param-dialog {
87-
padding: 8px 8px 24px 8px;
88-
89-
.el-dialog__header {
90-
padding: 16px 16px 0 16px;
91-
}
92-
93-
.el-dialog__body {
94-
padding: 0 !important;
95-
}
96-
97-
.dialog-max-height {
98-
height: 560px;
99-
}
100-
101-
.custom-slider {
102-
.el-input-number.is-without-controls .el-input__wrapper {
103-
padding: 0 !important;
104-
}
105-
}
106-
}
107-
</style>
92+
<style lang="scss" scoped></style>

0 commit comments

Comments
 (0)