mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 23:18:44 +08:00
更新工作流分享卡片和对话框
This commit is contained in:
@@ -9,7 +9,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 定义删除事件
|
// 定义删除事件
|
||||||
const emit = defineEmits(['delete'])
|
const emit = defineEmits(['delete', 'update'])
|
||||||
|
|
||||||
// 复用工作流弹窗
|
// 复用工作流弹窗
|
||||||
const forkWorkflowDialog = ref(false)
|
const forkWorkflowDialog = ref(false)
|
||||||
@@ -68,6 +68,7 @@ function showForkWorkflow() {
|
|||||||
function finishForkWorkflow(wid: string) {
|
function finishForkWorkflow(wid: string) {
|
||||||
workflowId.value = wid
|
workflowId.value = wid
|
||||||
forkWorkflowDialog.value = false
|
forkWorkflowDialog.value = false
|
||||||
|
emit('update')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除工作流分享时处理
|
// 删除工作流分享时处理
|
||||||
|
|||||||
@@ -82,12 +82,20 @@ const $toast = useToast()
|
|||||||
<VDivider />
|
<VDivider />
|
||||||
<VCardText>
|
<VCardText>
|
||||||
<VDialogCloseBtn @click="emit('close')" />
|
<VDialogCloseBtn @click="emit('close')" />
|
||||||
|
<!-- 安全警告信息 -->
|
||||||
|
<VAlert
|
||||||
|
type="warning"
|
||||||
|
variant="tonal"
|
||||||
|
class="mb-4"
|
||||||
|
:title="t('dialog.workflowShare.securityWarning')"
|
||||||
|
:text="t('dialog.workflowShare.securityWarningMessage')"
|
||||||
|
prepend-icon="mdi-alert-circle-outline"
|
||||||
|
/>
|
||||||
<VForm @submit.prevent="() => {}" class="pt-2">
|
<VForm @submit.prevent="() => {}" class="pt-2">
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12">
|
<VCol cols="12">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="shareForm.share_title"
|
v-model="shareForm.share_title"
|
||||||
readonly
|
|
||||||
:label="t('dialog.workflowShare.title')"
|
:label="t('dialog.workflowShare.title')"
|
||||||
:rules="[requiredValidator]"
|
:rules="[requiredValidator]"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
|
|||||||
@@ -1762,6 +1762,8 @@ export default {
|
|||||||
confirmShare: 'Confirm Share',
|
confirmShare: 'Confirm Share',
|
||||||
shareSuccess: '{name} shared successfully!',
|
shareSuccess: '{name} shared successfully!',
|
||||||
shareFailed: '{name} share failed: {message}!',
|
shareFailed: '{name} share failed: {message}!',
|
||||||
|
securityWarning: 'Security Warning',
|
||||||
|
securityWarningMessage: 'Before sharing, please ensure the workflow does not contain sensitive information such as PassKey in RSS links to avoid information leakage.',
|
||||||
},
|
},
|
||||||
u115Auth: {
|
u115Auth: {
|
||||||
loginTitle: '115 Cloud Login',
|
loginTitle: '115 Cloud Login',
|
||||||
|
|||||||
@@ -1739,6 +1739,8 @@ export default {
|
|||||||
confirmShare: '确认分享',
|
confirmShare: '确认分享',
|
||||||
shareSuccess: '{name} 分享成功!',
|
shareSuccess: '{name} 分享成功!',
|
||||||
shareFailed: '{name} 分享失败:{message}!',
|
shareFailed: '{name} 分享失败:{message}!',
|
||||||
|
securityWarning: '安全提醒',
|
||||||
|
securityWarningMessage: '分享前请确保工作流没有敏感信息,比如RSS链接中的PassKey等,避免产生信息泄露。',
|
||||||
},
|
},
|
||||||
u115Auth: {
|
u115Auth: {
|
||||||
loginTitle: '115网盘登录',
|
loginTitle: '115网盘登录',
|
||||||
|
|||||||
@@ -1738,6 +1738,8 @@ export default {
|
|||||||
confirmShare: '確認分享',
|
confirmShare: '確認分享',
|
||||||
shareSuccess: '{name} 分享成功!',
|
shareSuccess: '{name} 分享成功!',
|
||||||
shareFailed: '{name} 分享失敗:{message}!',
|
shareFailed: '{name} 分享失敗:{message}!',
|
||||||
|
securityWarning: '安全提醒',
|
||||||
|
securityWarningMessage: '分享前請確保工作流沒有敏感資訊,比如RSS連結中的PassKey等,避免產生資訊洩露。',
|
||||||
},
|
},
|
||||||
u115Auth: {
|
u115Auth: {
|
||||||
loginTitle: '115網盤登錄',
|
loginTitle: '115網盤登錄',
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const route = useRoute()
|
|||||||
|
|
||||||
const activeTab = ref((route.query.tab as string) || 'list')
|
const activeTab = ref((route.query.tab as string) || 'list')
|
||||||
const shareViewKey = ref(0)
|
const shareViewKey = ref(0)
|
||||||
|
const listViewKey = ref(0)
|
||||||
|
|
||||||
// 获取标签页
|
// 获取标签页
|
||||||
const workflowTabs = computed(() => {
|
const workflowTabs = computed(() => {
|
||||||
@@ -73,14 +74,14 @@ onMounted(() => {
|
|||||||
<VWindowItem value="list">
|
<VWindowItem value="list">
|
||||||
<transition name="fade-slide" appear>
|
<transition name="fade-slide" appear>
|
||||||
<div>
|
<div>
|
||||||
<WorkflowListView />
|
<WorkflowListView :key="listViewKey" />
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
<VWindowItem value="share">
|
<VWindowItem value="share">
|
||||||
<transition name="fade-slide" appear>
|
<transition name="fade-slide" appear>
|
||||||
<div>
|
<div>
|
||||||
<WorkflowShareView :keyword="shareKeyword" :key="shareViewKey" />
|
<WorkflowShareView :keyword="shareKeyword" :key="shareViewKey" @update="listViewKey++" />
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ const props = defineProps({
|
|||||||
keyword: String,
|
keyword: String,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 定义事件
|
||||||
|
const emit = defineEmits(['update'])
|
||||||
|
|
||||||
// 判断是否有滚动条
|
// 判断是否有滚动条
|
||||||
function hasScroll() {
|
function hasScroll() {
|
||||||
return document.body.scrollHeight - (window.innerHeight || document.documentElement.clientHeight) > 2
|
return document.body.scrollHeight - (window.innerHeight || document.documentElement.clientHeight) > 2
|
||||||
@@ -130,7 +133,7 @@ onActivated(() => {
|
|||||||
<template #empty />
|
<template #empty />
|
||||||
<div v-if="dataList.length > 0" class="grid gap-4 grid-workflow-share-card" tabindex="0">
|
<div v-if="dataList.length > 0" class="grid gap-4 grid-workflow-share-card" tabindex="0">
|
||||||
<div v-for="data in dataList" :key="data.id">
|
<div v-for="data in dataList" :key="data.id">
|
||||||
<WorkflowShareCard :workflow="data" @delete="removeData(data.id || '')" />
|
<WorkflowShareCard :workflow="data" @delete="removeData(data.id || '')" @update="emit('update')" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<NoDataFound
|
<NoDataFound
|
||||||
|
|||||||
Reference in New Issue
Block a user