mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
优化对话框和消息视图组件:调整消息对话框最大宽度,增加全屏支持,更新消息内容引用,修改消息项的样式,提升用户体验
This commit is contained in:
@@ -286,7 +286,14 @@ onMounted(() => {
|
|||||||
</VCard>
|
</VCard>
|
||||||
</VDialog>
|
</VDialog>
|
||||||
<!-- 消息中心弹窗 -->
|
<!-- 消息中心弹窗 -->
|
||||||
<VDialog v-if="messageDialog" v-model="messageDialog" max-width="35rem" scrollable>
|
<VDialog
|
||||||
|
v-if="messageDialog"
|
||||||
|
v-model="messageDialog"
|
||||||
|
max-width="40rem"
|
||||||
|
scrollable
|
||||||
|
:fullscreen="!display.mdAndUp.value"
|
||||||
|
ref="messageDialogRef"
|
||||||
|
>
|
||||||
<VCard>
|
<VCard>
|
||||||
<VCardItem>
|
<VCardItem>
|
||||||
<VCardTitle>
|
<VCardTitle>
|
||||||
@@ -296,8 +303,8 @@ onMounted(() => {
|
|||||||
<VDialogCloseBtn @click="messageDialog = false" />
|
<VDialogCloseBtn @click="messageDialog = false" />
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
<VDivider />
|
<VDivider />
|
||||||
<VCardText>
|
<VCardText ref="messageContentRef">
|
||||||
<MessageView ref="chatContainer" />
|
<MessageView ref="messageViewRef" @scroll="scrollMessageToEnd" />
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<VDivider />
|
<VDivider />
|
||||||
<VCardActions class="pa-4">
|
<VCardActions class="pa-4">
|
||||||
@@ -311,15 +318,14 @@ onMounted(() => {
|
|||||||
@keyup.enter="sendMessage"
|
@keyup.enter="sendMessage"
|
||||||
/>
|
/>
|
||||||
<VBtn
|
<VBtn
|
||||||
|
variant="elevated"
|
||||||
:disabled="sendButtonDisabled"
|
:disabled="sendButtonDisabled"
|
||||||
@click="sendMessage"
|
@click="sendMessage"
|
||||||
:loading="sendButtonDisabled"
|
:loading="sendButtonDisabled"
|
||||||
color="primary"
|
color="primary"
|
||||||
min-width="auto"
|
prepend-icon="mdi-send"
|
||||||
width="46"
|
>{{ t('common.send') }}
|
||||||
height="38"
|
</VBtn>
|
||||||
>{{ t('common.send') }}</VBtn
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</VCardActions>
|
</VCardActions>
|
||||||
</VCard>
|
</VCard>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ onBeforeUnmount(() => {
|
|||||||
<div
|
<div
|
||||||
v-for="(msg, index) in messages"
|
v-for="(msg, index) in messages"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="chat-group d-flex mb-8"
|
class="chat-group d-flex mt-5 mb-8"
|
||||||
:class="msg.action == 1 ? 'flex-row align-start' : 'flex-row-reverse align-end'"
|
:class="msg.action == 1 ? 'flex-row align-start' : 'flex-row-reverse align-end'"
|
||||||
>
|
>
|
||||||
<div class="d-inline-flex flex-column" :class="msg.action == 1 ? 'align-start' : 'align-end'">
|
<div class="d-inline-flex flex-column" :class="msg.action == 1 ? 'align-start' : 'align-end'">
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VList lines="two" border rounded>
|
<VList lines="two" rounded>
|
||||||
<template v-for="(target, index) of targets" :key="target.name">
|
<template v-for="(target, index) of targets" :key="target.name">
|
||||||
<VListItem>
|
<VListItem>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
@@ -219,7 +219,7 @@ onMounted(async () => {
|
|||||||
<VBtn size="small" icon="mdi-connection" :disabled="target.btndisable" @click="netTest(index)" />
|
<VBtn size="small" icon="mdi-connection" :disabled="target.btndisable" @click="netTest(index)" />
|
||||||
</template>
|
</template>
|
||||||
</VListItem>
|
</VListItem>
|
||||||
<VDivider v-if="index !== targets.length - 1" />
|
<VDivider inset v-if="index !== targets.length - 1" />
|
||||||
</template>
|
</template>
|
||||||
</VList>
|
</VList>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user