refactor: modularize frontend flows

This commit is contained in:
Lan committed 2026-06-03 02:01:57 +08:00
1 parent 9300607f96
commit a11e7900b4
85 files changed
+4654 -4363

No files matched your search

@@ -0,0 +1,25 @@
import { ConfigService } from '@/services'
import { useAlertStore } from '@/stores/alertStore'
import { useConfigStore } from '@/stores/configStore'
export function usePublicConfigBootstrap() {
const alertStore = useAlertStore()
const configStore = useConfigStore()
const syncPublicConfig = async () => {
const res = await ConfigService.getUserConfig()
if (res.code !== 200 || !res.detail) {
return
}
const notifyMessage = configStore.applyRemoteConfig(res.detail)
if (notifyMessage) {
alertStore.showAlert(notifyMessage, 'success')
}
}
return {
syncPublicConfig
}
}