Skip to content

Commit

Permalink
fix: 统一头像尺寸
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdan-fit2cloud committed Nov 14, 2024
1 parent 5f02b56 commit 906ec28
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 30 deletions.
18 changes: 15 additions & 3 deletions ui/src/components/ai-chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@
<div ref="dialogScrollbar" class="ai-chat__content p-24 chat-width">
<div class="item-content mb-16" v-if="!props.available || (props.data?.prologue && !log)">
<div class="avatar">
<img v-if="data.avatar" :src="data.avatar" height="32px" width="32px" />
<LogoIcon v-else height="32px" width="32px" />
<el-image
v-if="data.avatar"
:src="data.avatar"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
<LogoIcon v-else height="32px" width="32px" />
</div>
<div class="content">
Expand Down Expand Up @@ -96,7 +102,13 @@
<!-- 回答 -->
<div class="item-content mb-16 lighter">
<div class="avatar">
<img v-if="data.avatar" :src="data.avatar" height="32px" width="32px" />
<el-image
v-if="data.avatar"
:src="data.avatar"
alt=""
fit="cover"
style="width: 30px; height: 30px; display: block"
/>
<LogoIcon v-else height="32px" width="32px" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
:size="32"
style="background: none"
>
<img :src="detail?.icon" alt="" />
<el-image
:src="detail?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="detail?.name"
Expand Down
38 changes: 21 additions & 17 deletions ui/src/views/application-overview/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
:size="32"
style="background: none"
>
<img :src="detail?.icon" alt="" />
<el-image
:src="detail?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="detail?.name"
Expand Down Expand Up @@ -353,23 +358,22 @@ function getDetail() {
?.filter((v: any) => v.id === 'base-node')
.map((v: any) => {
apiInputParams.value = v.properties.api_input_field_list
? v.properties.api_input_field_list
.map((v: any) => {
return {
name: v.variable,
value: v.default_value
}
})
? v.properties.api_input_field_list.map((v: any) => {
return {
name: v.variable,
value: v.default_value
}
})
: v.properties.input_field_list
? v.properties.input_field_list
.filter((v: any) => v.assignment_method === 'api_input')
.map((v: any) => {
return {
name: v.variable,
value: v.default_value
}
})
: []
? v.properties.input_field_list
.filter((v: any) => v.assignment_method === 'api_input')
.map((v: any) => {
return {
name: v.variable,
value: v.default_value
}
})
: []
})
})
}
Expand Down
7 changes: 6 additions & 1 deletion ui/src/views/application-workflow/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@
:size="32"
style="background: none"
>
<img :src="detail?.icon" alt="" />
<el-image
:src="detail?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="detail?.name"
Expand Down
6 changes: 5 additions & 1 deletion ui/src/views/application/ApplicationSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,11 @@
:size="32"
style="background: none"
>
<img :src="applicationForm?.icon" alt="" />
<img
:src="applicationForm?.icon"
alt=""
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="applicationForm?.name"
Expand Down
9 changes: 7 additions & 2 deletions ui/src/views/application/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@
style="background: none"
class="mr-8"
>
<img :src="item?.icon" alt="" />
<el-image
:src="item?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="item?.name"
Expand Down Expand Up @@ -175,7 +180,7 @@ function openCreateDialog() {
} else {
MsgConfirm(`提示`, '社区版最多支持 5 个应用,如需拥有更多应用,请升级为专业版。', {
cancelButtonText: '确定',
confirmButtonText: '购买专业版',
confirmButtonText: '购买专业版'
})
.then(() => {
window.open('https://maxkb.cn/pricing.html', '_blank')
Expand Down
7 changes: 6 additions & 1 deletion ui/src/views/chat/auth/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
:size="32"
style="background: none"
>
<img :src="application_profile?.icon" alt="" />
<el-image
:src="application_profile?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="application_profile?.name"
Expand Down
7 changes: 6 additions & 1 deletion ui/src/views/chat/base/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
:size="32"
style="background: none"
>
<img :src="applicationDetail?.icon" alt="" />
<el-image
:src="applicationDetail?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="applicationDetail?.name"
Expand Down
7 changes: 6 additions & 1 deletion ui/src/views/chat/embed/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
:size="32"
style="background: none"
>
<img :src="applicationDetail?.icon" alt="" />
<el-image
:src="applicationDetail?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="applicationDetail?.name"
Expand Down
7 changes: 6 additions & 1 deletion ui/src/views/chat/pc/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
:size="32"
style="background: none"
>
<img :src="applicationDetail?.icon" alt="" />
<el-image
:src="applicationDetail?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="applicationDetail?.name"
Expand Down
7 changes: 6 additions & 1 deletion ui/src/views/dataset/DatasetSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@
style="background: none"
class="mr-12"
>
<img :src="item?.icon" alt="" />
<el-image
:src="item?.icon"
alt=""
fit="cover"
style="width: 32px; height: 32px; display: block"
/>
</AppAvatar>
<AppAvatar
v-else-if="item?.name"
Expand Down

0 comments on commit 906ec28

Please sign in to comment.