it0/it0-web-admin
hailin b63341a464 feat(web-admin): add App Version Management page for IT0 App
Ports the APK/IPA upgrade management UI from rwadurian/mobile-upgrade
into it0-web-admin, adapted exclusively for IT0 App's version-service.

New files:
- src/domain/entities/app-version.ts
  Domain entity matching version-service response schema:
  platform returned as ANDROID/IOS (normalized to lowercase),
  fileSize as number (bigint), no versionCode/fileSha256 fields.

- src/infrastructure/repositories/api-app-version.repository.ts
  CRUD via existing apiClient (→ /api/proxy/api/v1/versions).
  Upload/parse use dedicated Next.js routes (/api/app-versions/*)
  because the existing proxy uses request.text() which corrupts binary.

- src/app/api/app-versions/upload/route.ts
  Multipart FormData upload proxy → API_BASE_URL/api/v1/versions/upload
  maxDuration=300s for large APK files (up to 500 MB).

- src/app/api/app-versions/parse/route.ts
  Multipart proxy → API_BASE_URL/api/v1/versions/parse
  Forwards APK/IPA file to version-service for auto-parsing.

- src/app/(admin)/app-versions/page.tsx
  Admin page: react-query list, platform filter (all/android/ios),
  upload button, loading skeleton, delete/toggle with confirm.
  Single-app (IT0 only) — no multi-app switcher from mobile-upgrade.

- src/presentation/components/app-versions/version-card.tsx
  Version card with enable/disable/edit/delete/download actions.
  Uses dark-theme CSS variables (bg-card, text-muted-foreground, etc.)

- src/presentation/components/app-versions/upload-modal.tsx
  Upload modal: auto-detects platform from .apk/.ipa extension,
  auto-parses version info via /parse endpoint, sonner toasts.

- src/presentation/components/app-versions/edit-modal.tsx
  Edit modal: update changelog, force-update flag, enabled state,
  min OS version. Loads version data on open via getVersionById.

Modified:
- sidebar.tsx: added Smartphone icon + appVersions nav item → /app-versions
- locales/zh/sidebar.json: "appVersions": "App 版本管理"
- locales/en/sidebar.json: "appVersions": "App Versions"

Backend: IT0 version-service at /api/v1/versions (no auth guard required)
Flutter: it0_app/lib/core/updater/version_checker.dart calls
  GET /api/app/version/check (public) for client-side update check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 04:51:19 -08:00
..
public/icons feat: rename app from IT0 to iAgent (我智能体) 2026-02-22 06:39:40 -08:00
src feat(web-admin): add App Version Management page for IT0 App 2026-03-06 04:51:19 -08:00
.dockerignore fix: add Dockerfiles and fix docker-compose build configuration 2026-02-19 04:31:23 -08:00
Dockerfile fix: copy public/ directory in web-admin Dockerfile for static assets 2026-02-22 06:28:45 -08:00
deploy.sh feat: add deployment scripts with SSL support for production 2026-02-09 17:44:27 -08:00
next-env.d.ts feat: add dual tenant registration (self-service + invitation) 2026-02-22 03:10:18 -08:00
next.config.js fix: add Dockerfiles and fix docker-compose build configuration 2026-02-19 04:31:23 -08:00
package-lock.json feat: add multi-language (i18n) support to web admin with Chinese and English 2026-02-22 04:56:04 -08:00
package.json feat: add multi-language (i18n) support to web admin with Chinese and English 2026-02-22 04:56:04 -08:00
postcss.config.js Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00
tailwind.config.ts feat: redesign sidebar with icons, collapse toggle, and improved theme 2026-02-22 02:09:28 -08:00
tsconfig.json Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00