feat(03-01): add expandable note history panel with search

- Install @alpinejs/collapse plugin for smooth expand/collapse animation
- Fix controller ordering: notes now explicitly ordered newest first via latest('created_at')
- Note count badge is now clickable button to toggle history panel
- Add expansion panel row with loading state, search filter, empty state
- Search filters notes by content or author name (client-side)
- Panel collapses cleanly, search query resets on close
- Cache sync: new notes from inline form appear in history immediately
- Display format: author name and formatted datetime (YYYY年MM月DD日 HH:mm)
- Empty state shows '尚無備註', no-results shows '找不到符合的備忘錄'
This commit is contained in:
2026-02-13 12:59:03 +08:00
parent 14bab518dd
commit c0ebbdbe20
5 changed files with 125 additions and 5 deletions

9
package-lock.json generated
View File

@@ -4,6 +4,9 @@
"requires": true,
"packages": {
"": {
"dependencies": {
"@alpinejs/collapse": "^3.15.8"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"alpinejs": "^3.4.2",
@@ -28,6 +31,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@alpinejs/collapse": {
"version": "3.15.8",
"resolved": "https://registry.npmjs.org/@alpinejs/collapse/-/collapse-3.15.8.tgz",
"integrity": "sha512-zZhD8DHdHuzGFe8+cHNH99K//oFutzKwcy6vagydb3KFlTzmqxTnHZo5sSV81lAazhV7qKsYCKtNV14tR9QkJw==",
"license": "MIT"
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",