bug fixes: fix for application not working properly on lan
This commit is contained in:
@@ -44,15 +44,19 @@ router.beforeEach(async (to, from, next) => {
|
||||
const { data } = await authService.checkStatus();
|
||||
isConfigured = data.configured;
|
||||
} catch (err) {
|
||||
console.error('Failed to check configuration status');
|
||||
console.error('Failed to check configuration status:', err);
|
||||
// If we can't reach the server, don't redirect to setup.
|
||||
// Instead, allow the navigation to proceed to the target page which will likely fail its own API calls,
|
||||
// providing a better error context than a forced setup screen.
|
||||
return next();
|
||||
}
|
||||
}
|
||||
|
||||
if (!isConfigured && to.name !== 'Setup') {
|
||||
if (isConfigured === false && to.name !== 'Setup') {
|
||||
return next('/setup');
|
||||
}
|
||||
|
||||
if (isConfigured && to.name === 'Setup') {
|
||||
if (isConfigured === true && to.name === 'Setup') {
|
||||
return next('/');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user