mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-17 05:27:36 +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)
|
||||
@@ -68,6 +68,7 @@ function showForkWorkflow() {
|
||||
function finishForkWorkflow(wid: string) {
|
||||
workflowId.value = wid
|
||||
forkWorkflowDialog.value = false
|
||||
emit('update')
|
||||
}
|
||||
|
||||
// 删除工作流分享时处理
|
||||
|
||||
@@ -82,12 +82,20 @@ const $toast = useToast()
|
||||
<VDivider />
|
||||
<VCardText>
|
||||
<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">
|
||||
<VRow>
|
||||
<VCol cols="12">
|
||||
<VTextField
|
||||
v-model="shareForm.share_title"
|
||||
readonly
|
||||
:label="t('dialog.workflowShare.title')"
|
||||
:rules="[requiredValidator]"
|
||||
persistent-hint
|
||||
|
||||
@@ -1762,6 +1762,8 @@ export default {
|
||||
confirmShare: 'Confirm Share',
|
||||
shareSuccess: '{name} shared successfully!',
|
||||
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: {
|
||||
loginTitle: '115 Cloud Login',
|
||||
|
||||
@@ -1739,6 +1739,8 @@ export default {
|
||||
confirmShare: '确认分享',
|
||||
shareSuccess: '{name} 分享成功!',
|
||||
shareFailed: '{name} 分享失败:{message}!',
|
||||
securityWarning: '安全提醒',
|
||||
securityWarningMessage: '分享前请确保工作流没有敏感信息,比如RSS链接中的PassKey等,避免产生信息泄露。',
|
||||
},
|
||||
u115Auth: {
|
||||
loginTitle: '115网盘登录',
|
||||
|
||||
@@ -1738,6 +1738,8 @@ export default {
|
||||
confirmShare: '確認分享',
|
||||
shareSuccess: '{name} 分享成功!',
|
||||
shareFailed: '{name} 分享失敗:{message}!',
|
||||
securityWarning: '安全提醒',
|
||||
securityWarningMessage: '分享前請確保工作流沒有敏感資訊,比如RSS連結中的PassKey等,避免產生資訊洩露。',
|
||||
},
|
||||
u115Auth: {
|
||||
loginTitle: '115網盤登錄',
|
||||
|
||||
@@ -13,6 +13,7 @@ const route = useRoute()
|
||||
|
||||
const activeTab = ref((route.query.tab as string) || 'list')
|
||||
const shareViewKey = ref(0)
|
||||
const listViewKey = ref(0)
|
||||
|
||||
// 获取标签页
|
||||
const workflowTabs = computed(() => {
|
||||
@@ -73,14 +74,14 @@ onMounted(() => {
|
||||
<VWindowItem value="list">
|
||||
<transition name="fade-slide" appear>
|
||||
<div>
|
||||
<WorkflowListView />
|
||||
<WorkflowListView :key="listViewKey" />
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
<VWindowItem value="share">
|
||||
<transition name="fade-slide" appear>
|
||||
<div>
|
||||
<WorkflowShareView :keyword="shareKeyword" :key="shareViewKey" />
|
||||
<WorkflowShareView :keyword="shareKeyword" :key="shareViewKey" @update="listViewKey++" />
|
||||
</div>
|
||||
</transition>
|
||||
</VWindowItem>
|
||||
|
||||
@@ -14,6 +14,9 @@ const props = defineProps({
|
||||
keyword: String,
|
||||
})
|
||||
|
||||
// 定义事件
|
||||
const emit = defineEmits(['update'])
|
||||
|
||||
// 判断是否有滚动条
|
||||
function hasScroll() {
|
||||
return document.body.scrollHeight - (window.innerHeight || document.documentElement.clientHeight) > 2
|
||||
@@ -130,7 +133,7 @@ onActivated(() => {
|
||||
<template #empty />
|
||||
<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">
|
||||
<WorkflowShareCard :workflow="data" @delete="removeData(data.id || '')" />
|
||||
<WorkflowShareCard :workflow="data" @delete="removeData(data.id || '')" @update="emit('update')" />
|
||||
</div>
|
||||
</div>
|
||||
<NoDataFound
|
||||
|
||||
Reference in New Issue
Block a user