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:
@@ -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('')
|
||||
|
||||
Reference in New Issue
Block a user