diff --git a/apps/web/.env.production b/apps/web/.env.production
index b6913ab..a241ae7 100644
--- a/apps/web/.env.production
+++ b/apps/web/.env.production
@@ -1,4 +1,3 @@
PUBLIC_ENV=xuyue.cc
-PUBLIC_MAXKB_URL=https://maxkb.xuyue.cc/chat/api/embed?protocol=https&host=maxkb.xuyue.cc&token=dd37457027c40b39
PUBLIC_CODE_URL=https://code.xuyue.cc
PUBLIC_ICONIFY_URL=https://icon.xuyue.cc
\ No newline at end of file
diff --git a/apps/web/.env.staging b/apps/web/.env.staging
index a913ce6..190af53 100644
--- a/apps/web/.env.staging
+++ b/apps/web/.env.staging
@@ -1,4 +1,3 @@
PUBLIC_ENV=school
-PUBLIC_MAXKB_URL=http://10.13.114.114:92/chat/api/embed?protocol=http&host=10.13.114.114:92&token=dd37457027c40b39
PUBLIC_CODE_URL=http://10.13.114.114:82
PUBLIC_ICONIFY_URL=http://10.13.114.114:8098
diff --git a/apps/web/.env.test b/apps/web/.env.test
index 38e91cf..dd12c88 100644
--- a/apps/web/.env.test
+++ b/apps/web/.env.test
@@ -1,4 +1,3 @@
PUBLIC_ENV=test
-PUBLIC_MAXKB_URL=http://10.13.114.114:92/chat/api/embed?protocol=http&host=10.13.114.114:92&token=dd37457027c40b39
PUBLIC_CODE_URL=http://10.13.114.114:82
PUBLIC_ICONIFY_URL=http://10.13.114.114:8098
diff --git a/apps/web/CLAUDE.md b/apps/web/CLAUDE.md
index 4dcef82..5213ee9 100644
--- a/apps/web/CLAUDE.md
+++ b/apps/web/CLAUDE.md
@@ -59,7 +59,7 @@ API 调用不按模块分:学生端全在 `oj/api.ts`、后台全在 `admin/ap
Shared logic lives in `shared/`:
- `store/` — Pinia stores: `user` (auth/roles), `config` (site-wide settings), `authModal` (login/signup form state), `collab` (help-request queue + collab room), `achievement` (解锁弹窗队列), `myFlowchart` (题面「你画的流程图」那张 A/S 图的 mermaid 源码)
-- `composables/` — `aiStream`, `pagination` (URL-synced), `websocket` (reconnect + heartbeat), `collabDoc` (Yjs binding for the collab channel), `configUpdate` (WS-pushed config sync), `useMermaid` (lazy Mermaid render), `darkTransition` (View Transitions,111 以下走降级分支), `leaveStudents` (课堂看板的「请假」), `chartTheme`, `breakpoints`, `maxkb`, `rarity`
+- `composables/` — `aiStream`, `pagination` (URL-synced), `websocket` (reconnect + heartbeat), `collabDoc` (Yjs binding for the collab channel), `configUpdate` (WS-pushed config sync), `useMermaid` (lazy Mermaid render), `darkTransition` (View Transitions,111 以下走降级分支), `leaveStudents` (课堂看板的「请假」), `chartTheme`, `breakpoints`, `rarity`
- `layout/` — `default.vue` and `admin.vue` layout wrappers
- `api.ts` — shared API calls (auth, profile, tags, captcha)
@@ -168,7 +168,6 @@ Env files: `.env`(本机)、`.env.production`(服务器)、`.env.staging
|---|---|
| `PUBLIC_ENV` | 环境角标:`test` → 「测试版」,`dev` → 「开发版」,其余不显示 |
| `PUBLIC_CODE_URL` | 代码分享服务(提交详情、题目页的「分享」) |
-| `PUBLIC_MAXKB_URL` | 知识库问答挂件 |
| `PUBLIC_ICONIFY_URL` | 自建 Iconify 图标源,不设则走公共 CDN |
后端地址**不在这里**:`utils/api.ts` 写死 `baseURL: "/api"`,dev 由 `vite.config.ts` 的
diff --git a/apps/web/index.html b/apps/web/index.html
index 3737e63..1be5500 100644
--- a/apps/web/index.html
+++ b/apps/web/index.html
@@ -6,9 +6,6 @@
判题狗
-
diff --git a/apps/web/src/App.vue b/apps/web/src/App.vue
index 9a6ac7f..ce96930 100644
--- a/apps/web/src/App.vue
+++ b/apps/web/src/App.vue
@@ -4,7 +4,6 @@ import "normalize.css"
import "./index.css"
import { useConfigStore } from "shared/store/config"
import { useConfigUpdate } from "shared/composables/configUpdate"
-import { useMaxKB } from "shared/composables/maxkb"
import { useUserStore } from "shared/store/user"
import { useCollabStore } from "shared/store/collab"
import CollabHost from "shared/components/CollabHost.vue"
@@ -20,11 +19,9 @@ onMounted(() => {
userStore.getMyProfile()
})
-// 配置实时推送 + MaxKB 挂件。阶段 2 时因为后端还没有 /ws/config 而暂时关掉,
-// 阶段 3 迁完之后一直没接回来 —— 表现是管理员改站点配置后学生要刷新才生效、
-// 知识库挂件根本不出现,且没有任何报错。两者现在都走新后端的 /ws/config。
+// 配置实时推送。阶段 2 时因为后端还没有 /ws/config 而暂时关掉,阶段 3 迁完之后一直
+// 没接回来 —— 表现是管理员改站点配置后学生要刷新才生效,且没有任何报错。现在走新后端的 /ws/config。
useConfigUpdate()
-useMaxKB()
// 课堂求助通道。和 /ws/config 一样是全局常驻的:老师可能正在后台改题时
// 收到求助,学生也要在排队期间一直挂着,所以不放在题目页里起落。
diff --git a/apps/web/src/admin/setting/config.vue b/apps/web/src/admin/setting/config.vue
index a9d57bf..78a1f15 100644
--- a/apps/web/src/admin/setting/config.vue
+++ b/apps/web/src/admin/setting/config.vue
@@ -1,9 +1,10 @@
-
-
-
- 保存
+
+
+ 保存
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 填 {{ CLASS_NAME_MIN_DIGITS }}~{{ CLASS_NAME_MAX_DIGITS }}
- 位数字,如 251、2510,要和用户名里 ks 后面那段一致;
- 拖动标签调整顺序(登录页等下拉框按此顺序),改完点保存
-
-
-
-
-
-
- 是否允许注册
-
-
-
- 显示所有提交
-
-
-
- 启用AI小助手
-
-
-
-
-
-
+
+
+
+ 网站
+
+
+
+ 顶栏左上角和浏览器标签页上显示的名字
+
+
+
+
+
+ 班级 {{ websiteConfig.classList.length }} 个
+
+
+
{{ group.grade === "其他" ? "其他" : `${group.grade} 级` }}
+
+
+ {{ classLabel(name) }}
+
+
+
+
+
+
+ 加
+ 批量建号时新班级会自动加进来,这里主要是删掉毕业的班
+
+
+
+
+ 开关
+
+
+
+
+
+
+ 判题机
- 删除无效服务器
+ 把断了的都删掉
+
+
+
+
+
+
{{ server.hostname }}
+
+ {{ server.cpuCore }} 核 · CPU {{ server.cpuUsage }}% · 内存 {{ server.memoryUsage }}% · 版本
+ {{ server.judgerVersion }}
+
+
+ {{ heartbeatText(server) }}
+
+
+ 删掉
-
-
- 接口凭证 {{ token }}
-
-
-
-
- deleteTestcase()">全部删除
-
-
-
+
+ 接口凭证
+ {{ tokenShown ? token : "••••••••••••" }}
+
+ {{ tokenShown ? "藏起来" : "显示" }}
+
+ 复制
+
+
+
+
+
+ 没有题目用的测试数据 {{ testcases.length }} 份
+ 都删掉
+
+ 删题时测试数据留在了磁盘上(故意的,删错了还能捞回来)
+
+
+ {{ item.id }}
+
+
+
diff --git a/apps/web/src/env.d.ts b/apps/web/src/env.d.ts
index a88efce..62fa1a8 100644
--- a/apps/web/src/env.d.ts
+++ b/apps/web/src/env.d.ts
@@ -2,7 +2,6 @@
interface ImportMetaEnv {
readonly PUBLIC_ENV: string
- readonly PUBLIC_MAXKB_URL: string
readonly PUBLIC_CODE_URL: string
readonly PUBLIC_ICONIFY_URL: string
}
diff --git a/apps/web/src/shared/store/config.ts b/apps/web/src/shared/store/config.ts
index 023f8af..211b57d 100644
--- a/apps/web/src/shared/store/config.ts
+++ b/apps/web/src/shared/store/config.ts
@@ -3,17 +3,10 @@ import type { WebsiteConfig } from "utils/types"
export const useConfigStore = defineStore("config", () => {
const config = ref
({
- websiteBaseUrl: "",
websiteName: "",
- websiteNameShortcut: "",
- websiteFooter: "",
submissionListShowAll: true,
allowRegister: false,
classList: [],
- // 默认 false:这是给 useMaxKB 用的开关,而 MaxKB 是第三方脚本。
- // 默认 true 的话,getConfig() 还没回来挂件就已经加载执行了,服务端配置说
- // 「关」也只能事后删标签,等于开关失效。宁可晚一个来回出现,也不要关不掉。
- enableMaxkb: false,
})
async function getConfig() {
const res = await getWebsiteConfig()
diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts
index 166e02f..4db29de 100644
--- a/apps/web/vite.config.ts
+++ b/apps/web/vite.config.ts
@@ -69,16 +69,6 @@ const polyfills = [
"web.url.parse",
]
-// MaxKB 脚本**不要**在这里注入 index.html。
-//
-// 原来有个 inject-maxkb 插件把