Skip to content

Commit fc13d41

Browse files
committed
feat(assistant): Added a new assistant debugging page
1 parent 553faa5 commit fc13d41

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

frontend/embedded.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite-sqlbot.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>SQLBot</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

frontend/src/embedded.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { createApp } from 'vue'
2+
import { createPinia } from 'pinia'
3+
import './style.less'
4+
import App from './App.vue'
5+
import router from './router'
6+
import { i18n } from './i18n'
7+
import VueDOMPurifyHTML from 'vue-dompurify-html'
8+
9+
// import 'element-plus/dist/index.css'
10+
const app = createApp(App)
11+
const pinia = createPinia()
12+
13+
app.use(pinia)
14+
app.use(router)
15+
app.use(i18n)
16+
app.use(VueDOMPurifyHTML)
17+
app.mount('#app')

frontend/src/router/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import DashboardPreview from '@//views/dashboard/preview/SQPreviewSingle.vue'
1111
import Dashboard from '@/views/dashboard/index.vue'
1212
import Model from '@/views/system/model/Model.vue'
1313
import Embedded from '@/views/system/embedded/index.vue'
14+
import assistantTest from '@/views/system/embedded/Test.vue'
1415
import assistant from '@/views/embedded/index.vue'
1516
import Member from '@/views/system/member/index.vue'
1617
import Appearance from '@/views/system/appearance/index.vue'
@@ -180,6 +181,12 @@ export const routes = [
180181
name: 'assistant',
181182
component: assistant,
182183
},
184+
185+
{
186+
path: '/assistantTest',
187+
name: 'assistantTest',
188+
component: assistantTest,
189+
},
183190
]
184191
const router = createRouter({
185192
history: createWebHashHistory(),
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>
2+
<iframe
3+
width="400"
4+
height="700"
5+
style="position: fixed; left: 16px; bottom: 16px"
6+
src="/embedded.html/#/assistant?id=1"
7+
frameborder="0"
8+
></iframe>
9+
</template>

0 commit comments

Comments
 (0)