diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..614bd66 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,58 @@ +# Repository Guidelines + +## Project Structure & Module Organization + +This repository is a private pnpm workspace. Workspace packages are declared in `pnpm-workspace.yaml` under `app/*`. + +The active application is `app/citizen-frontend`, a Vue 3 + Vite + Vuetify frontend written in TypeScript. Its source lives in `app/citizen-frontend/src/`: + +- `src/main.ts` bootstraps the app and global styles. +- `src/App.vue` hosts the router view. +- `src/pages/` contains route-level pages. +- `src/components/` contains reusable Vue components. +- `src/stores/` contains Pinia stores. +- `src/router/` contains Vue Router configuration. +- `src/assets/` stores static assets such as local fonts. +- `src/styles/` contains global style and Vuetify settings. + +If a nested `AGENTS.md` exists, follow the closest one for files in that subtree. + +## Build, Test, and Development Commands + +Run commands from `app/citizen-frontend` unless noted otherwise. + +- `pnpm install`: install workspace dependencies. +- `pnpm dev`: start the Vite development server. +- `pnpm build`: run type-checking and production build. +- `pnpm build-only`: build the Vite app without type-checking. +- `pnpm type-check`: run `vue-tsc`. +- `pnpm lint`: run ESLint. +- `pnpm lint:fix`: apply ESLint auto-fixes. +- `pnpm preview`: preview the production build locally. + +## Coding Style & Naming Conventions + +Use TypeScript, Vue 3 Composition API, and ` + + diff --git a/app/citizen-frontend/src/components/ModuleRouterCard.vue b/app/citizen-frontend/src/components/ModuleRouterCard.vue new file mode 100644 index 0000000..47a9251 --- /dev/null +++ b/app/citizen-frontend/src/components/ModuleRouterCard.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/citizen-frontend/src/components/layout/DefaultLayout.vue b/app/citizen-frontend/src/components/layout/DefaultLayout.vue index 956f73d..375b7ba 100644 --- a/app/citizen-frontend/src/components/layout/DefaultLayout.vue +++ b/app/citizen-frontend/src/components/layout/DefaultLayout.vue @@ -21,18 +21,6 @@ > - - - {{ - store.userProfile.name.substring(1) - }} - @@ -189,7 +177,7 @@ > mdi-view-dashboard - 主控台 + 首頁 @@ -197,17 +185,17 @@ mdi-clipboard-text-search - 線上自評 + 自評 mdi-calendar-check - 活動預約 + 預約 mdi-qrcode-scan - 現場量測 + 量測 @@ -307,27 +295,27 @@ const showEmergency = ref(false) // 無障礙狀態 (可持久化儲存於 localStorage) const isLargeText = ref(localStorage.getItem('mode-large-text') === 'true') -watch(isLargeText, newVal => { +watch(isLargeText, (newVal) => { localStorage.setItem('mode-large-text', String(newVal)) }) // 同步底部導航狀態與當前路由 watch( () => route.path, - path => { + (path) => { if (path === '/') activeTab.value = 'home' else if (path.startsWith('/self-assessment')) activeTab.value = 'self-assessment' else if (path.startsWith('/appointment')) activeTab.value = 'appointment' else if (path.startsWith('/checkin')) activeTab.value = 'checkin' }, - { immediate: true }, + { immediate: true } ) -function getBottomNavIconColor (value: string) { +function getBottomNavIconColor(value: string) { return activeTab.value === value ? 'secondary' : 'secondary-darken-1' } -function handleLogout () { +function handleLogout() { store.logout() router.push('/login') drawer.value = false diff --git a/app/citizen-frontend/src/main.ts b/app/citizen-frontend/src/main.ts index 3159462..45e176f 100644 --- a/app/citizen-frontend/src/main.ts +++ b/app/citizen-frontend/src/main.ts @@ -15,7 +15,6 @@ import App from './App.vue' // Styles import '@/styles/fonts.css' -import 'unfonts.css' const app = createApp(App) diff --git a/app/citizen-frontend/src/pages/appointment.vue b/app/citizen-frontend/src/pages/appointment.vue index 9dea716..d0c9cb6 100644 --- a/app/citizen-frontend/src/pages/appointment.vue +++ b/app/citizen-frontend/src/pages/appointment.vue @@ -18,7 +18,7 @@
目前沒有相關活動
- + @@ -63,7 +63,12 @@
- 剩餘名額:{{ apt.slots }} 位 + 剩餘名額:{{ apt.slots }} + 位
@@ -106,7 +111,7 @@ diff --git a/app/citizen-frontend/src/pages/checkin.vue b/app/citizen-frontend/src/pages/checkin.vue index 1d51d24..1d1079a 100644 --- a/app/citizen-frontend/src/pages/checkin.vue +++ b/app/citizen-frontend/src/pages/checkin.vue @@ -7,7 +7,11 @@ - +
@@ -32,7 +36,9 @@
測量站點完成度 - {{ completedCount }} / {{ totalCount }} ({{ progressPercent }}%) + {{ completedCount }} / {{ totalCount }} ({{ progressPercent }}%)

尚未在活動現場合對報到

-

請先前往「活動預約」頁面,出示您的報到條碼給現場志工進行核對。

+

+ 請先前往「活動預約」頁面,出示您的報到條碼給現場志工進行核對。 +

前往查看預約活動 - +
@@ -64,10 +77,17 @@ 高齡友善測試輔助
-
一鍵填入所有剩餘關卡數值,便於檢視報告
+
+ 一鍵填入所有剩餘關卡數值,便於檢視報告 +
- + 一鍵模擬完成
@@ -77,7 +97,7 @@

關卡列表

- + - +
-
+
{{ station.name }}
{{ getMeasurementSummary(key, station.values) }} - | {{ station.time?.split(' ')[1] }} + | {{ station.time?.split(' ')[1] }}
-
- 等待現場檢測員登錄 -
+
等待現場檢測員登錄
@@ -162,137 +188,149 @@ diff --git a/app/citizen-frontend/src/pages/login.vue b/app/citizen-frontend/src/pages/login.vue index 2fbf90c..5495634 100644 --- a/app/citizen-frontend/src/pages/login.vue +++ b/app/citizen-frontend/src/pages/login.vue @@ -50,13 +50,22 @@ class="glow-sweep-button rounded-lg font-weight-bold elevation-2 mb-4" color="secondary" :loading="loading" - size="large" type="submit" > 登入健康平台 - + + 不登入,先做線上自評 + + - + @@ -20,7 +22,13 @@
{{ stepName }}
@@ -37,7 +45,7 @@ 基本資料確認 - + -

1. 最近 7 天,您每週進行大運動幾次?

+

+ 1. 最近 7 天,您每週進行大運動幾次? +

-

2. 您目前最想改善的身體功能? (可複選)

+

+ 2. 您目前最想改善的身體功能? (可複選) +

- + - +
{{ imp }}
@@ -176,14 +194,18 @@ 身體限制與慢性病史 -

1. 過去一年是否有過跌倒史?

+

+ 1. 過去一年是否有過跌倒史? +

-

2. 目前身體關節疼痛狀況?

+

+ 2. 目前身體關節疼痛狀況? +

-

3. 您有哪些慢性疾病? (可複選)

+

+ 3. 您有哪些慢性疾病? (可複選) +

- + -
+
-

+

自評分級:{{ resultLevel }}

@@ -254,7 +284,8 @@

- 您的身體功能與日常活動習慣良好。建議您每週繼續保持 3 次以上的運動,並可以預約普測活動以獲得精準的五維健康指標與運動處方。 + 您的身體功能與日常活動習慣良好。建議您每週繼續保持 3 + 次以上的運動,並可以預約普測活動以獲得精準的五維健康指標與運動處方。

@@ -266,7 +297,8 @@

- * 禁忌提醒:若收縮壓 > 160mmHg、有關節強烈疼痛或暈眩時,請立即暫停所有體能檢測與訓練! + * 禁忌提醒:若收縮壓 > + 160mmHg、有關節強烈疼痛或暈眩時,請立即暫停所有體能檢測與訓練!
@@ -310,13 +342,7 @@
- + 立即預約普測
@@ -339,113 +365,120 @@