Initial commit: G3FO recurring investment schedule frontend

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
justin
2026-10-10 09:21:25 +08:00
co-authored by Cursor
commit 9ed161d93e
69 changed files with 10097 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import { useRoute, useRouter } from 'vue-router'
import type { AppPreferences } from '@/config/urlPreferences'
import type { AppLocale } from '@/i18n/locale'
import { useAppStore } from '@/stores/app'
import type { AppTheme } from '@/theme/types'
export function useUrlPreferences() {
const route = useRoute()
const router = useRouter()
const appStore = useAppStore()
function replacePreferences(partial: Partial<AppPreferences>) {
const query = appStore.buildQueryForPreferences(partial, route.query)
router.replace({ path: route.path, hash: route.hash, query })
}
function setLocale(next: AppLocale) {
replacePreferences({ locale: next })
}
function setTheme(next: AppTheme) {
replacePreferences({ theme: next })
}
return { setLocale, setTheme }
}