add settings store with FIRE parameters; fix home page

- store/settings.ts: target 71万, withdraw rate 3.5%, monthly invest 1500, etc. (persist)
- progress.vue: read target from settings store instead of hardcoded value
- index/index.vue: remove type:home conflict so checkin page is the entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ila
2026-06-08 11:01:16 +08:00
co-authored by Claude Sonnet 4.6
parent a8fa0c0753
commit 5fffb3112a
3 changed files with 25 additions and 5 deletions
+4 -3
View File
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { useProgressStore } from '@/store/progress'
import { useSettingsStore } from '@/store/settings'
defineOptions({ name: 'Progress' })
definePage({
@@ -7,10 +8,10 @@ definePage({
})
const store = useProgressStore()
const TARGET = 710000
const settings = useSettingsStore()
const percent = computed(() => Math.min(100, Math.round((store.netAssets / TARGET) * 100)))
const remaining = computed(() => Math.max(0, TARGET - store.netAssets))
const percent = computed(() => Math.min(100, Math.round((store.netAssets / settings.target) * 100)))
const remaining = computed(() => Math.max(0, settings.target - store.netAssets))
const showForm = ref(false)
const inputVal = ref('')