mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
更新 SubscribeShareDialog 组件,添加 share_title 字段的格式化,设置标题为只读,并优化说明提示文本;在确认分享按钮中添加加载状态
This commit is contained in:
@@ -4,6 +4,7 @@ import { requiredValidator } from '@/@validators'
|
|||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import type { Subscribe, SubscribeShare } from '@/api/types'
|
import type { Subscribe, SubscribeShare } from '@/api/types'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
|
import { formatSeason } from '@/@core/utils/formatters'
|
||||||
|
|
||||||
// 显示器宽度
|
// 显示器宽度
|
||||||
const display = useDisplay()
|
const display = useDisplay()
|
||||||
@@ -22,6 +23,7 @@ const shareDoing = ref(false)
|
|||||||
// 订阅编辑表单
|
// 订阅编辑表单
|
||||||
const shareForm = ref<SubscribeShare>({
|
const shareForm = ref<SubscribeShare>({
|
||||||
subscribe_id: props.sub?.id ?? 0,
|
subscribe_id: props.sub?.id ?? 0,
|
||||||
|
share_title: `${props.sub?.name} ${formatSeason(props.sub?.season ? props.sub?.season.toString() : '')}`,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 分享订阅
|
// 分享订阅
|
||||||
@@ -61,8 +63,8 @@ const $toast = useToast()
|
|||||||
<VCol cols="12">
|
<VCol cols="12">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="shareForm.share_title"
|
v-model="shareForm.share_title"
|
||||||
|
readonly
|
||||||
label="标题"
|
label="标题"
|
||||||
hint="给分享取一个便于识别的名称"
|
|
||||||
:rules="[requiredValidator]"
|
:rules="[requiredValidator]"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
@@ -72,7 +74,7 @@ const $toast = useToast()
|
|||||||
v-model="shareForm.share_comment"
|
v-model="shareForm.share_comment"
|
||||||
label="说明"
|
label="说明"
|
||||||
:rules="[requiredValidator]"
|
:rules="[requiredValidator]"
|
||||||
hint="关于该订阅的说明"
|
hint="填写关于该订阅的说明,订阅中的搜索词、识别词等将会默认包含在分享中"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
@@ -90,7 +92,16 @@ const $toast = useToast()
|
|||||||
</VCardText>
|
</VCardText>
|
||||||
<VCardActions class="pt-3">
|
<VCardActions class="pt-3">
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
<VBtn variant="elevated" :disabled="shareDoing" @click="doShare" prepend-icon="mdi-share" class="px-5"> 确认分享 </VBtn>
|
<VBtn
|
||||||
|
variant="elevated"
|
||||||
|
:disabled="shareDoing"
|
||||||
|
@click="doShare"
|
||||||
|
prepend-icon="mdi-share"
|
||||||
|
class="px-5"
|
||||||
|
:loading="shareDoing"
|
||||||
|
>
|
||||||
|
确认分享
|
||||||
|
</VBtn>
|
||||||
</VCardActions>
|
</VCardActions>
|
||||||
</VCard>
|
</VCard>
|
||||||
</VDialog>
|
</VDialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user