diff --git a/src/components/SubListItem.vue b/src/components/SubListItem.vue index 5b2c9687b..7fdbdf5f6 100644 --- a/src/components/SubListItem.vue +++ b/src/components/SubListItem.vue @@ -288,11 +288,11 @@ const flow = computed(() => { if (props.type === "sub") { const urlList = Object.keys(flows.value); const localOnly = props.sub.source === 'local' && !['localFirst', 'remoteFirst'].includes(props.sub.mergeSources) - if (localOnly) return t("subPage.subItem.local"); + if (localOnly && !props.sub.subUserinfo) return t("subPage.subItem.local"); if (isFlowFetching.value && !urlList.includes(props.sub.url)) return t("subPage.subItem.loading"); - const target = toRaw(flows.value[props.sub.url]); + const target = toRaw(flows.value[props.sub.url] || flows.value[props.sub.name]); if (!target) { return { firstLine: t("subPage.subItem.noRecord"), diff --git a/src/utils/getFlowsUrlList.ts b/src/utils/getFlowsUrlList.ts index 986388728..6c0b34520 100644 --- a/src/utils/getFlowsUrlList.ts +++ b/src/utils/getFlowsUrlList.ts @@ -7,6 +7,9 @@ export const getFlowsUrlList = (subs: Sub[]): string[][] => { if (sub.url && !localOnly && !urlList.includes(sub.url)) { urlList.push(sub.url); nameList.push([sub.url, sub.name]); + } else if (sub.subUserinfo && !urlList.includes(sub.name)) { + urlList.push(sub.name); + nameList.push([sub.name, sub.name]); } }); return nameList.map(([raw, name]) => { diff --git a/src/views/SubEditor.vue b/src/views/SubEditor.vue index c0f15148f..4853ff8d9 100644 --- a/src/views/SubEditor.vue +++ b/src/views/SubEditor.vue @@ -826,21 +826,21 @@ const urlValidator = (val: string): Promise => { }; watch([tag, form.subscriptions, subsSelectList], () => { const selected = toRaw(form.subscriptions) || [] - console.log(`form.subscriptions: ${selected}`) + // console.log(`form.subscriptions: ${selected}`) const group = subsSelectList.value.filter(item => shouldShowElement(item[3])).map(item => item[0]) || [] // 1. group 中不包含 selected 中的任何元素, subCheckbox 为 false, subCheckboxIndeterminate 为 false // 2. group 中包含 selected 中的任何元素, subCheckbox 为 true, subCheckboxIndeterminate 为 true // 3. group 中包含 selected 中的所有元素, subCheckbox 为 true, subCheckboxIndeterminate 为 false if (group.every(item => selected.includes(item))) { - console.log('group 中包含 selected 中的所有元素') + // console.log('group 中包含 selected 中的所有元素') subCheckbox.value = true subCheckboxIndeterminate.value = false } else if (group.some(item => selected.includes(item))) { - console.log('group 中包含 selected 中的任意元素') + // console.log('group 中包含 selected 中的任意元素') subCheckbox.value = true subCheckboxIndeterminate.value = true } else { - console.log('group 中不包含 selected 中的任意元素') + // console.log('group 中不包含 selected 中的任意元素') subCheckbox.value = false subCheckboxIndeterminate.value = false }