@h-ai/cli 0.1.0-alpha9 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +229 -0
- package/README.ja.md +229 -0
- package/README.md +175 -113
- package/dist/chunk-AKV2CQZV.js +1497 -0
- package/dist/chunk-AKV2CQZV.js.map +1 -0
- package/dist/chunk-EF7WOFWZ.js +7557 -0
- package/dist/chunk-EF7WOFWZ.js.map +1 -0
- package/dist/chunk-MUHRBJSW.js +29272 -0
- package/dist/chunk-MUHRBJSW.js.map +1 -0
- package/dist/chunk-ZSDEVXZ7.js +38 -0
- package/dist/{chunk-2H7UOFLK.js.map → chunk-ZSDEVXZ7.js.map} +1 -1
- package/dist/cli-config-templates-HHFHNXBN.js +5 -0
- package/dist/cli-config-templates-HHFHNXBN.js.map +1 -0
- package/dist/cli-skill-templates-PN4FLGBC.js +5 -0
- package/dist/cli-skill-templates-PN4FLGBC.js.map +1 -0
- package/dist/index.js +4444 -554
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -0
- package/dist/src-TEBHR5I5.js +5 -0
- package/dist/src-TEBHR5I5.js.map +1 -0
- package/package.json +35 -15
- package/templates/README.md +56 -114
- package/templates/apps/admin/messages/en-US.json +7 -0
- package/templates/apps/admin/messages/ja-JP.json +40 -0
- package/templates/apps/admin/messages/zh-CN.json +7 -0
- package/templates/apps/admin/src/routes/+layout.svelte.hbs +65 -8
- package/templates/apps/admin/src/routes/+page.svelte.hbs +35 -14
- package/templates/apps/admin/src/routes/admin/+layout.svelte.hbs +54 -22
- package/templates/apps/admin/src/routes/admin/+page.svelte.hbs +33 -24
- package/templates/apps/admin/src/routes/admin/settings/+page.svelte.hbs +16 -13
- package/templates/apps/api/.dockerignore.hbs +25 -0
- package/templates/apps/api/.gitignore.hbs +22 -0
- package/templates/apps/api/.npmrc.hbs +1 -0
- package/templates/apps/api/apps/{{projectName}}-contract/README.md.hbs +39 -0
- package/templates/apps/api/apps/{{projectName}}-contract/package.json.hbs +41 -0
- package/templates/apps/api/apps/{{projectName}}-contract/src/app-contract.ts.hbs +27 -0
- package/templates/apps/api/apps/{{projectName}}-contract/src/app-schemas.ts.hbs +28 -0
- package/templates/apps/api/apps/{{projectName}}-contract/src/index.ts.hbs +5 -0
- package/templates/apps/api/apps/{{projectName}}-contract/src/{{projectName}}-contract.ts.hbs +16 -0
- package/templates/apps/api/apps/{{projectName}}-contract/tests/contract.test.ts.hbs +18 -0
- package/templates/apps/api/apps/{{projectName}}-contract/tsconfig.json.hbs +12 -0
- package/templates/apps/api/apps/{{projectName}}-contract/tsup.config.ts.hbs +11 -0
- package/templates/apps/api/apps/{{projectName}}-contract/vitest.config.ts.hbs +9 -0
- package/templates/apps/api/apps/{{projectName}}-serv/README.md.hbs +60 -0
- package/templates/apps/api/apps/{{projectName}}-serv/config/_core.yml.hbs +17 -0
- package/templates/apps/api/apps/{{projectName}}-serv/config/_serv.yml.hbs +54 -0
- package/templates/apps/api/apps/{{projectName}}-serv/data/.gitkeep.hbs +1 -0
- package/templates/apps/api/apps/{{projectName}}-serv/package.json.hbs +66 -0
- package/templates/apps/api/apps/{{projectName}}-serv/src/app.ts.hbs +119 -0
- package/templates/apps/api/apps/{{projectName}}-serv/src/build-metadata.ts.hbs +7 -0
- package/templates/apps/api/apps/{{projectName}}-serv/src/index.ts.hbs +41 -0
- package/templates/apps/api/apps/{{projectName}}-serv/src/lib/server/init.ts.hbs +165 -0
- package/templates/apps/api/apps/{{projectName}}-serv/src/server/procedures/app-procedures.ts.hbs +57 -0
- package/templates/apps/api/apps/{{projectName}}-serv/src/server/procedures/index.ts.hbs +41 -0
- package/templates/apps/api/apps/{{projectName}}-serv/tests/service.test.ts.hbs +176 -0
- package/templates/apps/api/apps/{{projectName}}-serv/tsconfig.json.hbs +16 -0
- package/templates/apps/api/apps/{{projectName}}-serv/tsup.config.ts.hbs +20 -0
- package/templates/apps/api/apps/{{projectName}}-serv/vitest.config.ts.hbs +12 -0
- package/templates/apps/api/e2e/api-serv.spec.ts.hbs +113 -0
- package/templates/apps/api/e2e/capture-evidence.ts.hbs +23 -0
- package/templates/apps/api/eslint.config.js.hbs +30 -0
- package/templates/apps/api/hai.json.hbs +4 -0
- package/templates/apps/api/images/serv.Dockerfile.hbs +37 -0
- package/templates/apps/api/package.json.hbs +53 -0
- package/templates/apps/api/playwright.config.ts.hbs +67 -0
- package/templates/apps/api/pnpm-workspace.yaml.hbs +40 -0
- package/templates/apps/api/tsconfig.base.json +14 -0
- package/templates/apps/fullstack/.dockerignore.hbs +25 -0
- package/templates/apps/fullstack/.gitignore.hbs +38 -0
- package/templates/apps/fullstack/.npmrc.hbs +1 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/.env.example.hbs +10 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/README.md.hbs +67 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/capacitor.config.ts.hbs +20 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/eslint.config.js.hbs +20 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/index.html.hbs +22 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/messages/en-US.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/messages/ja-JP.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/messages/zh-CN.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/package.json.hbs +86 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/project.inlang/settings.json.hbs +17 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/public/runtime-config.js.hbs +4 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/src/App.svelte.hbs +59 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/src/app.css.hbs +20 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/src/app.d.ts.hbs +8 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/src/build-metadata.ts.hbs +9 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/src/lib/capacitor.ts.hbs +19 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/src/main.ts.hbs +21 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/svelte.config.js.hbs +16 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/tsconfig.json.hbs +23 -0
- package/templates/apps/fullstack/apps/{{projectName}}-app/vite.config.ts.hbs +74 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/.env.example.hbs +6 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/README.md.hbs +64 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/eslint.config.js.hbs +20 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/index.html.hbs +20 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/messages/en-US.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/messages/ja-JP.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/messages/zh-CN.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/package.json.hbs +66 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/project.inlang/settings.json.hbs +17 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src/App.svelte.hbs +25 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src/app.css.hbs +18 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src/app.d.ts.hbs +8 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src/build-metadata.ts.hbs +9 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src/main.ts.hbs +20 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/Cargo.toml.hbs +33 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/build.rs.hbs +6 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/capabilities/default.json.hbs +16 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/icons/128x128.png +0 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/icons/128x128@2x.png +0 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/icons/32x32.png +0 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/icons/icon.icns +0 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/icons/icon.ico +0 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/src/lib.rs.hbs +91 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/src/main.rs.hbs +8 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/src-tauri/tauri.conf.json.hbs +46 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/svelte.config.js.hbs +14 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/tsconfig.json.hbs +22 -0
- package/templates/apps/fullstack/apps/{{projectName}}-desktop/vite.config.ts.hbs +89 -0
- package/templates/apps/fullstack/apps/{{projectName}}-miniapp/README.md.hbs +25 -0
- package/templates/apps/fullstack/apps/{{projectName}}-miniapp/messages/en-US.json.hbs +12 -0
- package/templates/apps/fullstack/apps/{{projectName}}-miniapp/messages/ja-JP.json.hbs +12 -0
- package/templates/apps/fullstack/apps/{{projectName}}-miniapp/messages/zh-CN.json.hbs +12 -0
- package/templates/apps/fullstack/apps/{{projectName}}-miniapp/project.inlang/settings.json.hbs +17 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/README.md.hbs +54 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/eslint.config.js.hbs +20 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/index.html.hbs +21 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/messages/en-US.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/messages/ja-JP.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/messages/zh-CN.json.hbs +7 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/package.json.hbs +53 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/project.inlang/settings.json.hbs +17 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/public/runtime-config.js.hbs +1 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/src/App.svelte.hbs +18 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/src/app.css.hbs +18 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/src/app.d.ts.hbs +8 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/src/build-metadata.ts.hbs +9 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/src/main.ts.hbs +14 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/svelte.config.js.hbs +16 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/tsconfig.json.hbs +23 -0
- package/templates/apps/fullstack/apps/{{projectName}}-web/vite.config.ts.hbs +76 -0
- package/templates/apps/fullstack/docs/security-configuration.md.hbs +349 -0
- package/templates/apps/fullstack/e2e/fullstack.spec.ts.hbs +988 -0
- package/templates/apps/fullstack/e2e/session-close.spec.ts.hbs +119 -0
- package/templates/apps/fullstack/eslint.config.js.hbs +41 -0
- package/templates/apps/fullstack/hai.json.hbs +11 -0
- package/templates/apps/fullstack/images/serv.Dockerfile.hbs +38 -0
- package/templates/apps/fullstack/images/web/19-runtime-config.envsh.hbs +5 -0
- package/templates/apps/fullstack/images/web/nginx.conf.hbs +24 -0
- package/templates/apps/fullstack/images/web/runtime-config.js.template.hbs +3 -0
- package/templates/apps/fullstack/images/web.Dockerfile.hbs +37 -0
- package/templates/apps/fullstack/package.json.hbs +61 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/README.md.hbs +40 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/package.json.hbs +30 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/admin-contract.ts.hbs +78 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/admin-schemas.ts.hbs +134 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/app-contract.ts.hbs +20 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/app-schemas.ts.hbs +35 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/index.ts.hbs +7 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/src/{{projectName}}-contract.ts.hbs +23 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/tests/contract.test.ts.hbs +31 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/tsconfig.json.hbs +9 -0
- package/templates/apps/fullstack/packages/{{projectName}}-contract/tsup.config.ts.hbs +9 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/README.md.hbs +84 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_ai.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_audit.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_cache.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_core.yml.hbs +22 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_db.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_feedback.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_iam.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_payment.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_reach.yml.hbs +60 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_scheduler.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_serv.yml.hbs +64 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_storage.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/config/_vecdb.yml.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/data/.gitkeep.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/package.json.hbs +62 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/app-server.ts.hbs +115 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/build-metadata.ts.hbs +7 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/index.ts.hbs +40 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/admin-service.ts.hbs +294 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/audit-jobs.ts.hbs +28 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/business-settings.ts.hbs +50 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/messages.ts.hbs +50 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/procedures/admin-procedures.ts.hbs +106 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/procedures/app-procedures.ts.hbs +49 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/procedures/index.ts.hbs +34 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/runtime.ts.hbs +159 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/src/server/security-roles.ts.hbs +73 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/tests/app-server.test.ts.hbs +505 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/tests/runtime.test.ts.hbs +72 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/tests/security.test.ts.hbs +183 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/tsconfig.json.hbs +10 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/tsup.config.ts.hbs +18 -0
- package/templates/apps/fullstack/packages/{{projectName}}-serv/vitest.config.ts.hbs +12 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/.gitignore.hbs +10 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/README.md.hbs +97 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/messages/en-US.json.hbs +164 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/messages/ja-JP.json.hbs +164 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/messages/zh-CN.json.hbs +164 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/package.json.hbs +55 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/project.inlang/settings.json.hbs +11 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/index.ts.hbs +7 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/api/api-client.ts.hbs +94 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/api/feedback-client.ts.hbs +36 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/api/sensitive-actions.svelte.ts.hbs +16 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/api/session-recovery.svelte.ts.hbs +4 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/components/AdminWorkspace.svelte.hbs +122 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/components/AppShell.svelte.hbs +90 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/components/FeedbackEntry.svelte.hbs +86 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/audit.svelte.hbs +94 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/configuration.svelte.hbs +25 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/feedback.svelte.hbs +157 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/roles.svelte.hbs +77 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/settings.svelte.hbs +44 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/pages/users.svelte.hbs +216 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/security/role-label.ts.hbs +12 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/stores/guide-store.ts.hbs +55 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/stores/management-store.svelte.ts.hbs +614 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/src/lib/stores/theme-store.svelte.ts.hbs +23 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/svelte.config.js.hbs +1 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/tests/api-client.test.ts.hbs +150 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/tests/management-store.test.ts.hbs +253 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/tsconfig.json.hbs +17 -0
- package/templates/apps/fullstack/packages/{{projectName}}-shared/vitest.config.ts.hbs +7 -0
- package/templates/apps/fullstack/playwright.config.ts.hbs +114 -0
- package/templates/apps/fullstack/playwright.session-close.config.ts.hbs +18 -0
- package/templates/apps/fullstack/pnpm-workspace.yaml.hbs +38 -0
- package/templates/apps/fullstack/tsconfig.base.json +14 -0
- package/templates/apps/h5/messages/en-US.json +3 -0
- package/templates/apps/h5/messages/ja-JP.json +40 -0
- package/templates/apps/h5/messages/zh-CN.json +3 -0
- package/templates/apps/h5/src/routes/+layout.svelte.hbs +85 -30
- package/templates/apps/h5/src/routes/+page.svelte.hbs +20 -8
- package/templates/apps/h5/src/routes/discover/+page.svelte.hbs +17 -6
- package/templates/apps/h5/src/routes/profile/+page.svelte.hbs +17 -6
- package/templates/apps/mobile-app/.env.hbs +3 -0
- package/templates/apps/{android-app → mobile-app}/capacitor.config.ts.hbs +2 -2
- package/templates/apps/mobile-app/index.html.hbs +14 -0
- package/templates/apps/mobile-app/messages/en-US.json +36 -0
- package/templates/apps/mobile-app/messages/ja-JP.json +36 -0
- package/templates/apps/mobile-app/messages/zh-CN.json +36 -0
- package/templates/apps/mobile-app/public/runtime-config.js +1 -0
- package/templates/apps/mobile-app/src/App.svelte.hbs +153 -0
- package/templates/apps/mobile-app/src/lib/api.ts.hbs +213 -0
- package/templates/apps/mobile-app/src/lib/app-config.ts.hbs +14 -0
- package/templates/apps/{android-app → mobile-app}/src/lib/capacitor.ts +6 -7
- package/templates/apps/mobile-app/src/lib/pages/home.svelte.hbs +58 -0
- package/templates/apps/mobile-app/src/lib/pages/profile.svelte.hbs +13 -0
- package/templates/apps/mobile-app/src/lib/pages/tasks.svelte.hbs +16 -0
- package/templates/apps/mobile-app/src/main.ts.hbs +11 -0
- package/templates/apps/website/messages/en-US.json +4 -2
- package/templates/apps/website/messages/ja-JP.json +34 -0
- package/templates/apps/website/messages/zh-CN.json +4 -2
- package/templates/apps/website/scripts/static-website.mjs.hbs +67 -0
- package/templates/apps/website/src/routes/+layout.svelte.hbs +77 -26
- package/templates/apps/website/src/routes/+layout.ts +3 -0
- package/templates/apps/website/src/routes/+page.svelte.hbs +31 -12
- package/templates/apps/website/src/routes/about/+page.svelte.hbs +11 -6
- package/templates/apps/website/src/routes/api/health/+server.ts +3 -0
- package/templates/apps/website/src/routes/contact/+page.svelte.hbs +44 -34
- package/templates/apps/website/src/routes/services/+page.svelte.hbs +27 -40
- package/templates/base/.dockerignore.hbs +27 -0
- package/templates/base/.gitignore.hbs +41 -0
- package/templates/base/.npmrc.hbs +1 -0
- package/templates/base/e2e/app.spec.ts.hbs +213 -0
- package/templates/base/e2e/helpers.ts +1 -1
- package/templates/base/eslint-rules.js +45 -0
- package/templates/base/eslint.config.js.hbs +34 -0
- package/templates/base/hai.json.hbs +4 -0
- package/templates/base/images/web/nginx.conf.hbs +24 -0
- package/templates/base/images/web.Dockerfile.hbs +72 -0
- package/templates/base/package.json.hbs +125 -49
- package/templates/base/playwright.config.ts +44 -6
- package/templates/base/pnpm-workspace.yaml.hbs +40 -0
- package/templates/base/src/app.css.hbs +40 -0
- package/templates/base/src/app.d.ts.hbs +14 -1
- package/templates/base/src/app.html.hbs +13 -0
- package/templates/base/src/hooks.server.ts.hbs +115 -43
- package/templates/base/src/lib/build-metadata.ts.hbs +7 -0
- package/templates/base/src/lib/server/init.ts.hbs +125 -152
- package/templates/base/src/lib/server/kit-config.ts.hbs +40 -0
- package/templates/base/src/routes/+layout.server.ts.hbs +35 -0
- package/templates/base/static/favicon.png +0 -0
- package/templates/base/svelte.config.js.hbs +84 -5
- package/templates/base/tests/scaffold.test.ts.hbs +102 -0
- package/templates/base/tsconfig.json.hbs +50 -0
- package/templates/base/vite.config.ts.hbs +117 -12
- package/templates/base/vitest.config.ts.hbs +19 -0
- package/templates/features/ai/routes/api/chat/+server.ts +6 -7
- package/templates/features/iam/routes-admin/(auth)/+layout.svelte.hbs +3 -17
- package/templates/features/iam/routes-admin/(auth)/auth/forgot-password/+page.svelte.hbs +10 -0
- package/templates/features/iam/routes-admin/(auth)/auth/login/+page.svelte.hbs +9 -96
- package/templates/features/iam/routes-admin/(auth)/auth/register/+page.svelte.hbs +9 -122
- package/templates/features/iam/routes-admin/(auth)/auth/reset-password/+page.svelte.hbs +10 -0
- package/templates/features/iam/routes-h5/auth/forgot-password/+page.svelte.hbs +10 -0
- package/templates/features/iam/routes-h5/auth/login/+page.svelte.hbs +9 -96
- package/templates/features/iam/routes-h5/auth/register/+page.svelte.hbs +9 -112
- package/templates/features/iam/routes-h5/auth/reset-password/+page.svelte.hbs +10 -0
- package/templates/features/iam/routes-shared/api/auth/captcha/+server.ts.hbs +4 -0
- package/templates/features/iam/routes-shared/api/auth/config/+server.ts +4 -0
- package/templates/features/iam/routes-shared/api/auth/login/+server.ts +1 -29
- package/templates/features/iam/routes-shared/api/auth/login/ldap/+server.ts +4 -0
- package/templates/features/iam/routes-shared/api/auth/login/otp/+server.ts +4 -0
- package/templates/features/iam/routes-shared/api/auth/logout/+server.ts +13 -6
- package/templates/features/iam/routes-shared/api/auth/otp/send/+server.ts +4 -0
- package/templates/features/iam/routes-shared/api/auth/password/renew/+server.ts +5 -0
- package/templates/features/iam/routes-shared/api/auth/password-reset/confirm/+server.ts +4 -0
- package/templates/features/iam/routes-shared/api/auth/password-reset/request/+server.ts +4 -0
- package/templates/features/iam/routes-shared/api/auth/reauthenticate/+server.ts +5 -0
- package/templates/features/iam/routes-shared/api/auth/register/+server.ts +1 -23
- package/templates/features/iam/routes-shared/api/auth/session/close/+server.ts.hbs +4 -0
- package/templates/features/iam/routes-website/auth/forgot-password/+page.svelte.hbs +10 -0
- package/templates/features/iam/routes-website/auth/login/+page.svelte.hbs +11 -0
- package/templates/features/iam/routes-website/auth/register/+page.svelte.hbs +11 -0
- package/templates/features/iam/routes-website/auth/reset-password/+page.svelte.hbs +10 -0
- package/templates/features/payment/routes/api/v1/payment/create/+server.ts +25 -23
- package/templates/features/payment/routes/api/v1/payment/notify/[provider]/+server.ts +5 -2
- package/templates/features/storage/routes/api/upload/+server.ts +10 -8
- package/templates/i18n/project.inlang/settings.json +2 -2
- package/templates/shared/.gitattributes +11 -0
- package/templates/shared/build-metadata.ts +42 -0
- package/templates/shared/container-runtime-config.sh +30 -0
- package/templates/shared/e2e-env.ts +98 -0
- package/templates/shared/hash-router.svelte.ts +83 -0
- package/templates/shared/public-base-path.mjs +19 -0
- package/templates/shared/run-e2e.mjs +104 -0
- package/templates/shared/vite-runtime-config.ts +56 -0
- package/templates/skills/AGENTS.md +75 -16
- package/templates/skills/CLAUDE.md +0 -11
- package/templates/skills/bridges/admin/AGENTS.md +89 -0
- package/templates/skills/bridges/api/AGENTS.md +83 -0
- package/templates/skills/bridges/fullstack/AGENTS.md.hbs +102 -0
- package/templates/skills/bridges/h5/AGENTS.md +88 -0
- package/templates/skills/bridges/mobile-app/AGENTS.md +100 -0
- package/templates/skills/bridges/website/AGENTS.md +88 -0
- package/templates/skills/copilot-instructions.md +3 -59
- package/templates/skills/hai-ai/SKILL.md +44 -715
- package/templates/skills/hai-ai/guide.md +457 -0
- package/templates/skills/hai-ai/reference.md +292 -0
- package/templates/skills/hai-api-client/SKILL.md +26 -339
- package/templates/skills/hai-api-client/reference.md +180 -0
- package/templates/skills/hai-api-contract/SKILL.md +36 -0
- package/templates/skills/hai-api-contract/reference.md +280 -0
- package/templates/skills/hai-app-create/SKILL.md +38 -351
- package/templates/skills/hai-app-create/collaboration.md +52 -0
- package/templates/skills/hai-app-create/development.md +243 -0
- package/templates/skills/hai-app-create/reference.md +376 -0
- package/templates/skills/hai-app-review/SKILL.md +57 -126
- package/templates/skills/hai-app-review/differential.md +34 -0
- package/templates/skills/hai-app-tests/SKILL.md +34 -454
- package/templates/skills/hai-app-tests/reference.md +462 -0
- package/templates/skills/hai-app-tests/validation.md +42 -0
- package/templates/skills/hai-audit/SKILL.md +37 -122
- package/templates/skills/hai-audit/reference.md +184 -0
- package/templates/skills/hai-build/SKILL.md +62 -315
- package/templates/skills/hai-build/paths.md +30 -0
- package/templates/skills/hai-build/reference.md +353 -0
- package/templates/skills/hai-cache/SKILL.md +26 -175
- package/templates/skills/hai-cache/reference.md +229 -0
- package/templates/skills/hai-capacitor/SKILL.md +24 -364
- package/templates/skills/hai-capacitor/reference.md +358 -0
- package/templates/skills/hai-change-plan/SKILL.md +46 -0
- package/templates/skills/hai-ci/SKILL.md +114 -0
- package/templates/skills/hai-core/SKILL.md +31 -469
- package/templates/skills/hai-core/reference.md +557 -0
- package/templates/skills/hai-core/request-access.md +65 -0
- package/templates/skills/hai-crypto/SKILL.md +29 -180
- package/templates/skills/hai-crypto/reference.md +317 -0
- package/templates/skills/hai-datapipe/SKILL.md +24 -207
- package/templates/skills/hai-datapipe/reference.md +204 -0
- package/templates/skills/hai-deploy/SKILL.md +53 -178
- package/templates/skills/hai-deploy/credentials.md +19 -0
- package/templates/skills/hai-deploy/middleware.md +129 -0
- package/templates/skills/hai-feedback/SKILL.md +85 -0
- package/templates/skills/hai-framework-sync/SKILL.md +105 -0
- package/templates/skills/hai-framework-sync/sync.md +49 -0
- package/templates/skills/hai-iam/SKILL.md +53 -325
- package/templates/skills/hai-iam/reference.md +535 -0
- package/templates/skills/hai-kit/SKILL.md +33 -329
- package/templates/skills/hai-kit/reference.md +202 -0
- package/templates/skills/hai-payment/SKILL.md +28 -262
- package/templates/skills/hai-payment/reference.md +295 -0
- package/templates/skills/hai-pr-review/SKILL.md +41 -0
- package/templates/skills/hai-reach/SKILL.md +28 -300
- package/templates/skills/hai-reach/reference.md +363 -0
- package/templates/skills/hai-reldb/SKILL.md +28 -449
- package/templates/skills/hai-reldb/reference.md +500 -0
- package/templates/skills/hai-scheduler/SKILL.md +26 -174
- package/templates/skills/hai-scheduler/reference.md +216 -0
- package/templates/skills/hai-serv/SKILL.md +60 -0
- package/templates/skills/hai-serv/reference.md +792 -0
- package/templates/skills/hai-spec-implement/SKILL.md +50 -0
- package/templates/skills/hai-spec-implement/changes.md +67 -0
- package/templates/skills/hai-spec-implement/evaluation.md +18 -0
- package/templates/skills/hai-spec-implement/handoff.md +47 -0
- package/templates/skills/hai-spec-implement/templates.md +117 -0
- package/templates/skills/hai-spec-implement/workflow.md +56 -0
- package/templates/skills/hai-spec-review/SKILL.md +57 -0
- package/templates/skills/hai-spec-review/checklist.md +71 -0
- package/templates/skills/hai-storage/SKILL.md +31 -262
- package/templates/skills/hai-storage/reference.md +284 -0
- package/templates/skills/hai-ui/SKILL.md +62 -238
- package/templates/skills/hai-ui/guide.md +81 -0
- package/templates/skills/hai-ui/reference.md +705 -0
- package/templates/skills/hai-ui-design/SKILL.md +31 -0
- package/templates/skills/hai-ui-design/patterns.md +31 -0
- package/templates/skills/hai-ui-review/SKILL.md +32 -0
- package/templates/skills/hai-ui-review/checklist.md +29 -0
- package/templates/skills/hai-vecdb/SKILL.md +25 -267
- package/templates/skills/hai-vecdb/reference.md +325 -0
- package/templates/skills/opencode.json +0 -5
- package/dist/chunk-2H7UOFLK.js +0 -10
- package/dist/chunk-LANIDJC7.js +0 -659
- package/dist/chunk-LANIDJC7.js.map +0 -1
- package/dist/chunk-YV7WPUI6.js +0 -206
- package/dist/chunk-YV7WPUI6.js.map +0 -1
- package/dist/config-templates-S5RI2MC6.js +0 -5
- package/dist/config-templates-S5RI2MC6.js.map +0 -1
- package/dist/skill-templates-N5DU5FNX.js +0 -5
- package/dist/skill-templates-N5DU5FNX.js.map +0 -1
- package/dist/src-XJ6YXNAF.js +0 -15030
- package/dist/src-XJ6YXNAF.js.map +0 -1
- package/templates/apps/android-app/.env.hbs +0 -3
- package/templates/apps/android-app/messages/en-US.json +0 -24
- package/templates/apps/android-app/messages/zh-CN.json +0 -24
- package/templates/apps/android-app/src/lib/api.ts.hbs +0 -30
- package/templates/apps/android-app/src/routes/+layout.svelte.hbs +0 -42
- package/templates/apps/android-app/src/routes/+layout.ts +0 -7
- package/templates/apps/android-app/src/routes/+page.svelte.hbs +0 -27
- package/templates/apps/api/src/routes/+layout.svelte +0 -14
- package/templates/apps/api/src/routes/+page.svelte +0 -11
- package/templates/apps/api/src/routes/api/v1/health/+server.ts +0 -14
- package/templates/apps/api/src/routes/api/v1/items/+server.ts +0 -37
- package/templates/apps/api/src/routes/api/v1/items/[id]/+server.ts +0 -30
- package/templates/base/src/app.css +0 -2
- package/templates/base/tsconfig.json +0 -8
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app_title": "H5アプリ",
|
|
3
|
+
"app_description": "hai Agent Frameworkで構築したH5モバイルアプリ",
|
|
4
|
+
"nav_home": "ホーム",
|
|
5
|
+
"nav_discover": "見つける",
|
|
6
|
+
"nav_profile": "プロフィール",
|
|
7
|
+
"page_home_title": "ホーム",
|
|
8
|
+
"page_home_desc": "H5アプリへようこそ",
|
|
9
|
+
"page_home_search": "検索...",
|
|
10
|
+
"page_home_feature1": "機能1",
|
|
11
|
+
"page_home_feature2": "機能2",
|
|
12
|
+
"page_home_feature3": "機能3",
|
|
13
|
+
"page_home_feature4": "機能4",
|
|
14
|
+
"page_home_latest": "最新情報",
|
|
15
|
+
"page_home_welcome": "H5アプリへようこそ",
|
|
16
|
+
"page_discover_title": "見つける",
|
|
17
|
+
"page_discover_desc": "さらに多くのコンテンツを探す。",
|
|
18
|
+
"page_profile_title": "プロフィール",
|
|
19
|
+
"page_profile_desc": "個人情報を管理します",
|
|
20
|
+
"page_profile_username": "ユーザー名",
|
|
21
|
+
"page_profile_login_hint": "タップしてログイン",
|
|
22
|
+
"page_profile_info": "個人情報",
|
|
23
|
+
"page_profile_settings": "設定",
|
|
24
|
+
"page_profile_about": "会社概要",
|
|
25
|
+
"auth_login_title": "ログイン",
|
|
26
|
+
"auth_login_submit": "ログイン",
|
|
27
|
+
"auth_login_loading": "ログイン中...",
|
|
28
|
+
"auth_login_failed": "ログインに失敗しました",
|
|
29
|
+
"auth_login_to_register": "アカウントをお持ちでない方は新規登録",
|
|
30
|
+
"auth_register_title": "登録",
|
|
31
|
+
"auth_register_submit": "登録",
|
|
32
|
+
"auth_register_loading": "登録中...",
|
|
33
|
+
"auth_register_failed": "登録に失敗しました",
|
|
34
|
+
"auth_register_to_login": "既にアカウントをお持ちの方はログイン",
|
|
35
|
+
"auth_label_username": "ユーザー名",
|
|
36
|
+
"auth_label_password": "パスワード",
|
|
37
|
+
"auth_label_confirm_password": "パスワードの確認",
|
|
38
|
+
"auth_error_network": "ネットワークエラー",
|
|
39
|
+
"auth_error_password_mismatch": "パスワードが一致しません"
|
|
40
|
+
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"nav_home": "首页",
|
|
5
5
|
"nav_discover": "发现",
|
|
6
6
|
"nav_profile": "我的",
|
|
7
|
+
"page_home_title": "首页",
|
|
8
|
+
"page_home_desc": "欢迎使用 H5 应用",
|
|
7
9
|
"page_home_search": "搜索...",
|
|
8
10
|
"page_home_feature1": "功能一",
|
|
9
11
|
"page_home_feature2": "功能二",
|
|
@@ -14,6 +16,7 @@
|
|
|
14
16
|
"page_discover_title": "发现",
|
|
15
17
|
"page_discover_desc": "探索更多精彩内容。",
|
|
16
18
|
"page_profile_title": "我的",
|
|
19
|
+
"page_profile_desc": "管理您的个人信息",
|
|
17
20
|
"page_profile_username": "用户名",
|
|
18
21
|
"page_profile_login_hint": "点击登录",
|
|
19
22
|
"page_profile_info": "个人信息",
|
|
@@ -1,24 +1,85 @@
|
|
|
1
1
|
{{!-- H5 应用根布局 --}}
|
|
2
|
-
<script lang=
|
|
2
|
+
<script lang='ts'>
|
|
3
3
|
/**
|
|
4
4
|
* H5 应用根布局
|
|
5
5
|
*/
|
|
6
|
+
import type { BottomNavItem } from '@h-ai/ui'
|
|
6
7
|
import type { Snippet } from 'svelte'
|
|
7
|
-
import '../app.css'
|
|
8
8
|
{{#if hasI18n}}
|
|
9
9
|
import { browser } from '$app/environment'
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
{{else}}
|
|
11
|
+
{{#if features.crypto}}
|
|
12
|
+
import { browser } from '$app/environment'
|
|
13
|
+
{{/if}}
|
|
14
|
+
{{/if}}
|
|
15
|
+
import { goto } from '$app/navigation'
|
|
16
|
+
import { base, resolve } from '$app/paths'
|
|
17
|
+
import { page } from '$app/state'
|
|
18
|
+
{{#if hasI18n}}
|
|
12
19
|
import * as m from '$lib/paraglide/messages'
|
|
20
|
+
import { getLocale, setLocale } from '$lib/paraglide/runtime.js'
|
|
21
|
+
{{/if}}
|
|
22
|
+
{{#if features.crypto}}
|
|
23
|
+
import { crypto } from '@h-ai/crypto'
|
|
24
|
+
import { kit } from '@h-ai/kit'
|
|
25
|
+
{{else}}
|
|
26
|
+
{{#if features.iam}}
|
|
27
|
+
import { kit } from '@h-ai/kit'
|
|
13
28
|
{{/if}}
|
|
29
|
+
{{/if}}
|
|
30
|
+
{{#if hasI18n}}
|
|
31
|
+
import { AppBar, BottomNav, LanguageSwitch, setGlobalLocale } from '@h-ai/ui'
|
|
32
|
+
{{else}}
|
|
33
|
+
import { AppBar, BottomNav } from '@h-ai/ui'
|
|
34
|
+
{{/if}}
|
|
35
|
+
{{#if features.crypto}}
|
|
36
|
+
import { untrack } from 'svelte'
|
|
37
|
+
{{/if}}
|
|
38
|
+
import '../app.css'
|
|
14
39
|
|
|
15
40
|
interface Props {
|
|
16
41
|
children: Snippet
|
|
17
42
|
}
|
|
18
43
|
|
|
19
|
-
|
|
44
|
+
const { children }: Props = $props()
|
|
45
|
+
{{#if features.crypto}}
|
|
46
|
+
if (browser)
|
|
47
|
+
kit.client.installBrowserTransport(untrack(() => page.data.kitConfig), { crypto, basePath: base })
|
|
48
|
+
{{/if}}
|
|
49
|
+
{{#if features.iam}}
|
|
50
|
+
const authActions = kit.client.createAuthActions({ basePath: `${base}/api/auth` })
|
|
51
|
+
$effect(() => authActions.bindPageExit({ enabled: page.data.iamPublicConfig?.session.endOnPageHide }))
|
|
52
|
+
{{/if}}
|
|
53
|
+
|
|
54
|
+
const navItems: (BottomNavItem & { path: '/' | '/discover' | '/profile' })[] = [
|
|
55
|
+
{{#if hasI18n}}
|
|
56
|
+
{ id: 'home', path: '/', label: m.nav_home(), iconClass: 'icon-[tabler--home]' },
|
|
57
|
+
{ id: 'discover', path: '/discover', label: m.nav_discover(), iconClass: 'icon-[tabler--compass]' },
|
|
58
|
+
{ id: 'profile', path: '/profile', label: m.nav_profile(), iconClass: 'icon-[tabler--user]' },
|
|
59
|
+
{{else}}
|
|
60
|
+
{ id: 'home', path: '/', label: '首页', iconClass: 'icon-[tabler--home]' },
|
|
61
|
+
{ id: 'discover', path: '/discover', label: '发现', iconClass: 'icon-[tabler--compass]' },
|
|
62
|
+
{ id: 'profile', path: '/profile', label: '我的', iconClass: 'icon-[tabler--user]' },
|
|
63
|
+
{{/if}}
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
const localPath = $derived(page.url.pathname.slice(base.length) || '/')
|
|
67
|
+
const activeNav = $derived(navItems.find(item => item.path === localPath)?.id)
|
|
68
|
+
// 所有页面共用页头页脚;仅业务页面显示底部导航。
|
|
69
|
+
const isAuthPage = $derived(localPath.startsWith('/auth'))
|
|
70
|
+
|
|
71
|
+
function handleNavigation(id: string) {
|
|
72
|
+
const item = navItems.find(item => item.id === id)
|
|
73
|
+
if (item)
|
|
74
|
+
void goto(resolve(item.path, {}))
|
|
75
|
+
}
|
|
20
76
|
{{#if hasI18n}}
|
|
21
77
|
|
|
78
|
+
function handleLanguageChange(language: string) {
|
|
79
|
+
setGlobalLocale(language)
|
|
80
|
+
setLocale(language as Parameters<typeof setLocale>[0])
|
|
81
|
+
}
|
|
82
|
+
|
|
22
83
|
if (browser) {
|
|
23
84
|
const paraglideLocale = getLocale()
|
|
24
85
|
setGlobalLocale(paraglideLocale)
|
|
@@ -26,32 +87,26 @@
|
|
|
26
87
|
{{/if}}
|
|
27
88
|
</script>
|
|
28
89
|
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
</main>
|
|
90
|
+
<svelte:head>
|
|
91
|
+
<title>{page.data.appConfig.name}</title>
|
|
92
|
+
</svelte:head>
|
|
33
93
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{{
|
|
37
|
-
<span class="btm-nav-label">{m.nav_home()}</span>
|
|
38
|
-
{{else}}
|
|
39
|
-
<span class="btm-nav-label">首页</span>
|
|
40
|
-
{{/if}}
|
|
41
|
-
</a>
|
|
42
|
-
<a href="/discover">
|
|
94
|
+
<div class='hai-mobile-viewport'>
|
|
95
|
+
<div class='hai-mobile-shell min-w-0'>
|
|
96
|
+
<AppBar title={page.data.appConfig.name} safeArea fixed={false}>
|
|
43
97
|
{{#if hasI18n}}
|
|
44
|
-
|
|
45
|
-
{{
|
|
46
|
-
|
|
47
|
-
{{/if}}
|
|
48
|
-
</a>
|
|
49
|
-
<a href="/profile">
|
|
50
|
-
{{#if hasI18n}}
|
|
51
|
-
<span class="btm-nav-label">{m.nav_profile()}</span>
|
|
52
|
-
{{else}}
|
|
53
|
-
<span class="btm-nav-label">我的</span>
|
|
98
|
+
{#snippet trailing()}
|
|
99
|
+
<LanguageSwitch currentLanguage={getLocale()} onchange={handleLanguageChange} compact />
|
|
100
|
+
{/snippet}
|
|
54
101
|
{{/if}}
|
|
55
|
-
</
|
|
56
|
-
|
|
102
|
+
</AppBar>
|
|
103
|
+
<main class='hai-mobile-main'>{@render children()}</main>
|
|
104
|
+
<footer class='border-t border-base-300 bg-base-100 p-2 text-center text-xs text-base-content/60'>
|
|
105
|
+
{page.data.appConfig.name} · {page.data.appConfig.version} · {page.data.appConfig.env}
|
|
106
|
+
</footer>
|
|
107
|
+
{#if !isAuthPage}
|
|
108
|
+
<BottomNav items={navItems} active={activeNav} onchange={handleNavigation} centered maxWidth='none' safeArea />
|
|
109
|
+
{/if}
|
|
110
|
+
</div>
|
|
57
111
|
</div>
|
|
112
|
+
<ToastContainer />
|
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
{{!-- H5 首页 --}}
|
|
2
|
-
<script lang=
|
|
2
|
+
<script lang='ts'>
|
|
3
|
+
import { page } from '$app/state'
|
|
3
4
|
/**
|
|
4
5
|
* H5 首页
|
|
5
6
|
*/
|
|
6
7
|
{{#if hasI18n}}
|
|
7
8
|
import * as m from '$lib/paraglide/messages'
|
|
8
9
|
{{/if}}
|
|
10
|
+
import { Card } from '@h-ai/ui'
|
|
9
11
|
</script>
|
|
10
12
|
|
|
11
13
|
<svelte:head>
|
|
12
14
|
{{#if hasI18n}}
|
|
13
|
-
<title>{
|
|
15
|
+
<title>{page.data.appConfig.name}</title>
|
|
14
16
|
{{else}}
|
|
15
|
-
<title>
|
|
17
|
+
<title>{page.data.appConfig.name}</title>
|
|
16
18
|
{{/if}}
|
|
17
19
|
</svelte:head>
|
|
18
20
|
|
|
19
|
-
<section class=
|
|
21
|
+
<section class='p-4 space-y-4'>
|
|
20
22
|
{{#if hasI18n}}
|
|
21
|
-
<h1 class=
|
|
22
|
-
<
|
|
23
|
+
<h1 class='text-2xl font-black tracking-tight'>{m.page_home_title()}</h1>
|
|
24
|
+
<Card shadow='sm' class='bg-base-100'>
|
|
25
|
+
<div class='flex items-center gap-3'>
|
|
26
|
+
<span class='icon-[tabler--home] size-8 text-primary'></span>
|
|
27
|
+
<p class='text-base-content/70'>{m.page_home_desc()}</p>
|
|
28
|
+
</div>
|
|
29
|
+
</Card>
|
|
23
30
|
{{else}}
|
|
24
|
-
<h1 class=
|
|
25
|
-
<
|
|
31
|
+
<h1 class='text-2xl font-black tracking-tight'>首页</h1>
|
|
32
|
+
<Card shadow='sm' class='bg-base-100'>
|
|
33
|
+
<div class='flex items-center gap-3'>
|
|
34
|
+
<span class='icon-[tabler--home] size-8 text-primary'></span>
|
|
35
|
+
<p class='text-base-content/70'>欢迎使用 H5 应用</p>
|
|
36
|
+
</div>
|
|
37
|
+
</Card>
|
|
26
38
|
{{/if}}
|
|
27
39
|
</section>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{{!-- 发现页面 --}}
|
|
2
|
-
<script lang=
|
|
2
|
+
<script lang='ts'>
|
|
3
3
|
/**
|
|
4
4
|
* 发现页面
|
|
5
5
|
*/
|
|
6
6
|
{{#if hasI18n}}
|
|
7
7
|
import * as m from '$lib/paraglide/messages'
|
|
8
8
|
{{/if}}
|
|
9
|
+
import { Card } from '@h-ai/ui'
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<svelte:head>
|
|
@@ -16,12 +17,22 @@
|
|
|
16
17
|
{{/if}}
|
|
17
18
|
</svelte:head>
|
|
18
19
|
|
|
19
|
-
<section class=
|
|
20
|
+
<section class='p-4 space-y-4'>
|
|
20
21
|
{{#if hasI18n}}
|
|
21
|
-
<h1 class=
|
|
22
|
-
<
|
|
22
|
+
<h1 class='text-2xl font-black tracking-tight'>{m.page_discover_title()}</h1>
|
|
23
|
+
<Card shadow='sm' class='bg-base-100'>
|
|
24
|
+
<div class='flex items-center gap-3'>
|
|
25
|
+
<span class='icon-[tabler--compass] size-8 text-primary'></span>
|
|
26
|
+
<p class='text-base-content/70'>{m.page_discover_desc()}</p>
|
|
27
|
+
</div>
|
|
28
|
+
</Card>
|
|
23
29
|
{{else}}
|
|
24
|
-
<h1 class=
|
|
25
|
-
<
|
|
30
|
+
<h1 class='text-2xl font-black tracking-tight'>发现</h1>
|
|
31
|
+
<Card shadow='sm' class='bg-base-100'>
|
|
32
|
+
<div class='flex items-center gap-3'>
|
|
33
|
+
<span class='icon-[tabler--compass] size-8 text-primary'></span>
|
|
34
|
+
<p class='text-base-content/70'>探索更多精彩内容</p>
|
|
35
|
+
</div>
|
|
36
|
+
</Card>
|
|
26
37
|
{{/if}}
|
|
27
38
|
</section>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{{!-- 个人中心页面 --}}
|
|
2
|
-
<script lang=
|
|
2
|
+
<script lang='ts'>
|
|
3
3
|
/**
|
|
4
4
|
* 个人中心页面
|
|
5
5
|
*/
|
|
6
6
|
{{#if hasI18n}}
|
|
7
7
|
import * as m from '$lib/paraglide/messages'
|
|
8
8
|
{{/if}}
|
|
9
|
+
import { Card } from '@h-ai/ui'
|
|
9
10
|
</script>
|
|
10
11
|
|
|
11
12
|
<svelte:head>
|
|
@@ -16,12 +17,22 @@
|
|
|
16
17
|
{{/if}}
|
|
17
18
|
</svelte:head>
|
|
18
19
|
|
|
19
|
-
<section class=
|
|
20
|
+
<section class='p-4 space-y-4'>
|
|
20
21
|
{{#if hasI18n}}
|
|
21
|
-
<h1 class=
|
|
22
|
-
<
|
|
22
|
+
<h1 class='text-2xl font-black tracking-tight'>{m.page_profile_title()}</h1>
|
|
23
|
+
<Card shadow='sm' class='bg-base-100'>
|
|
24
|
+
<div class='flex items-center gap-3'>
|
|
25
|
+
<span class='icon-[tabler--user] size-8 text-primary'></span>
|
|
26
|
+
<p class='text-base-content/70'>{m.page_profile_desc()}</p>
|
|
27
|
+
</div>
|
|
28
|
+
</Card>
|
|
23
29
|
{{else}}
|
|
24
|
-
<h1 class=
|
|
25
|
-
<
|
|
30
|
+
<h1 class='text-2xl font-black tracking-tight'>我的</h1>
|
|
31
|
+
<Card shadow='sm' class='bg-base-100'>
|
|
32
|
+
<div class='flex items-center gap-3'>
|
|
33
|
+
<span class='icon-[tabler--user] size-8 text-primary'></span>
|
|
34
|
+
<p class='text-base-content/70'>管理您的个人信息</p>
|
|
35
|
+
</div>
|
|
36
|
+
</Card>
|
|
26
37
|
{{/if}}
|
|
27
38
|
</section>
|
|
@@ -3,10 +3,10 @@ import type { CapacitorConfig } from '@capacitor/cli'
|
|
|
3
3
|
const config: CapacitorConfig = {
|
|
4
4
|
appId: 'com.hai.{{projectName}}',
|
|
5
5
|
appName: '{{projectName}}',
|
|
6
|
-
webDir: '
|
|
6
|
+
webDir: 'dist',
|
|
7
7
|
server: {
|
|
8
8
|
androidScheme: 'https',
|
|
9
9
|
},
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export default config
|
|
12
|
+
export default config
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="{{defaultLocale}}">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
6
|
+
<meta name="theme-color" content="#2563eb" />
|
|
7
|
+
<title></title>
|
|
8
|
+
<script src="./runtime-config.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="module" src="./src/main.ts"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://inlang.com/schema/inlang-message-format",
|
|
3
|
+
"app_title": "Mobile Workspace",
|
|
4
|
+
"app_description": "A mobile app built with hai Agent Framework + Capacitor + Svelte 5",
|
|
5
|
+
"boot_failed_title": "Boot failed",
|
|
6
|
+
"common_retry": "Retry",
|
|
7
|
+
"common_refresh": "Refresh",
|
|
8
|
+
"common_enabled": "Enabled",
|
|
9
|
+
"common_disabled": "Disabled",
|
|
10
|
+
"nav_home": "Workspace",
|
|
11
|
+
"nav_tasks": "Tasks",
|
|
12
|
+
"nav_profile": "Profile",
|
|
13
|
+
"hero_eyebrow": "Mobile Workspace",
|
|
14
|
+
"hero_title": "A real mobile-first starting point",
|
|
15
|
+
"hero_subtitle": "Capacitor native capabilities, secure token storage, unified API client and @h-ai/ui mobile components are wired in.",
|
|
16
|
+
"feature_native_title": "Native ready",
|
|
17
|
+
"feature_native_desc": "Status bar, safe areas and device runtime are ready for push, camera and more plugins.",
|
|
18
|
+
"feature_api_title": "Unified API",
|
|
19
|
+
"feature_api_desc": "Connect to your backend through PUBLIC_API_BASE. Tokens use secure storage on native devices.",
|
|
20
|
+
"status_title": "Runtime status",
|
|
21
|
+
"status_api_label": "API base",
|
|
22
|
+
"status_runtime_label": "Runtime",
|
|
23
|
+
"status_runtime_native": "Native app",
|
|
24
|
+
"status_runtime_web": "Browser preview",
|
|
25
|
+
"status_token_label": "Token storage",
|
|
26
|
+
"status_token_native": "Secure storage",
|
|
27
|
+
"status_token_memory": "Memory storage",
|
|
28
|
+
"tasks_title": "Today's tasks",
|
|
29
|
+
"tasks_sync": "Wire backend APIs",
|
|
30
|
+
"tasks_polish": "Polish mobile UX",
|
|
31
|
+
"tasks_release": "Prepare native packaging",
|
|
32
|
+
"profile_title": "App settings",
|
|
33
|
+
"profile_language": "Locale follows Paraglide",
|
|
34
|
+
"profile_theme": "Theme follows @h-ai/ui",
|
|
35
|
+
"profile_secure": "Sensitive tokens avoid localStorage"
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://inlang.com/schema/inlang-message-format",
|
|
3
|
+
"app_title": "モバイルワークスペース",
|
|
4
|
+
"app_description": "hai Agent Framework + Capacitor + Svelte 5で構築したモバイルアプリ",
|
|
5
|
+
"boot_failed_title": "起動に失敗しました",
|
|
6
|
+
"common_retry": "再試行",
|
|
7
|
+
"common_refresh": "更新",
|
|
8
|
+
"common_enabled": "有効",
|
|
9
|
+
"common_disabled": "無効",
|
|
10
|
+
"nav_home": "ワークスペース",
|
|
11
|
+
"nav_tasks": "タスク",
|
|
12
|
+
"nav_profile": "プロフィール",
|
|
13
|
+
"hero_eyebrow": "モバイルワークスペース",
|
|
14
|
+
"hero_title": "モバイルを中心にした実用的な出発点",
|
|
15
|
+
"hero_subtitle": "Capacitorのネイティブ機能、安全なトークン保存、共通APIクライアント、@h-ai/uiのモバイルコンポーネントを組み込んでいます。",
|
|
16
|
+
"feature_native_title": "ネイティブ対応",
|
|
17
|
+
"feature_native_desc": "ステータスバー、セーフエリア、デバイスランタイムを設定済み。プッシュ通知やカメラなどのプラグインを追加できます。",
|
|
18
|
+
"feature_api_title": "共通API",
|
|
19
|
+
"feature_api_desc": "PUBLIC_API_BASEでバックエンドに接続します。ネイティブ端末ではトークンを安全なストレージに保存します。",
|
|
20
|
+
"status_title": "実行状態",
|
|
21
|
+
"status_api_label": "APIベースURL",
|
|
22
|
+
"status_runtime_label": "実行環境",
|
|
23
|
+
"status_runtime_native": "ネイティブアプリ",
|
|
24
|
+
"status_runtime_web": "ブラウザープレビュー",
|
|
25
|
+
"status_token_label": "トークン保存",
|
|
26
|
+
"status_token_native": "安全なストレージ",
|
|
27
|
+
"status_token_memory": "メモリー内保存",
|
|
28
|
+
"tasks_title": "本日のタスク",
|
|
29
|
+
"tasks_sync": "バックエンドAPIを接続",
|
|
30
|
+
"tasks_polish": "モバイルUXを改善",
|
|
31
|
+
"tasks_release": "ネイティブのパッケージ化を準備",
|
|
32
|
+
"profile_title": "アプリ設定",
|
|
33
|
+
"profile_language": "言語はParaglideに従います",
|
|
34
|
+
"profile_theme": "テーマは@h-ai/uiに従います",
|
|
35
|
+
"profile_secure": "機密トークンはlocalStorageに保存しません"
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://inlang.com/schema/inlang-message-format",
|
|
3
|
+
"app_title": "移动工作台",
|
|
4
|
+
"app_description": "基于 hai Agent Framework + Capacitor + Svelte 5 构建的移动应用",
|
|
5
|
+
"boot_failed_title": "启动失败",
|
|
6
|
+
"common_retry": "重试",
|
|
7
|
+
"common_refresh": "刷新",
|
|
8
|
+
"common_enabled": "已启用",
|
|
9
|
+
"common_disabled": "未启用",
|
|
10
|
+
"nav_home": "工作台",
|
|
11
|
+
"nav_tasks": "任务",
|
|
12
|
+
"nav_profile": "我的",
|
|
13
|
+
"hero_eyebrow": "Mobile Workspace",
|
|
14
|
+
"hero_title": "真正可用的移动端起点",
|
|
15
|
+
"hero_subtitle": "Capacitor 原生能力、安全 Token 存储、统一 API Client 与 @h-ai/ui 移动组件已经接好。",
|
|
16
|
+
"feature_native_title": "原生能力",
|
|
17
|
+
"feature_native_desc": "状态栏、安全区与设备信息就绪,可继续接入推送、相机等插件。",
|
|
18
|
+
"feature_api_title": "统一 API",
|
|
19
|
+
"feature_api_desc": "通过 PUBLIC_API_BASE 连接服务端,Token 在原生端走安全存储。",
|
|
20
|
+
"status_title": "运行状态",
|
|
21
|
+
"status_api_label": "API 地址",
|
|
22
|
+
"status_runtime_label": "运行环境",
|
|
23
|
+
"status_runtime_native": "原生 App",
|
|
24
|
+
"status_runtime_web": "浏览器预览",
|
|
25
|
+
"status_token_label": "Token 存储",
|
|
26
|
+
"status_token_native": "安全存储",
|
|
27
|
+
"status_token_memory": "内存存储",
|
|
28
|
+
"tasks_title": "今日任务",
|
|
29
|
+
"tasks_sync": "同步后端接口",
|
|
30
|
+
"tasks_polish": "打磨移动端体验",
|
|
31
|
+
"tasks_release": "准备原生打包",
|
|
32
|
+
"profile_title": "应用设置",
|
|
33
|
+
"profile_language": "语言跟随 Paraglide",
|
|
34
|
+
"profile_theme": "主题跟随 @h-ai/ui",
|
|
35
|
+
"profile_secure": "敏感 Token 不落 localStorage"
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
globalThis.__HAI_PUBLIC_CONFIG__ ??= {}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<script lang='ts'>
|
|
2
|
+
{{#if features.iam}}
|
|
3
|
+
import type { IamPublicConfig } from '@h-ai/api-contract'
|
|
4
|
+
{{/if}}
|
|
5
|
+
import type { Component } from 'svelte'
|
|
6
|
+
{{#if features.iam}}
|
|
7
|
+
import { apiClient } from '@h-ai/api-client'
|
|
8
|
+
{{/if}}
|
|
9
|
+
import { applyTheme, getSavedTheme, LanguageSwitch, setGlobalLocale } from '@h-ai/ui'
|
|
10
|
+
{{#if features.iam}}
|
|
11
|
+
import { AuthPanel } from '@h-ai/ui/components/scenes/iam/index'
|
|
12
|
+
import { authErrorMessage } from '@h-ai/ui/i18n'
|
|
13
|
+
{{/if}}
|
|
14
|
+
import { errorMessage, useToastFeedback } from '@h-ai/ui/toast'
|
|
15
|
+
import { onMount } from 'svelte'
|
|
16
|
+
|
|
17
|
+
import { closeApi, initApi, usesNativeTokenStorage } from './lib/api.js'
|
|
18
|
+
import { appConfig, initClientCore } from './lib/app-config.js'
|
|
19
|
+
import { initCapacitor, isNativeApp } from './lib/capacitor.js'
|
|
20
|
+
import { HashRouter } from './lib/navigation/hash-router.svelte.js'
|
|
21
|
+
import * as m from './lib/paraglide/messages.js'
|
|
22
|
+
import { getLocale, setLocale } from './lib/paraglide/runtime.js'
|
|
23
|
+
|
|
24
|
+
{{#if features.iam}}
|
|
25
|
+
const authActions = apiClient.createAuthActions(apiClient)
|
|
26
|
+
let authConfig = $state<IamPublicConfig | null>(null)
|
|
27
|
+
let authenticated = $state(false)
|
|
28
|
+
let resetToken = $state('')
|
|
29
|
+
|
|
30
|
+
function handleAuthenticated() {
|
|
31
|
+
if (resetToken) {
|
|
32
|
+
const url = new URL(location.href)
|
|
33
|
+
url.searchParams.delete('token')
|
|
34
|
+
history.replaceState(history.state, '', url)
|
|
35
|
+
}
|
|
36
|
+
resetToken = ''
|
|
37
|
+
authenticated = true
|
|
38
|
+
}
|
|
39
|
+
{{/if}}
|
|
40
|
+
|
|
41
|
+
const pages = import.meta.glob<{ default: Component<{ nativeRuntime: boolean, nativeTokenStorage: boolean }> }>('./lib/pages/**/*.svelte')
|
|
42
|
+
const router = new HashRouter(Object.keys(pages), '/home')
|
|
43
|
+
const pageComponent = $derived(pages[router.file]())
|
|
44
|
+
|
|
45
|
+
let booting = $state(true)
|
|
46
|
+
let bootError = $state<string | null>(null)
|
|
47
|
+
let nativeRuntime = $state(false)
|
|
48
|
+
let nativeTokenStorage = $state(false)
|
|
49
|
+
|
|
50
|
+
const navItems = $derived([
|
|
51
|
+
{ id: 'home', label: m.nav_home(), iconClass: 'icon-[tabler--layout-dashboard]' },
|
|
52
|
+
{ id: 'tasks', label: m.nav_tasks(), iconClass: 'icon-[tabler--checkbox]' },
|
|
53
|
+
{ id: 'profile', label: m.nav_profile(), iconClass: 'icon-[tabler--user-circle]' },
|
|
54
|
+
])
|
|
55
|
+
|
|
56
|
+
async function bootstrap(): Promise<void> {
|
|
57
|
+
bootError = null
|
|
58
|
+
try {
|
|
59
|
+
initClientCore()
|
|
60
|
+
document.title = appConfig.name
|
|
61
|
+
applyTheme(getSavedTheme(), false)
|
|
62
|
+
setGlobalLocale(getLocale())
|
|
63
|
+
document.documentElement.lang = getLocale()
|
|
64
|
+
await initCapacitor()
|
|
65
|
+
await initApi()
|
|
66
|
+
{{#if features.iam}}
|
|
67
|
+
const config = await authActions.publicConfig()
|
|
68
|
+
if (!config.success) {
|
|
69
|
+
bootError = authErrorMessage(config.error)
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
authConfig = config.data
|
|
73
|
+
if (!authConfig)
|
|
74
|
+
throw new Error(m.boot_failed_title())
|
|
75
|
+
const me = await apiClient.iam.auth.currentUser()
|
|
76
|
+
authenticated = !resetToken && me.success
|
|
77
|
+
{{/if}}
|
|
78
|
+
nativeRuntime = await isNativeApp()
|
|
79
|
+
nativeTokenStorage = await usesNativeTokenStorage()
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
bootError = errorMessage(error, m.boot_failed_title())
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
booting = false
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function handleLanguageChange(language: string): void {
|
|
90
|
+
setGlobalLocale(language)
|
|
91
|
+
setLocale(language as Parameters<typeof setLocale>[0])
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** 切换底部导航;例如 handleTabChange('tasks') 会写入 #/tasks。 */
|
|
95
|
+
function handleTabChange(id: string): void {
|
|
96
|
+
router.navigate(`/${id}`)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
onMount(() => {
|
|
100
|
+
const stopRouting = router.start()
|
|
101
|
+
{{#if features.iam}}
|
|
102
|
+
resetToken = new URL(location.href).searchParams.get('token') ?? ''
|
|
103
|
+
{{/if}}
|
|
104
|
+
void bootstrap()
|
|
105
|
+
|
|
106
|
+
return () => {
|
|
107
|
+
stopRouting()
|
|
108
|
+
void closeApi()
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
useToastFeedback(() => bootError)
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<div class='hai-mobile-viewport'>
|
|
115
|
+
<div class='hai-mobile-shell min-w-0'>
|
|
116
|
+
<AppBar title={appConfig.name} safeArea fixed={false} class='bg-base-100/95 backdrop-blur border-base-content/8'>
|
|
117
|
+
{#snippet trailing()}
|
|
118
|
+
<LanguageSwitch currentLanguage={getLocale()} onchange={handleLanguageChange} compact />
|
|
119
|
+
{/snippet}
|
|
120
|
+
</AppBar>
|
|
121
|
+
<main class='hai-mobile-main'>
|
|
122
|
+
{#if booting}
|
|
123
|
+
<div class='grid min-h-64 place-items-center'><span class='loading loading-spinner loading-lg'></span></div>
|
|
124
|
+
{:else if bootError}
|
|
125
|
+
<section class='flex min-h-64 flex-col items-center justify-center gap-3 p-6 text-center'>
|
|
126
|
+
<h1 class='text-lg font-bold'>{m.boot_failed_title()}</h1>
|
|
127
|
+
<Button variant='primary' size='sm' onclick={() => location.reload()}>{m.common_retry()}</Button>
|
|
128
|
+
</section>
|
|
129
|
+
{{#if features.iam}}
|
|
130
|
+
{:else if !authenticated}
|
|
131
|
+
<AuthPanel config={authConfig} actions={authActions} {resetToken} initialMode={resetToken ? 'reset' : 'login'} onauthenticated={handleAuthenticated} />
|
|
132
|
+
{{/if}}
|
|
133
|
+
{:else}
|
|
134
|
+
{#await pageComponent}
|
|
135
|
+
<div class='grid min-h-64 place-items-center'><span class='loading loading-spinner'></span></div>
|
|
136
|
+
{:then { default: Page }}
|
|
137
|
+
<Page {nativeRuntime} {nativeTokenStorage} />
|
|
138
|
+
{/await}
|
|
139
|
+
{/if}
|
|
140
|
+
</main>
|
|
141
|
+
<footer class='border-t border-base-content/8 bg-base-100 p-2 text-center text-xs text-base-content/50'>
|
|
142
|
+
{appConfig.name} · {appConfig.version} · {appConfig.env}
|
|
143
|
+
</footer>
|
|
144
|
+
{{#if features.iam}}
|
|
145
|
+
{#if authenticated && !booting && !bootError}
|
|
146
|
+
{{/if}}
|
|
147
|
+
<BottomNav items={navItems} active={router.path.slice(1)} onchange={handleTabChange} safeArea centered maxWidth='none' />
|
|
148
|
+
{{#if features.iam}}
|
|
149
|
+
{/if}
|
|
150
|
+
{{/if}}
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
<ToastContainer />
|