Skip to content

Commit 196b8bb

Browse files
fix: optimize folder style (#4104)
1 parent 9640c7b commit 196b8bb

File tree

8 files changed

+61
-53
lines changed

8 files changed

+61
-53
lines changed

ui/src/components/folder-tree/MoveToDialog.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,8 @@ defineExpose({ open })
139139
padding: 0 !important;
140140
margin-bottom: 8px;
141141
}
142+
:deep(.tree-label) {
143+
max-width: 100% !important;
144+
}
142145
}
143146
</style>

ui/src/components/folder-tree/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<div class="flex-between w-full" @mouseenter.stop="handleMouseEnter(data)">
4343
<div class="flex align-center">
4444
<AppIcon iconName="app-folder" style="font-size: 20px"></AppIcon>
45-
<span class="ml-8 ellipsis" style="max-width: 110px" :title="node.label">{{
45+
<span class="ml-8 ellipsis tree-label" style="max-width: 110px" :title="node.label">{{
4646
node.label
4747
}}</span>
4848
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
importApplication: '导入应用',
88
copyApplication: '复制应用',
99
workflow: '高级编排',
10-
simple: '简单应用',
10+
simple: '简易应用',
1111
simplePlaceholder: '适用于初级用户使用表单设置构建AI对话助手',
1212
workflowPlaceholder: '适用于高级用户使用低代码拖拉拽方式构建复杂逻辑的AI对话助手',
1313
appTest: '调试预览',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
importApplication: '匯入應用',
66
copyApplication: '複製應用',
77
workflow: '進階編排',
8-
simple: '簡單配置',
8+
simple: '簡易應用',
99
simplePlaceholder: '適用於初級用戶使用表單設定構建AI對話助手',
1010
workflowPlaceholder: '適用於高階用戶使用低代碼拖拉拽方式構建複雜邏輯的AI對話助手',
1111
appTest: '調試預覽',

ui/src/views/application-overview/xpack-component/XPackLimitDrawer.vue

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
step-strictly
2424
/>
2525
<span class="ml-4">{{
26-
$t('views.applicationOverview.appInfo.LimitDialog.timesDays')
27-
}}</span>
26+
$t('views.applicationOverview.appInfo.LimitDialog.timesDays')
27+
}}</span>
2828
</el-form-item>
2929
<!-- 身份验证 -->
3030
<el-form-item
@@ -74,7 +74,7 @@
7474
style="margin: 0 4px 0 0 !important"
7575
>
7676
<el-icon>
77-
<RefreshRight/>
77+
<RefreshRight />
7878
</el-icon>
7979
</el-button>
8080
</el-tooltip>
@@ -111,12 +111,16 @@
111111
>
112112
<el-checkbox-group v-model="form.authentication_value.login_value">
113113
<template v-for="t in auth_list" :key="t.value">
114-
<el-checkbox :label="t.label" :value="t.value"/>
114+
<el-checkbox :label="t.label" :value="t.value" />
115115
</template>
116116
</el-checkbox-group>
117117
</el-form-item>
118118
<el-form-item
119-
v-if="form.authentication_value.type === 'login' && form.authentication_value?.login_value?.includes('LOCAL')"
119+
class="ml-24"
120+
v-if="
121+
form.authentication_value.type === 'login' &&
122+
form.authentication_value?.login_value?.includes('LOCAL')
123+
"
120124
:label="$t('views.system.display_code')"
121125
:rules="[
122126
{
@@ -127,23 +131,23 @@
127131
]"
128132
prop="authentication_value.max_attempts"
129133
>
130-
<span style="font-size: 13px;">
131-
{{ $t('views.system.loginFailed') }}
132-
</span>
134+
<span style="font-size: 13px">
135+
{{ $t('views.system.loginFailed') }}
136+
</span>
133137
<el-input-number
134-
style="margin-left: 8px;"
138+
style="margin-left: 8px"
135139
v-model="form.authentication_value.max_attempts"
136140
:min="-1"
137141
:max="10"
138142
:step="1"
139143
controls-position="right"
140144
/>
141-
<span style="margin-left: 8px; font-size: 13px;">
142-
{{ $t('views.system.loginFailedMessage') }}
143-
</span>
144-
<span style="margin-left: 8px; color: #909399; font-size: 12px;">
145-
({{ $t('views.system.display_codeTip') }})
146-
</span>
145+
<span style="margin-left: 8px; font-size: 13px">
146+
{{ $t('views.system.loginFailedMessage') }}
147+
</span>
148+
<span style="margin-left: 8px; color: #909399; font-size: 12px">
149+
({{ $t('views.system.display_codeTip') }})
150+
</span>
147151
</el-form-item>
148152
</el-card>
149153
</el-radio-group>
@@ -174,18 +178,18 @@
174178
</el-drawer>
175179
</template>
176180
<script setup lang="ts">
177-
import {ref, watch, computed} from 'vue'
178-
import {useRoute, useRouter} from 'vue-router'
179-
import type {FormInstance, FormRules} from 'element-plus'
180-
import {MsgSuccess} from '@/utils/message'
181-
import {t} from '@/locales'
182-
import {copyClick} from '@/utils/clipboard'
183-
import {loadSharedApi} from '@/utils/dynamics-api/shared-api'
181+
import { ref, watch, computed } from 'vue'
182+
import { useRoute, useRouter } from 'vue-router'
183+
import type { FormInstance, FormRules } from 'element-plus'
184+
import { MsgSuccess } from '@/utils/message'
185+
import { t } from '@/locales'
186+
import { copyClick } from '@/utils/clipboard'
187+
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
184188
185189
const router = useRouter()
186190
const route = useRoute()
187191
const {
188-
params: {id},
192+
params: { id },
189193
} = route
190194
191195
const apiType = computed(() => {
@@ -236,7 +240,7 @@ const open = (data: any) => {
236240
}
237241
form.value.authentication = data.authentication
238242
dialogVisible.value = true
239-
loadSharedApi({type: 'application', systemType: apiType.value})
243+
loadSharedApi({ type: 'application', systemType: apiType.value })
240244
.getChatUserAuthType()
241245
.then((ok: any) => {
242246
auth_list.value = ok.data
@@ -254,7 +258,7 @@ const submit = async (formEl: FormInstance | undefined) => {
254258
authentication: form.value.authentication,
255259
authentication_value: form.value.authentication_value,
256260
}
257-
loadSharedApi({type: 'application', systemType: apiType.value})
261+
loadSharedApi({ type: 'application', systemType: apiType.value })
258262
.putAccessToken(id as string, obj, loading)
259263
.then(() => {
260264
emit('refresh')
@@ -290,7 +294,7 @@ function firstGeneration() {
290294
}
291295
}
292296
293-
defineExpose({open})
297+
defineExpose({ open })
294298
</script>
295299
<style lang="scss" scoped>
296300
.authentication-append-input {

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

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</div>
2525
<p v-else-if="loading" shadow="always" style="margin: 0.5rem 0">
2626
<el-icon class="is-loading color-primary mr-4"><Loading /></el-icon>
27-
{{ $t('views.application.generateDialog.loading') }}
27+
{{ $t('views.application.generateDialog.loading') }}
2828
<span class="dotting"></span>
2929
</p>
3030
<p v-else class="flex align-center">
@@ -196,7 +196,7 @@ const startStreamingOutput = () => {
196196
} else if (loading.value === false && currentDisplayIndex.value >= fullContent.value.length) {
197197
stopStreaming()
198198
}
199-
}, 50) as any
199+
}, 50) as any
200200
}
201201
202202
// 停止流式输出
@@ -338,7 +338,6 @@ function generatePrompt(inputValue: any) {
338338
reader.read().then(getWrite(reader))
339339
})
340340
} else if (apiType.value === 'systemManage') {
341-
console.log(apiType.value)
342341
systemGeneratePromptAPI
343342
.generate_prompt(applicationID.value, modelID.value, requestData)
344343
.then((response) => {
@@ -423,24 +422,26 @@ const handleScroll = () => {
423422
}
424423
425424
const handleDialogClose = (done: () => void) => {
426-
// 弹出 消息
427-
MsgConfirm(t('common.tip'), t('views.application.generateDialog.exit'), {
428-
confirmButtonText: t('common.confirm'),
429-
cancelButtonText: t('common.cancel'),
430-
distinguishCancelAndClose: true,
431-
})
432-
.then(() => {
433-
// 点击确认,清除状态
434-
stopStreaming()
435-
chatMessages.value = []
436-
fullContent.value = ''
437-
currentDisplayIndex.value = 0
438-
isOutputComplete.value = false
439-
done() // 真正关闭
440-
})
441-
.catch(() => {
442-
// 点击取消
425+
if (answer.value) {
426+
// 弹出 消息
427+
MsgConfirm(t('common.tip'), t('views.application.generateDialog.exit'), {
428+
confirmButtonText: t('common.confirm'),
429+
cancelButtonText: t('common.cancel'),
430+
distinguishCancelAndClose: true,
443431
})
432+
.then(() => {
433+
// 点击确认,清除状态
434+
stopStreaming()
435+
chatMessages.value = []
436+
fullContent.value = ''
437+
currentDisplayIndex.value = 0
438+
isOutputComplete.value = false
439+
done() // 真正关闭
440+
})
441+
.catch(() => {
442+
// 点击取消
443+
})
444+
}
444445
}
445446
446447
// 组件卸载时清理定时器

ui/src/views/tool/toolStore/ToolStoreDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<el-dialog
33
v-model="dialogVisible"
4-
width="1000"
4+
width="1200"
55
append-to-body
66
class="tool-store-dialog"
77
align-center
@@ -10,7 +10,7 @@
1010
>
1111
<template #header="{ titleId }">
1212
<div class="dialog-header flex-between mb-8">
13-
<h4 :id="titleId" class="medium">
13+
<h4 :id="titleId" class="medium w-240 mr-8">
1414
{{ $t('views.tool.toolStore.title') }}
1515
</h4>
1616
<el-radio-group v-model="toolType" @change="radioChange" class="app-radio-button-group">

ui/src/workflow/nodes/question-node/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ const defaultPrompt = `{{${t('views.applicationWorkflow.nodes.startNode.label')}
201201
202202
const form = {
203203
model_id: '',
204-
system: defaultPrompt,
205-
prompt: t('views.applicationWorkflow.nodes.questionNode.systemDefault'),
204+
system: t('views.applicationWorkflow.nodes.questionNode.systemDefault'),
205+
prompt: defaultPrompt,
206206
dialogue_number: 1,
207207
is_result: false,
208208
}

0 commit comments

Comments
 (0)