feat(web): restore legacy channel editor

This commit is contained in:
2026-07-22 15:48:43 +08:00
parent 43ac9388ac
commit e391d9dc2f
3 changed files with 55 additions and 4 deletions

View File

@@ -229,6 +229,8 @@ for (const channel of [
foundPage: Boolean(pageNode),
heading,
activeChannel,
inputCount: pageNode?.querySelectorAll('input, textarea').length ?? 0,
hasSaveChannel: [...(pageNode?.querySelectorAll('button') ?? [])].some((button) => button.textContent?.includes('保存频道')),
}
}, channel))
}
@@ -403,6 +405,9 @@ for (const check of channelPageChecks) {
if (!check.activeChannel.includes(check.label)) {
failures.push(`expected ${check.label} sidebar button to stay active, got ${JSON.stringify(check.activeChannel)}`)
}
if (check.label === '新建频道' && (check.inputCount < 4 || !check.hasSaveChannel)) {
failures.push(`expected legacy new channel editor, got inputs=${check.inputCount}, save=${check.hasSaveChannel}`)
}
}
if (failures.length) {