mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
feat(admin): deep-linkable console URLs, stop collapsing unknown paths to /admin
The root catch-all page ([...slug].vue) redirected every unknown URL to /admin, and the worker fell back to the SPA for any path — so no matter what page was opened, the URL ended up at baseurl/admin. - Extract the console into ConsolePage.vue; the active tab now mirrors the URL path: /admin (groups), /admin/groups, /admin/logs, /admin/audit (tab switches use router.replace; unknown slugs render 404) - admin.vue and admin/[slug].vue become thin wrappers - Delete the root [...slug].vue catch-all redirect - server.ts: notFound serves ASSETS (SPA + _nuxt chunks) only for /admin-prefixed paths; every other unknown URL returns a JSON 404
This commit is contained in:
parent
a0e15975df
commit
c73b642504
7 changed files with 476 additions and 446 deletions
|
|
@ -56,6 +56,8 @@ WebHooker 内置了位于 `/admin` 的配置控制台,可在浏览器中管理
|
|||
|
||||
### 端点
|
||||
|
||||
控制台以 SPA 形式挂在 `/admin`,各标签页可通过 URL 路径直达(`/admin/groups`、`/admin/logs`、`/admin/audit`)。`/admin` 之外且未匹配下方端点的 URL 直接返回 `404`,不会再被吞进控制台。
|
||||
|
||||
| 端点 | 说明 |
|
||||
| ------------------------------------- | ------------------------------------ |
|
||||
| `GET /admin` | 配置控制台页面 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue