Skip to content

Commit 03e1879

Browse files
committed
feat(Mobile): Mobile chat window adaptation
1 parent 27801b3 commit 03e1879

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

frontend/src/views/chat/ExecutionDetails.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import icon_database_colorful from '@/assets/svg/icon_database_colorful.svg'
77
import icon_alarm_clock_colorful from '@/assets/svg/icon_alarm-clock_colorful.svg'
88
import { chatApi, type ChatLogHistory } from '@/api/chat.ts'
99
import { useI18n } from 'vue-i18n'
10+
import { isMobile } from '@/utils/utils'
1011
import { debounce } from 'lodash-es'
1112
import LogTerm from './execution-component/LogTerm.vue'
1213
import LogSQLSample from './execution-component/LogSQLSample.vue'
@@ -39,6 +40,10 @@ function getLogList(recordId: any) {
3940
}
4041
4142
const setDrawerSize = debounce(() => {
43+
if (isMobile()) {
44+
drawerSize.value = window.innerWidth + 'px'
45+
return
46+
}
4247
drawerSize.value =
4348
window.innerWidth < 500 ? '460px' : `${Math.max(window.innerWidth * 0.5, 600)}px`
4449
}, 500)

frontend/src/views/chat/index.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
:class="{
191191
'no-sidebar': isCompletePage && !chatListSideBarShow,
192192
pad16: !isCompletePage,
193+
pad8: isPhone,
193194
}"
194195
>
195196
<template v-for="(message, _index) in computedMessages" :key="_index">
@@ -1209,6 +1210,9 @@ onMounted(() => {
12091210
&.no-sidebar {
12101211
padding-left: 96px;
12111212
}
1213+
&.pad8 {
1214+
padding: 8px;
1215+
}
12121216
12131217
&.pad16 {
12141218
padding-left: 16px;

0 commit comments

Comments
 (0)