feat(embed): add widget, visitor chat, and management UI (#1657)
Add embed.html entrypoint, floating widget SDK, secure-mode snippets, management panel with preview, visitor chat composables, citation rendering, and integration docs for subdomain and server-side token exchange.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { createApp, h } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import { createRouter, createWebHistory, RouterView } from 'vue-router'
|
||||
import TDesign from 'tdesign-vue-next'
|
||||
import 'tdesign-vue-next/es/style/index.css'
|
||||
import '@/assets/theme/theme.css'
|
||||
import { installTDesignIconOfflineGuard } from '@/utils/tdesign-icon-offline'
|
||||
import i18n from './i18n/embed'
|
||||
import EmbedPage from '@/views/embed/EmbedPage.vue'
|
||||
|
||||
installTDesignIconOfflineGuard()
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/embed/:channelId',
|
||||
name: 'embed',
|
||||
component: EmbedPage,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
// Runtime-only Vue build cannot compile string templates — use a render fn.
|
||||
const app = createApp({ render: () => h(RouterView) })
|
||||
|
||||
app.use(TDesign)
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
app.use(i18n)
|
||||
|
||||
router.isReady().finally(() => {
|
||||
app.mount('#embed-app')
|
||||
})
|
||||
Reference in New Issue
Block a user