Polish boursecu UX: branding logos, home price stats, assets, and desktop footer.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+22
-26
@@ -11,6 +11,7 @@ import { useUserStore } from '@/store/userStore'
|
||||
import { useWalletStore } from '@/store/walletStore'
|
||||
import { useFundUserStore } from '@/store/fundStore'
|
||||
import VueLazyLoad from 'vue3-lazyload'
|
||||
import VueApexCharts from 'vue3-apexcharts'
|
||||
import { getMe } from '@/api/me'
|
||||
import type { NavigationGuardNext, RouteLocationNormalized } from 'vue-router'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
@@ -24,6 +25,7 @@ app.use(VueLazyLoad, {
|
||||
// options...
|
||||
})
|
||||
app.use(router)
|
||||
app.use(VueApexCharts)
|
||||
|
||||
const userStore = useUserStore()
|
||||
const walletStore = useWalletStore()
|
||||
@@ -121,20 +123,16 @@ router.beforeEach(async (to, from, next) => {
|
||||
}
|
||||
// If not an Apple device and fingerprint exists
|
||||
else if (!isApple && finger_print) {
|
||||
// goToLogin(to, next)
|
||||
fingerPosition = await authenticateWithFingerprint()
|
||||
|
||||
if (fingerPosition) {
|
||||
// goToHome(to, next) // Redirect to home if fingerprint is authenticated
|
||||
} else {
|
||||
goToLogin(to, next) // Redirect to login if authentication fails
|
||||
return next()
|
||||
}
|
||||
|
||||
goToLogin(to, next)
|
||||
} else {
|
||||
if (from.path === '/') {
|
||||
// goToHome(to, next)
|
||||
}
|
||||
if(to.name=="login"){
|
||||
goToHome(to, next)
|
||||
if (to.name === 'login') {
|
||||
return goToHome(to, next)
|
||||
}
|
||||
return next()
|
||||
}
|
||||
@@ -166,26 +164,24 @@ router.beforeEach(async (to, from, next) => {
|
||||
// If fingerprint authentication failed or was not done
|
||||
else {
|
||||
if (getToken() && !hasFingerPrint) {
|
||||
next()
|
||||
} else {
|
||||
if (['login', '404','educate', 'aboutUs'].includes(to.name as string)) {
|
||||
if (to.name === 'login'){
|
||||
goToLogin(to, next)
|
||||
return
|
||||
} else {
|
||||
return next()
|
||||
}
|
||||
// Allow access to login or 404
|
||||
}
|
||||
authStore.setLoading(false)
|
||||
return next()
|
||||
}
|
||||
/* if (to.name !== 'login') {
|
||||
return next({ name: 'login' }) // Redirect to login
|
||||
} else {
|
||||
return next() // If already on the login page, don't redirect
|
||||
}*/
|
||||
/* return next({ name: 'login' })*/
|
||||
|
||||
if (['login', '404', 'educate', 'aboutUs'].includes(to.name as string)) {
|
||||
authStore.setLoading(false)
|
||||
if (to.name === 'login' && !getToken()) {
|
||||
return goToLogin(to, next)
|
||||
}
|
||||
return next()
|
||||
}
|
||||
|
||||
authStore.setLoading(false)
|
||||
return next({ name: 'login' })
|
||||
}
|
||||
}
|
||||
|
||||
authStore.setLoading(false)
|
||||
})
|
||||
app.mount('#app')
|
||||
// if (currentRoute.value !== '/') {
|
||||
|
||||
Reference in New Issue
Block a user