astrbot_plugin_imagestudio/frontend
2026-07-23 22:56:58 +08:00
..
plugin-page release: publish ImageStudio 1.0.8 2026-07-13 01:49:00 +08:00
shared fix: support profile deletion through plugin bridge 2026-07-23 22:56:58 +08:00
standalone-web fix: support profile deletion through plugin bridge 2026-07-23 22:56:58 +08:00
tests fix: make primary pages resilient in sandboxed iframe 2026-07-23 01:23:26 +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: complete style profile p0-p2 hardening 2026-07-21 02:13:33 +08:00
package.json feat: complete ImageStudio UI redesign rollout 2026-07-22 00:26:36 +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.