@tech4good/angular-schematics 21.5.0 → 21.7.0
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/CHANGELOG.md +44 -0
- package/README.md +266 -1
- package/package.json +34 -7
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template +4 -5
- package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +1 -1
- package/src/entity/files/__name@dasherize__/__name@dasherize__.mock.ts.template +16 -7
- package/src/entity/files/__name@dasherize__/__name@dasherize__.model.ts.template +13 -6
- package/src/entity/files/__name@dasherize__/__name@dasherize__.store.ts.template +18 -10
- package/src/entity/index.js +61 -49
- package/src/entity/index.js.map +1 -1
- package/src/entity/schema.json +4 -0
- package/src/guard/files/__name@dasherize__.guard.spec.ts.template +0 -1
- package/src/ng-add/files/.github/workflows/angular-github-ci.yml.template +3 -0
- package/src/ng-add/files/.gitignore.template +5 -0
- package/src/ng-add/files/analytics/datasets.js.template +206 -0
- package/src/ng-add/files/analytics/entity_sources.js.template +58 -0
- package/src/ng-add/files/analytics/entity_sources.test.js.template +57 -0
- package/src/ng-add/files/analytics/lib/api_query.js.template +87 -0
- package/src/ng-add/files/analytics/lib/api_query.test.js.template +84 -0
- package/src/ng-add/files/analytics/lib/bigquery_query_compatibility.test.js.template +53 -0
- package/src/ng-add/files/analytics/lib/dataset_schema.js.template +53 -0
- package/src/ng-add/files/analytics/lib/dataset_schema.test.js.template +34 -0
- package/src/ng-add/files/analytics/lib/entity_sync.js.template +397 -0
- package/src/ng-add/files/analytics/lib/entity_sync.test.js.template +212 -0
- package/src/ng-add/files/analytics/lib/identifier_salt.js.template +57 -0
- package/src/ng-add/files/analytics/lib/identifier_salt.test.js.template +36 -0
- package/src/ng-add/files/analytics/lib/snapshot_files.js.template +46 -0
- package/src/ng-add/files/analytics/lib/snapshot_files.test.js.template +67 -0
- package/src/ng-add/files/analytics/lib/sqlite.js.template +92 -0
- package/src/ng-add/files/analytics/lib/upload_entities.js.template +81 -0
- package/src/ng-add/files/analytics/lib/upload_entities.test.js.template +86 -0
- package/src/ng-add/files/analytics/proxy.conf.json.template +7 -0
- package/src/ng-add/files/analytics/scripts/refresh_snapshot.js.template +518 -0
- package/src/ng-add/files/analytics/scripts/start.js.template +88 -0
- package/src/ng-add/files/analytics/server/server.js.template +212 -0
- package/src/ng-add/files/angular.json.template +80 -1
- package/src/ng-add/files/bigquery/queries/active_time_by_route.sql.template +27 -8
- package/src/ng-add/files/bigquery/queries/active_user_windows.sql.template +67 -0
- package/src/ng-add/files/bigquery/queries/dashboard_route_visits.sql.template +47 -0
- package/src/ng-add/files/bigquery/queries/data_quality.sql.template +323 -0
- package/src/ng-add/files/bigquery/queries/onboarding_funnel.sql.template +512 -0
- package/src/ng-add/files/bigquery/queries/onboarding_stage_observations.sql.template +134 -0
- package/src/ng-add/files/bigquery/queries/weekly_retention_cohorts.sql.template +90 -0
- package/src/ng-add/files/bigquery/scripts/export_entities.js.template +120 -0
- package/src/ng-add/files/bigquery/scripts/init_views.js.template +57 -0
- package/src/ng-add/files/bigquery/scripts/run_query.js.template +141 -0
- package/src/ng-add/files/bigquery/views/events_flat.sql.template +27 -12
- package/src/ng-add/files/bigquery/views/logs_latest.sql.template +16 -3
- package/src/ng-add/files/docs-infra/analytics-guide.md.template +270 -25
- package/src/ng-add/files/docs-infra/analytics-workbench-guide.md.template +307 -0
- package/src/ng-add/files/docs-infra/authentication-architecture.md.template +300 -0
- package/src/ng-add/files/docs-infra/email-infrastructure.md.template +43 -0
- package/src/ng-add/files/docs-infra/firestore-index-checker.md.template +87 -0
- package/src/ng-add/files/docs-infra/infrastructure-guide.md.template +123 -38
- package/src/ng-add/files/docs-infra/load-system-architecture.md.template +15 -1
- package/src/ng-add/files/docs-infra/querying-strategy.md.template +14 -0
- package/src/ng-add/files/docs-infra/stream-system-architecture.md.template +21 -7
- package/src/ng-add/files/eslint.config.js.template +22 -3
- package/src/ng-add/files/firebase.json.template +6 -0
- package/src/ng-add/files/firestore.indexes.json.template +23 -0
- package/src/ng-add/files/firestore.rules.spec.ts.template +84 -15
- package/src/ng-add/files/firestore.rules.template +29 -17
- package/src/ng-add/files/functions/.gitignore.template +3 -0
- package/src/ng-add/files/functions/package.json.template +13 -0
- package/src/ng-add/files/functions/src/email.ts.template +23 -0
- package/src/ng-add/files/functions/src/index.ts.template +44 -0
- package/src/ng-add/files/functions/tsconfig.json.template +13 -0
- package/src/ng-add/files/jest.config.ts.template +3 -2
- package/src/ng-add/files/package.json.template +41 -16
- package/src/ng-add/files/projects/analytics/src/app/analytics-api.service.ts.template +130 -0
- package/src/ng-add/files/projects/analytics/src/app/app.component.html.template +77 -0
- package/src/ng-add/files/projects/analytics/src/app/app.component.scss.template +240 -0
- package/src/ng-add/files/projects/analytics/src/app/app.component.ts.template +96 -0
- package/src/ng-add/files/projects/analytics/src/app/app.routes.ts.template +11 -0
- package/src/ng-add/files/projects/analytics/src/app/dashboard-pages.spec.ts.template +151 -0
- package/src/ng-add/files/projects/analytics/src/app/data-quality/data-quality-page/data-quality-page.component.html.template +39 -0
- package/src/ng-add/files/projects/analytics/src/app/data-quality/data-quality-page/data-quality-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/data-quality/data-quality-page/data-quality-page.component.ts.template +95 -0
- package/src/ng-add/files/projects/analytics/src/app/engagement/engagement-page/engagement-page.component.html.template +47 -0
- package/src/ng-add/files/projects/analytics/src/app/engagement/engagement-page/engagement-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/engagement/engagement-page/engagement-page.component.ts.template +120 -0
- package/src/ng-add/files/projects/analytics/src/app/onboarding/onboarding-page/onboarding-page.component.html.template +40 -0
- package/src/ng-add/files/projects/analytics/src/app/onboarding/onboarding-page/onboarding-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/onboarding/onboarding-page/onboarding-page.component.ts.template +98 -0
- package/src/ng-add/files/projects/analytics/src/app/overview/overview-page/overview-page.component.html.template +35 -0
- package/src/ng-add/files/projects/analytics/src/app/overview/overview-page/overview-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/overview/overview-page/overview-page.component.ts.template +84 -0
- package/src/ng-add/files/projects/analytics/src/app/routes/routes-page/routes-page.component.html.template +42 -0
- package/src/ng-add/files/projects/analytics/src/app/routes/routes-page/routes-page.component.scss.template +1 -0
- package/src/ng-add/files/projects/analytics/src/app/routes/routes-page/routes-page.component.ts.template +110 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/analytics-utils.ts.template +43 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/chart-theme.ts.template +42 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-layout.scss.template +239 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.html.template +76 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.scss.template +128 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.spec.ts.template +31 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/dashboard-table/dashboard-table.component.ts.template +153 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/funnel-chart/funnel-chart.component.html.template +16 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/funnel-chart/funnel-chart.component.scss.template +63 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/funnel-chart/funnel-chart.component.ts.template +52 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.html.template +5 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.scss.template +56 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.spec.ts.template +30 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/metric-card/metric-card.component.ts.template +15 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/quality-chart/quality-chart.component.html.template +9 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/quality-chart/quality-chart.component.scss.template +43 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/quality-chart/quality-chart.component.ts.template +62 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-distribution-chart/route-distribution-chart.component.html.template +9 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-distribution-chart/route-distribution-chart.component.scss.template +33 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-distribution-chart/route-distribution-chart.component.ts.template +82 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-traffic-chart/route-traffic-chart.component.html.template +15 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-traffic-chart/route-traffic-chart.component.scss.template +45 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/route-traffic-chart/route-traffic-chart.component.ts.template +55 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/status-message/status-message.component.html.template +18 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/status-message/status-message.component.scss.template +45 -0
- package/src/ng-add/files/projects/analytics/src/app/shared/status-message/status-message.component.ts.template +15 -0
- package/src/ng-add/files/projects/analytics/src/app/vega-chart/vega-chart.component.ts.template +121 -0
- package/src/ng-add/files/projects/analytics/src/index.html.template +19 -0
- package/src/ng-add/files/projects/analytics/src/main.ts.template +16 -0
- package/src/ng-add/files/projects/analytics/src/styles.scss.template +28 -0
- package/src/ng-add/files/projects/analytics/tsconfig.app.json.template +13 -0
- package/src/ng-add/files/projects/analytics/tsconfig.spec.json.template +15 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.html.template +3 -1
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.spec.ts.template +10 -13
- package/src/ng-add/files/src/app/admin/admin-panel/admin-panel.component.ts.template +2 -0
- package/src/ng-add/files/src/app/admin/admin-panel/admin-settings/admin-settings.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.spec.ts.template +11 -12
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-list.component.ts.template +7 -7
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.spec.ts.template +8 -10
- package/src/ng-add/files/src/app/admin/admin-panel/admin-user-list/admin-user-table/admin-user-table.component.ts.template +3 -2
- package/src/ng-add/files/src/app/app.component.html.template +3 -3
- package/src/ng-add/files/src/app/app.component.scss.template +1 -1
- package/src/ng-add/files/src/app/app.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/app.component.ts.template +3 -2
- package/src/ng-add/files/src/app/app.config.ts.template +21 -15
- package/src/ng-add/files/src/app/app.routes.ts.template +6 -0
- package/src/ng-add/files/src/app/auth-routing.spec.ts.template +13 -9
- package/src/ng-add/files/src/app/core/analytics/time-analytics.service.spec.ts.template +46 -29
- package/src/ng-add/files/src/app/core/analytics/time-analytics.service.ts.template +27 -18
- package/src/ng-add/files/src/app/core/auth/auth.providers.spec.ts.template +112 -0
- package/src/ng-add/files/src/app/core/auth/auth.providers.ts.template +48 -0
- package/src/ng-add/files/src/app/core/auth/auth.service.ts.template +14 -23
- package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.spec.ts.template +27 -0
- package/src/ng-add/files/src/app/core/auth/guards/require-admin.guard.ts.template +3 -2
- package/src/ng-add/files/src/app/core/auth/guards/require-auth-and-consent.guard.ts.template +7 -2
- package/src/ng-add/files/src/app/core/firebase/data.providers.prod.ts.template +21 -0
- package/src/ng-add/files/src/app/core/firebase/data.providers.ts.template +13 -0
- package/src/ng-add/files/src/app/core/local-storage/session.service.spec.ts.template +43 -0
- package/src/ng-add/files/src/app/core/local-storage/session.service.ts.template +7 -0
- package/src/ng-add/files/src/app/core/store/app-data.spec.ts.template +76 -0
- package/src/ng-add/files/src/app/core/store/auth/auth.mock.ts.template +20 -82
- package/src/ng-add/files/src/app/core/store/auth/auth.store.spec.ts.template +217 -0
- package/src/ng-add/files/src/app/core/store/auth/auth.store.ts.template +36 -172
- package/src/ng-add/files/src/app/core/store/user/user.mock.ts.template +18 -15
- package/src/ng-add/files/src/app/core/store/user/user.model.ts.template +7 -8
- package/src/ng-add/files/src/app/core/store/user/user.store.ts.template +14 -10
- package/src/ng-add/files/src/app/core/store/user-context/user-context.mock.ts.template +20 -8
- package/src/ng-add/files/src/app/core/store/user-context/user-context.model.ts.template +5 -6
- package/src/ng-add/files/src/app/core/store/user-context/user-context.store.ts.template +14 -10
- package/src/ng-add/files/src/app/core/store/user-private/user-private.mock.ts.template +20 -7
- package/src/ng-add/files/src/app/core/store/user-private/user-private.model.ts.template +6 -6
- package/src/ng-add/files/src/app/core/store/user-private/user-private.store.ts.template +14 -10
- package/src/ng-add/files/src/app/core/testing/app-mocks.ts.template +42 -0
- package/src/ng-add/files/src/app/first-time/auth-action/auth-action.component.html.template +4 -0
- package/src/ng-add/files/src/app/first-time/auth-action/auth-action.component.scss.template +1 -0
- package/src/ng-add/files/src/app/first-time/auth-action/auth-action.component.ts.template +38 -0
- package/src/ng-add/files/src/app/first-time/consent/consent.component.html.template +2 -1
- package/src/ng-add/files/src/app/first-time/consent/consent.component.scss.template +7 -3
- package/src/ng-add/files/src/app/first-time/consent/consent.component.spec.ts.template +31 -11
- package/src/ng-add/files/src/app/first-time/consent/consent.component.ts.template +16 -1
- package/src/ng-add/files/src/app/first-time/consent/consent.guard.ts.template +5 -1
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.spec.ts.template +27 -16
- package/src/ng-add/files/src/app/first-time/early-access/early-access.component.ts.template +102 -49
- package/src/ng-add/files/src/app/first-time/early-access/early-access.guard.ts.template +5 -1
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.html.template +2 -1
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.scss.template +7 -3
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.spec.ts.template +20 -6
- package/src/ng-add/files/src/app/first-time/early-access/survey-form/survey-form.component.ts.template +2 -0
- package/src/ng-add/files/src/app/first-time/early-access/waitlist-view/waitlist-view.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.html.template +18 -0
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.scss.template +2 -0
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.spec.ts.template +56 -0
- package/src/ng-add/files/src/app/first-time/email-link/email-link.component.ts.template +91 -0
- package/src/ng-add/files/src/app/first-time/first-time-routing.spec.ts.template +11 -7
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.html.template +19 -7
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.scss.template +51 -0
- package/src/ng-add/files/src/app/first-time/landing/hero/hero.component.ts.template +44 -5
- package/src/ng-add/files/src/app/first-time/landing/landing.component.html.template +2 -1
- package/src/ng-add/files/src/app/first-time/landing/landing.component.scss.template +12 -8
- package/src/ng-add/files/src/app/first-time/landing/landing.component.spec.ts.template +33 -10
- package/src/ng-add/files/src/app/first-time/landing/landing.component.ts.template +6 -19
- package/src/ng-add/files/src/app/first-time/login/login.component.html.template +58 -6
- package/src/ng-add/files/src/app/first-time/login/login.component.scss.template +151 -22
- package/src/ng-add/files/src/app/first-time/login/login.component.spec.ts.template +30 -32
- package/src/ng-add/files/src/app/first-time/login/login.component.ts.template +85 -31
- package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.spec.ts.template +4 -2
- package/src/ng-add/files/src/app/first-time/onboarding/onboarding.component.ts.template +1 -1
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.html.template +12 -0
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.scss.template +39 -0
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.spec.ts.template +68 -0
- package/src/ng-add/files/src/app/main/account-profile/account-profile.component.ts.template +20 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.html.template +24 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.scss.template +50 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.spec.ts.template +65 -0
- package/src/ng-add/files/src/app/main/account-profile/delete-guest-card/delete-guest-card.component.ts.template +59 -0
- package/src/ng-add/files/src/app/main/account-profile/guest-deletion-dialog.component.ts.template +51 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.html.template +50 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.scss.template +137 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.spec.ts.template +57 -0
- package/src/ng-add/files/src/app/main/account-profile/profile-details-card/profile-details-card.component.ts.template +59 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.html.template +133 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.scss.template +207 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.spec.ts.template +74 -0
- package/src/ng-add/files/src/app/main/account-profile/sign-in-methods-card/sign-in-methods-card.component.ts.template +130 -0
- package/src/ng-add/files/src/app/main/home/home.component.spec.ts.template +4 -5
- package/src/ng-add/files/src/app/main/home/home.component.ts.template +1 -6
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.html.template +15 -0
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.scss.template +79 -0
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.spec.ts.template +59 -0
- package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.ts.template +44 -0
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.html.template +45 -15
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.scss.template +103 -19
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.spec.ts.template +73 -9
- package/src/ng-add/files/src/app/shared/navbar/navbar.component.ts.template +46 -18
- package/src/ng-add/files/src/environments/environment.prod.ts.template +1 -0
- package/src/ng-add/files/src/environments/environment.test.ts.template +1 -0
- package/src/ng-add/files/src/environments/environment.ts.template +1 -1
- package/src/ng-add/files/tsconfig.spec.json.template +3 -1
- package/src/ng-add/index.js +7 -0
- package/src/ng-add/index.js.map +1 -1
- package/src/shared/entity-registry.d.ts +8 -0
- package/src/shared/entity-registry.js +28 -0
- package/src/shared/entity-registry.js.map +1 -0
- package/tsconfig.json +2 -2
- package/.agents/skills/publish-npm/SKILL.md +0 -37
- package/.agents/skills/publish-npm/eval.yaml +0 -32
- package/.agents/skills/publish-npm/fixtures/package-v21.json.template +0 -8
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/.t4g/agent-memory.db +0 -0
- package/src/component/index_spec.d.ts +0 -1
- package/src/component/index_spec.js +0 -68
- package/src/component/index_spec.js.map +0 -1
- package/src/entity/index_spec.d.ts +0 -1
- package/src/entity/index_spec.js +0 -153
- package/src/entity/index_spec.js.map +0 -1
- package/src/guard/index_spec.d.ts +0 -1
- package/src/guard/index_spec.js +0 -64
- package/src/guard/index_spec.js.map +0 -1
- package/src/ng-add/files/bigquery/scripts/export_entities.py.template +0 -143
- package/src/ng-add/files/bigquery/scripts/run_query.py.template +0 -167
- package/src/ng-add/files/src/app/core/firebase/cached-listeners.service.ts.template +0 -494
- package/src/ng-add/files/src/app/core/firebase/database.service.ts.template +0 -56
- package/src/ng-add/files/src/app/core/firebase/firebase.mock.service.ts.template +0 -366
- package/src/ng-add/files/src/app/core/firebase/firebase.service.ts.template +0 -342
- package/src/ng-add/files/src/app/core/firebase/simulate-load.spec.ts.template +0 -104
- package/src/ng-add/files/src/app/core/firebase/simulate-stream.spec.ts.template +0 -127
- package/src/ng-add/files/src/app/core/firebase/simulation.mock.ts.template +0 -38
- package/src/ng-add/files/src/app/core/firebase/stream-multiplexer.ts.template +0 -445
- package/src/ng-add/files/src/app/core/logging/logging.service.spec.ts.template +0 -118
- package/src/ng-add/files/src/app/core/logging/logging.service.ts.template +0 -168
- package/src/ng-add/files/src/app/core/store/app.model.ts.template +0 -21
- package/src/ng-add/files/src/app/core/store/app.store.spec.ts.template +0 -920
- package/src/ng-add/files/src/app/core/store/app.store.ts.template +0 -1317
- package/src/ng-add/files/src/app/core/store/batch-write.firebase.service.ts.template +0 -58
- package/src/ng-add/files/src/app/core/store/batch-write.mock.service.ts.template +0 -105
- package/src/ng-add/files/src/app/core/store/batch-write.service.ts.template +0 -126
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.html.template +0 -9
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.scss.template +0 -46
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.spec.ts.template +0 -69
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.component.ts.template +0 -39
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.spec.ts.template +0 -122
- package/src/ng-add/files/src/app/shared/redeployment-warning/redeployment-warning.service.ts.template +0 -88
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
ElementRef,
|
|
6
|
+
inject,
|
|
7
|
+
signal,
|
|
8
|
+
viewChild,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { email, form, FormField, required, submit } from '@angular/forms/signals';
|
|
11
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
12
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
13
|
+
import { MatInputModule } from '@angular/material/input';
|
|
14
|
+
import { AuthStore } from 'src/app/core/store/auth/auth.store';
|
|
15
|
+
|
|
16
|
+
type SignInMessage = { text: string; isError: boolean };
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Account settings card that manages linked sign-in providers (Google, Email link).
|
|
20
|
+
*
|
|
21
|
+
* Allows users to:
|
|
22
|
+
* - View existing sign-in methods attached to their Firebase account.
|
|
23
|
+
* - Link a Google identity to an existing guest or email-linked profile.
|
|
24
|
+
* - Enable passwordless email-link sign-in for an existing Google profile.
|
|
25
|
+
* - Upgrade a guest profile to a permanent account via email magic link while preserving progress.
|
|
26
|
+
*/
|
|
27
|
+
@Component({
|
|
28
|
+
selector: 'app-sign-in-methods-card',
|
|
29
|
+
templateUrl: './sign-in-methods-card.component.html',
|
|
30
|
+
styleUrl: './sign-in-methods-card.component.scss',
|
|
31
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
32
|
+
imports: [FormField, MatButtonModule, MatFormFieldModule, MatInputModule],
|
|
33
|
+
})
|
|
34
|
+
export class SignInMethodsCardComponent {
|
|
35
|
+
private readonly authStore = inject(AuthStore);
|
|
36
|
+
private readonly guestEmailInput = viewChild<ElementRef<HTMLInputElement>>('guestEmailInput');
|
|
37
|
+
|
|
38
|
+
// --------------- LOCAL UI STATE ----------------------
|
|
39
|
+
|
|
40
|
+
/** Feedback status message displayed to the user after authentication actions. */
|
|
41
|
+
readonly message = signal<SignInMessage | null>(null);
|
|
42
|
+
|
|
43
|
+
/** Indicates whether an email magic link has been successfully dispatched for guest upgrade. */
|
|
44
|
+
readonly magicLinkSent = signal(false);
|
|
45
|
+
|
|
46
|
+
/** Signal form model for guest upgrade email input. */
|
|
47
|
+
readonly guestEmailModel = signal({ email: '' });
|
|
48
|
+
|
|
49
|
+
/** Form validation schema for email link upgrades. */
|
|
50
|
+
readonly guestEmailForm = form(this.guestEmailModel, (schema) => {
|
|
51
|
+
required(schema.email, { message: 'Email is required' });
|
|
52
|
+
email(schema.email, { message: 'Enter a valid email address' });
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// --------------- COMPUTED DATA -----------------------
|
|
56
|
+
|
|
57
|
+
/** Active Firebase authentication session. */
|
|
58
|
+
readonly session = this.authStore.afUser;
|
|
59
|
+
|
|
60
|
+
/** Whether Google sign-in is linked to the current session. */
|
|
61
|
+
readonly hasGoogleProvider = computed(
|
|
62
|
+
() => this.session()?.providerIds.includes('google.com') ?? false,
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
// --------------- EVENT HANDLING ----------------------
|
|
66
|
+
|
|
67
|
+
/** Triggers the Google account linking popup. */
|
|
68
|
+
async addGoogle(): Promise<void> {
|
|
69
|
+
this.message.set(null);
|
|
70
|
+
try {
|
|
71
|
+
await this.authStore.linkGoogle();
|
|
72
|
+
this.message.set({
|
|
73
|
+
text: 'Google is now linked to this account profile.',
|
|
74
|
+
isError: false,
|
|
75
|
+
});
|
|
76
|
+
} catch (error) {
|
|
77
|
+
const code = (error as { code?: string }).code;
|
|
78
|
+
this.message.set({
|
|
79
|
+
text:
|
|
80
|
+
code === 'auth/credential-already-in-use' ?
|
|
81
|
+
'That Google account belongs to a different profile and cannot be linked.' :
|
|
82
|
+
'Google could not be linked. Please try again.',
|
|
83
|
+
isError: true,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Sends an email-link confirmation to attach passwordless email sign-in to the active account. */
|
|
89
|
+
async enableEmailLink(): Promise<void> {
|
|
90
|
+
this.message.set(null);
|
|
91
|
+
try {
|
|
92
|
+
await this.authStore.sendEmailLinkForCurrentAccount();
|
|
93
|
+
this.message.set({
|
|
94
|
+
text: 'We sent a confirmation link. Open it in this browser to enable email-link sign-in.',
|
|
95
|
+
isError: false,
|
|
96
|
+
});
|
|
97
|
+
} catch {
|
|
98
|
+
this.message.set({
|
|
99
|
+
text: 'We could not send an email-link confirmation. Please try again.',
|
|
100
|
+
isError: true,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Sends a magic link to upgrade a guest account to a permanent email-linked account. */
|
|
106
|
+
async upgradeGuestWithEmailLink(): Promise<void> {
|
|
107
|
+
await submit(this.guestEmailForm, async () => {
|
|
108
|
+
this.message.set(null);
|
|
109
|
+
this.magicLinkSent.set(false);
|
|
110
|
+
try {
|
|
111
|
+
await this.authStore.sendEmailSignInLink(this.guestEmailModel().email);
|
|
112
|
+
this.magicLinkSent.set(true);
|
|
113
|
+
this.message.set({
|
|
114
|
+
text: 'We sent a magic link. Open it in this browser to save your guest progress.',
|
|
115
|
+
isError: false,
|
|
116
|
+
});
|
|
117
|
+
} catch {
|
|
118
|
+
this.message.set({
|
|
119
|
+
text: 'We could not send a magic link. Please try again.',
|
|
120
|
+
isError: true,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Focuses the guest email input field when requested (e.g. from deletion modal "Save progress"). */
|
|
127
|
+
focusGuestEmail(): void {
|
|
128
|
+
this.guestEmailInput()?.nativeElement.focus();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -2,10 +2,9 @@ import { render } from '@testing-library/angular';
|
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
|
|
4
4
|
import { HomeComponent } from './home.component';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { BATCH_WRITE_SERVICE } from 'src/app/core/store/batch-write.service';
|
|
5
|
+
import { provideAppMocks } from 'src/app/core/testing/app-mocks';
|
|
6
|
+
import { BatchWriteMockService } from '@tech4good/platform-data/testing';
|
|
7
|
+
import { BATCH_WRITE_SERVICE } from '@tech4good/platform-data';
|
|
9
8
|
|
|
10
9
|
/** Sets up the testing environment for HomeComponent using render. */
|
|
11
10
|
async function setup() {
|
|
@@ -15,7 +14,7 @@ async function setup() {
|
|
|
15
14
|
const view = await render(HomeComponent, {
|
|
16
15
|
imports: [],
|
|
17
16
|
providers: [
|
|
18
|
-
|
|
17
|
+
...provideAppMocks(),
|
|
19
18
|
{ provide: BATCH_WRITE_SERVICE, useClass: BatchWriteMockService },
|
|
20
19
|
],
|
|
21
20
|
componentInputs: {},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, OnInit, ChangeDetectionStrategy, input, output, inject, WritableSignal, Signal, signal, computed, Inject, Injector } from '@angular/core';
|
|
2
2
|
import { User } from 'src/app/core/store/user/user.model';
|
|
3
3
|
import { AuthStore } from 'src/app/core/store/auth/auth.store';
|
|
4
|
-
import { BatchWriteService, BATCH_WRITE_SERVICE } from '
|
|
4
|
+
import { BatchWriteService, BATCH_WRITE_SERVICE } from '@tech4good/platform-data';
|
|
5
5
|
import { NavbarComponent } from 'src/app/shared/navbar/navbar.component';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
@@ -27,11 +27,6 @@ export class HomeComponent implements OnInit {
|
|
|
27
27
|
|
|
28
28
|
// --------------- EVENT HANDLING ----------------------
|
|
29
29
|
|
|
30
|
-
/** Login the user. */
|
|
31
|
-
login() {
|
|
32
|
-
this.authStore.login('google.com', { doNotRoute: true });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
30
|
/** Logout the user. */
|
|
36
31
|
logout() {
|
|
37
32
|
this.authStore.logout({ doNotRoute: true });
|
package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.html.template
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@if (showWarning()) {
|
|
2
|
+
<aside class="guest-warning-bar" role="status" aria-live="polite">
|
|
3
|
+
<div class="banner-content">
|
|
4
|
+
<div class="message-group">
|
|
5
|
+
<span class="warning-icon" aria-hidden="true">💡</span>
|
|
6
|
+
<span class="message-text">
|
|
7
|
+
<strong>Guest Account:</strong> Your progress is only saved in this browser. Link Google or an email address to log in from any device.
|
|
8
|
+
</span>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="action-group">
|
|
11
|
+
<a class="save-link" routerLink="/account">Save Progress</a>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</aside>
|
|
15
|
+
}
|
package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.scss.template
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.guest-warning-bar {
|
|
6
|
+
background: linear-gradient(135deg, #fffbe6 0%, #fef3c7 100%);
|
|
7
|
+
border-bottom: 1px solid #fde68a;
|
|
8
|
+
color: #92400e;
|
|
9
|
+
padding: 8px 16px;
|
|
10
|
+
font-size: 0.875rem;
|
|
11
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
|
12
|
+
position: relative;
|
|
13
|
+
z-index: 999;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.banner-content {
|
|
17
|
+
max-width: 1200px;
|
|
18
|
+
margin: 0 auto;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
gap: 16px;
|
|
23
|
+
|
|
24
|
+
@media (max-width: 640px) {
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.message-group {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 8px;
|
|
35
|
+
|
|
36
|
+
.warning-icon {
|
|
37
|
+
font-size: 1.1rem;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.message-text {
|
|
42
|
+
line-height: 1.4;
|
|
43
|
+
|
|
44
|
+
strong {
|
|
45
|
+
color: #78350f;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.action-group {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: 12px;
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
|
|
56
|
+
@media (max-width: 640px) {
|
|
57
|
+
align-self: flex-end;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.save-link {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
background: #78350f;
|
|
65
|
+
color: #ffffff !important;
|
|
66
|
+
font-weight: 700;
|
|
67
|
+
font-size: 0.8rem;
|
|
68
|
+
padding: 4px 12px;
|
|
69
|
+
border-radius: 12px;
|
|
70
|
+
text-decoration: none;
|
|
71
|
+
transition: all 0.2s ease;
|
|
72
|
+
box-shadow: 0 1px 4px rgba(120, 53, 15, 0.2);
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
background: #451a03;
|
|
76
|
+
transform: translateY(-1px);
|
|
77
|
+
box-shadow: 0 2px 6px rgba(120, 53, 15, 0.3);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/angular';
|
|
2
|
+
import { Injectable, signal } from '@angular/core';
|
|
3
|
+
import { provideRouter } from '@angular/router';
|
|
4
|
+
import { provideAppMocks } from 'src/app/core/testing/app-mocks';
|
|
5
|
+
import { GuestWarningBarComponent } from './guest-warning-bar.component';
|
|
6
|
+
import { AuthStore } from 'src/app/core/store/auth/auth.store';
|
|
7
|
+
import { AuthMockDB, AuthLoggedInMockDB } from 'src/app/core/store/auth/auth.mock';
|
|
8
|
+
|
|
9
|
+
describe('GuestWarningBarComponent', () => {
|
|
10
|
+
it('should not show warning bar when user is signed out', async () => {
|
|
11
|
+
await render(GuestWarningBarComponent, {
|
|
12
|
+
providers: [
|
|
13
|
+
provideRouter([]),
|
|
14
|
+
{ provide: AuthStore, useClass: AuthMockDB },
|
|
15
|
+
...provideAppMocks({ disableLatency: true }),
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
expect(screen.queryByText(/Guest Account:/i)).toBeNull();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should not show warning bar when logged in as registered non-anonymous user', async () => {
|
|
22
|
+
await render(GuestWarningBarComponent, {
|
|
23
|
+
providers: [
|
|
24
|
+
provideRouter([]),
|
|
25
|
+
{ provide: AuthStore, useClass: AuthLoggedInMockDB },
|
|
26
|
+
...provideAppMocks({ disableLatency: true }),
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
expect(screen.queryByText(/Guest Account:/i)).toBeNull();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('should show persistent warning bar when logged in as an anonymous guest on an active route', async () => {
|
|
33
|
+
@Injectable()
|
|
34
|
+
class AnonymousAuthMockDB extends AuthMockDB {
|
|
35
|
+
override afUser = signal({
|
|
36
|
+
uid: 'anon-123',
|
|
37
|
+
email: null,
|
|
38
|
+
displayName: 'Guest',
|
|
39
|
+
photoURL: null,
|
|
40
|
+
isAnonymous: true,
|
|
41
|
+
emailVerified: false,
|
|
42
|
+
emailLinkEnabled: false,
|
|
43
|
+
providerIds: [],
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
await render(GuestWarningBarComponent, {
|
|
48
|
+
providers: [
|
|
49
|
+
provideRouter([]),
|
|
50
|
+
{ provide: AuthStore, useClass: AnonymousAuthMockDB },
|
|
51
|
+
...provideAppMocks({ disableLatency: true }),
|
|
52
|
+
],
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Warning text & Save Progress link should be visible
|
|
56
|
+
expect(screen.getByText(/Guest Account:/i)).toBeVisible();
|
|
57
|
+
expect(screen.getByRole('link', { name: /Save Progress/i })).toBeVisible();
|
|
58
|
+
});
|
|
59
|
+
});
|
package/src/ng-add/files/src/app/shared/guest-warning-bar/guest-warning-bar.component.ts.template
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Component, inject, computed, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { Router, NavigationEnd, RouterLink } from '@angular/router';
|
|
3
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { filter, map } from 'rxjs/operators';
|
|
5
|
+
import { AuthStore } from '../../core/store/auth/auth.store';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Top warning banner displayed when a user is signed in with an anonymous guest account.
|
|
9
|
+
* Reminds users that guest progress is only saved locally on their current device and
|
|
10
|
+
* prompts them to link Google or an Email address to save progress permanently.
|
|
11
|
+
*/
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'app-guest-warning-bar',
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [RouterLink],
|
|
16
|
+
templateUrl: './guest-warning-bar.component.html',
|
|
17
|
+
styleUrl: './guest-warning-bar.component.scss',
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
})
|
|
20
|
+
export class GuestWarningBarComponent {
|
|
21
|
+
private readonly authStore = inject(AuthStore);
|
|
22
|
+
private readonly router = inject(Router, { optional: true });
|
|
23
|
+
|
|
24
|
+
/** Current route URL signal. */
|
|
25
|
+
private readonly currentUrl = toSignal(
|
|
26
|
+
this.router?.events ?
|
|
27
|
+
this.router.events.pipe(
|
|
28
|
+
filter((event): event is NavigationEnd => event instanceof NavigationEnd),
|
|
29
|
+
map((event) => event.urlAfterRedirects || event.url),
|
|
30
|
+
) :
|
|
31
|
+
undefined,
|
|
32
|
+
{ initialValue: this.router?.url || '' },
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/** Whether the banner should be visible. */
|
|
36
|
+
readonly showWarning = computed(() => {
|
|
37
|
+
const afUser = this.authStore.afUser?.();
|
|
38
|
+
if (!afUser?.isAnonymous) return false;
|
|
39
|
+
const url = this.currentUrl() || '';
|
|
40
|
+
const excludedRoutes = ['/landing', '/early-access', '/consent'];
|
|
41
|
+
if (excludedRoutes.some((route) => url.startsWith(route))) return false;
|
|
42
|
+
return true;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -1,15 +1,45 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
<nav class="navbar-container">
|
|
2
|
+
<a routerLink="/" class="brand-section">
|
|
3
|
+
<div class="brand-mark" aria-hidden="true">
|
|
4
|
+
<svg class="brand-logo-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
5
|
+
<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />
|
|
6
|
+
</svg>
|
|
7
|
+
</div>
|
|
8
|
+
<span class="brand-title"><%= classify(project) %></span>
|
|
9
|
+
</a>
|
|
10
|
+
|
|
11
|
+
<div class="navbar-right">
|
|
12
|
+
@if (currentUser(); as user) {
|
|
13
|
+
<div class="user-setting-section">
|
|
14
|
+
@if (userPhotoUrl(); as photoUrl) {
|
|
15
|
+
<img
|
|
16
|
+
class="profile-pic"
|
|
17
|
+
[src]="photoUrl"
|
|
18
|
+
referrerpolicy="no-referrer"
|
|
19
|
+
alt="Profile Picture"
|
|
20
|
+
(error)="onPhotoError()"
|
|
21
|
+
[matMenuTriggerFor]="menu"
|
|
22
|
+
#menuTrigger
|
|
23
|
+
/>
|
|
24
|
+
} @else {
|
|
25
|
+
<div
|
|
26
|
+
class="profile-initial-avatar"
|
|
27
|
+
[matMenuTriggerFor]="menu"
|
|
28
|
+
#menuTrigger
|
|
29
|
+
role="button"
|
|
30
|
+
tabindex="0"
|
|
31
|
+
aria-label="User Profile Menu"
|
|
32
|
+
>
|
|
33
|
+
<span>{{ (user.name || 'G').charAt(0).toUpperCase() }}</span>
|
|
34
|
+
</div>
|
|
35
|
+
}
|
|
36
|
+
<mat-menu #menu="matMenu">
|
|
37
|
+
<a class="menu-item" routerLink="/account" mat-menu-item>Profile & Settings</a>
|
|
38
|
+
<button class="menu-item" (click)="logout()" mat-menu-item type="button">Logout</button>
|
|
39
|
+
</mat-menu>
|
|
40
|
+
</div>
|
|
41
|
+
} @else {
|
|
42
|
+
<a routerLink="/login" class="login-link">Log in</a>
|
|
43
|
+
}
|
|
44
|
+
</div>
|
|
45
|
+
</nav>
|
|
@@ -1,41 +1,125 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
position: sticky;
|
|
5
|
+
top: 0;
|
|
6
|
+
z-index: 100;
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
.navbar-container {
|
|
2
10
|
height: 70px;
|
|
3
11
|
width: 100%;
|
|
4
|
-
background:
|
|
5
|
-
|
|
12
|
+
background: rgba(255, 255, 255, 0.85);
|
|
13
|
+
backdrop-filter: blur(12px);
|
|
14
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.5);
|
|
15
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
|
|
6
16
|
display: flex;
|
|
7
17
|
flex-direction: row;
|
|
8
18
|
align-items: center;
|
|
9
|
-
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
padding: 8px max(20px, calc(50vw - 460px));
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
|
|
23
|
+
.brand-section {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 10px;
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
|
|
29
|
+
.brand-mark {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
color: #0e7490;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
|
|
36
|
+
.brand-logo-icon {
|
|
37
|
+
width: 28px;
|
|
38
|
+
height: 28px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.brand-title {
|
|
43
|
+
font-size: 1.35rem;
|
|
44
|
+
font-weight: 800;
|
|
45
|
+
color: #1e1b4b;
|
|
46
|
+
letter-spacing: -0.02em;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
opacity: 0.9;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.navbar-right {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 20px;
|
|
10
58
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
59
|
+
.login-link {
|
|
60
|
+
color: #0e7490;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
font-size: 0.95rem;
|
|
63
|
+
text-decoration: none;
|
|
64
|
+
padding: 8px 16px;
|
|
65
|
+
border-radius: 6px;
|
|
66
|
+
transition: background-color 0.2s, color 0.2s;
|
|
67
|
+
|
|
68
|
+
&:hover {
|
|
69
|
+
background-color: rgba(14, 116, 144, 0.08);
|
|
70
|
+
color: #155e75;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
16
73
|
}
|
|
17
74
|
|
|
18
75
|
.user-setting-section {
|
|
19
|
-
margin-left: auto;
|
|
20
76
|
display: flex;
|
|
21
77
|
align-items: center;
|
|
22
|
-
|
|
23
|
-
.profile-pic{
|
|
24
|
-
height:
|
|
25
|
-
width:
|
|
78
|
+
|
|
79
|
+
.profile-pic {
|
|
80
|
+
height: 42px;
|
|
81
|
+
width: 42px;
|
|
26
82
|
border-radius: 50%;
|
|
27
83
|
cursor: pointer;
|
|
84
|
+
border: 2px solid #ffffff;
|
|
85
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
transition: transform 0.2s ease;
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
transform: scale(1.05);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.profile-initial-avatar {
|
|
95
|
+
height: 42px;
|
|
96
|
+
width: 42px;
|
|
97
|
+
border-radius: 50%;
|
|
98
|
+
background: linear-gradient(135deg, #0e7490 0%, #155e75 100%);
|
|
99
|
+
color: #ffffff;
|
|
100
|
+
font-size: 1.15rem;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
border: 2px solid #ffffff;
|
|
107
|
+
box-shadow: 0 2px 8px rgba(14, 116, 144, 0.25);
|
|
108
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
109
|
+
user-select: none;
|
|
110
|
+
|
|
111
|
+
&:hover {
|
|
112
|
+
transform: scale(1.05);
|
|
113
|
+
box-shadow: 0 4px 12px rgba(14, 116, 144, 0.35);
|
|
114
|
+
}
|
|
28
115
|
}
|
|
29
116
|
}
|
|
30
117
|
}
|
|
31
118
|
|
|
32
|
-
|
|
33
|
-
.logout {
|
|
119
|
+
.logout, .menu-item {
|
|
34
120
|
display: flex;
|
|
35
121
|
align-items: center;
|
|
36
|
-
font-size:
|
|
37
|
-
font-weight:
|
|
122
|
+
font-size: 15px;
|
|
123
|
+
font-weight: 500;
|
|
38
124
|
cursor: pointer;
|
|
39
|
-
padding: 10px;
|
|
40
125
|
}
|
|
41
|
-
|