astrbot_plugin_imagestudio/frontend
2026-07-11 21:50:34 +08:00
..
plugin-page feat: complete ImageStudio workbench UI and integration audit 2026-07-11 21:50:34 +08:00
shared feat: complete ImageStudio workbench UI and integration audit 2026-07-11 21:50:34 +08:00
standalone-web feat: complete ImageStudio workbench UI and integration audit 2026-07-11 21:50:34 +08:00
env.d.ts feat: complete ImageStudio workbench UI and integration audit 2026-07-11 21:50:34 +08:00
package-lock.json feat: add mounted web ui shells 2026-07-05 09:24:00 +08:00
package.json chore: initialize v3 plugin scaffold 2026-07-04 22:51:52 +08:00
README.md feat: complete ImageStudio workbench UI and integration audit 2026-07-11 21:50:34 +08:00
tsconfig.json chore: initialize v3 plugin scaffold 2026-07-04 22:51:52 +08:00

Frontend

The frontend contains two Vite applications:

  • plugin-page/: builds into ../pages/imagestudio.
  • standalone-web/: builds into ../web.

Shared API clients, types, stores, components, constants, schemas, and utilities live in shared/.

The Workbench is split by responsibility:

  • standalone-web/src/App.vue owns page orchestration, backend state, and cross-feature coordination.
  • standalone-web/src/components/ contains reusable navigation, metric, state, empty-state, image-preview, and material-dialog components.
  • standalone-web/src/features/ contains feature-level pure logic such as external character-profile parsing.
  • standalone-web/src/types/ contains shell/navigation contracts shared by the Workbench components.
  • shared/utils/ contains presentation and storage:// helpers reused by both the Workbench and dialogs.

Keep new modal, status-card, metric-card, parsing, and formatting logic out of App.vue when an existing component or utility can own it. The Workbench stylesheet is intentionally app-global inside the standalone page/plugin iframe so extracted components can reuse the same design tokens and class primitives.

Install dependencies with npm.cmd install on Windows or npm install on other platforms. Validate with npm.cmd run typecheck, then build both targets with npm.cmd run build.

Both targets render the same Workbench implementation and consume the same v3 API contract:

  • Plugin Page UI prefers window.AstrBotPluginPage; the shared client unwraps AstrBot and ImageStudio response envelopes and provides a POST method-override envelope for legacy bridges that only expose GET/POST.
  • Standalone Web UI uses /api/v1/plugins/extensions/astrbot_plugin_imagestudio.

Do not store API keys, media paths, or selected image state in frontend-only storage.