fix(frontend): correct integrations redirect tab and lazy-load panels

Map legacy section=integrations to tab=im instead of an invalid tab value,
and mount only the active IntegrationsModal tab to avoid duplicate API calls.
This commit is contained in:
wizardchen
2026-06-24 16:37:33 +08:00
committed by lyingbug
parent 314b2a035c
commit 2d6d1e3275
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -1129,9 +1129,10 @@ const checkAndOpenEditModal = () => {
const editId = route.query.edit as string
const section = route.query.section as string
if (editId && (section === 'im' || section === 'embed' || section === 'integrations')) {
const tab = section === 'embed' ? 'embed' : 'im'
router.replace({
path: '/platform/integrations',
query: { tab: section, agentId: editId },
query: { tab, agentId: editId },
})
return
}
@@ -30,7 +30,7 @@
<div class="settings-content">
<div class="content-wrapper">
<div v-show="currentSection === 'im'" class="section">
<div v-if="currentSection === 'im'" class="section">
<div class="section-header">
<h2>{{ $t('agentEditor.im.title') }}</h2>
<p class="section-description">
@@ -49,7 +49,7 @@
<IMChannelPanel tenant-mode :initial-agent-id="initialAgentId" />
</div>
<div v-show="currentSection === 'embed'" class="section">
<div v-if="currentSection === 'embed'" class="section">
<div class="section-header">
<h2>{{ $t('agentEditor.embed.title') }}</h2>
<p class="section-description">{{ $t('agentEditor.embed.description') }}</p>