Commit graph

14 commits

Author SHA1 Message Date
dcbe93be91
feat(admin): add detailed send log viewer with extended fields 2026-08-03 05:19:02 +08:00
3a6a2cbbc5
feat: migrate send logs and discord links to D1 2026-08-03 05:18:58 +08:00
0af6b9a4b8
refactor: modularize into core/events/formatters/drivers 2026-08-03 03:36:36 +08:00
d540d465d1
refactor: replace Discord Gateway DO with Interaction Endpoint 2026-08-03 03:02:42 +08:00
809f89400b
feat: add per-group emoji toggle and standardized embed titles 2026-08-03 01:25:03 +08:00
38daf7bc83
feat: ignore filters on fallback routes 2026-08-03 00:02:29 +08:00
d419b9c940
feat: add fallback routes and repository event enrichment 2026-08-02 23:23:07 +08:00
44b8fead78
feat: add merge/close PR buttons to Discord PR notifications 2026-08-02 23:02:37 +08:00
537f4cbb84
feat(admin): scope groups to specific GitHub orgs/users
Add an optional owners[] field to groups (super-admin only). When set,
only webhook events whose repository owner or organization login matches
enter that group's routes; empty owners means no restriction, keeping
existing routes backward compatible.

- types: Group.owners?, groups.ts groupAcceptsOwners()
- webhook.ts eventOwners() extracts repo owner + org login
- discord.ts dispatch skips routes whose group rejects the event owner
- admin-routes.ts validateGroups() validates owners list
2026-08-02 08:15:49 +08:00
81d21ffb08
feat(web): add public landing page and move console to /admin
Serve a public landing page at / with buttons to the docs, GitHub repo,
Terms, Privacy and the admin login. Relocate the Nuxt admin console from
/ to /admin so the root is no longer the private console.

- add home-routes.ts (bilingual landing, auto dark mode, configurable
  DOCS_URL / GITHUB_REPO_URL) mounted at /
- move console to admin/pages/admin.vue; redirect / and unknown SPA
  routes to /admin
- point admin login/logout redirects at /admin
2026-08-02 07:40:14 +08:00
fc243811f0
feat(admin): add group-based access scoping for routes and logs
Introduce optional route groups so non-super admins can be delegated
edit/view access to a subset of routes and their send logs.

- add Group model and Route.groupId
- add groups.ts (load/save groups, resolveScope, permission helpers)
- scope /api/routes and /api/logs by the caller's accessible groups;
  add /api/me and /api/groups (group management is super-admin only)
- require a groupId on every route in validateRoutes
- allow group admins (not just super admins) to sign in to the console
2026-08-02 07:39:35 +08:00
225d5b015e
feat(legal): serve Terms of Service and Privacy Policy pages
Add bilingual (zh/en) /terms and /privacy pages served by the Worker for
configuring the Discord application's Terms of Service and Privacy Policy
URLs. Contact line is configurable via optional LEGAL_CONTACT env var.
2026-08-02 07:12:54 +08:00
4d5c90773d
feat(config): switch to routes-only config, drop default channel
Remove hardcoded DEFAULT_ROUTES and Config.discord.defaultChannelId so
forwarding is driven entirely by user-defined routes (empty KV = no
forwarding). Add ADMIN_USER_IDS, DISCORD_GATEWAY_ENABLED and ASSETS to Env.
2026-08-02 06:49:56 +08:00
512d4b01d5
initial commit 2026-07-24 21:48:50 +08:00