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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user