mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-21 02:43:34 +08:00
Add user CRUD, account-scoped navigation history and favorites. Unify HTTP mocks, backend contracts and route configuration. Reuse existing scrolling components and add Harness reuse guidance.
19 lines
564 B
TypeScript
19 lines
564 B
TypeScript
import { piniaNavigationHistoryStore } from '../modules/navigation-history'
|
|
|
|
export const useNavigationHistoryGetters = () => {
|
|
const store = piniaNavigationHistoryStore()
|
|
|
|
return {
|
|
recentPaths: computed(() => store.recentPaths),
|
|
favoritePaths: computed(() => store.favoritePaths),
|
|
storageUnavailable: computed(() => store.storageUnavailable),
|
|
}
|
|
}
|
|
|
|
export const useNavigationHistoryActions = () => {
|
|
const { recordVisit, toggleFavorite, clearRecent } =
|
|
piniaNavigationHistoryStore()
|
|
|
|
return { recordVisit, toggleFavorite, clearRecent }
|
|
}
|