upd: switch `isIdConfirmed` back to `isIdNotConfirmed`
This commit is contained in:
parent
2726e7e546
commit
2c241f8d3b
|
@ -187,14 +187,14 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
|||
public currentRoute: ShallowRef<RouteDef>;
|
||||
private currentPath: string;
|
||||
private isLoggedIn: boolean;
|
||||
private isIdConfirmed: boolean;
|
||||
private isIdNotConfirmed: boolean;
|
||||
private notFoundPageComponent: Component;
|
||||
private currentKey = Date.now().toString();
|
||||
private redirectCount = 0;
|
||||
|
||||
public navHook: ((path: string, flag?: any) => boolean) | null = null;
|
||||
|
||||
constructor(routes: Router['routes'], currentPath: Router['currentPath'], isLoggedIn: boolean, isIdConfirmed: boolean, notFoundPageComponent: Component) {
|
||||
constructor(routes: Router['routes'], currentPath: Router['currentPath'], isLoggedIn: boolean, isIdNotConfirmed: boolean, notFoundPageComponent: Component) {
|
||||
super();
|
||||
|
||||
this.routes = routes;
|
||||
|
@ -203,7 +203,7 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
|||
this.currentRoute = shallowRef(this.current.route);
|
||||
this.currentPath = currentPath;
|
||||
this.isLoggedIn = isLoggedIn;
|
||||
this.isIdConfirmed = isIdConfirmed;
|
||||
this.isIdNotConfirmed = isIdNotConfirmed;
|
||||
this.notFoundPageComponent = notFoundPageComponent;
|
||||
}
|
||||
|
||||
|
@ -369,7 +369,7 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
|||
res.props.set('showLoginPopup', true);
|
||||
}
|
||||
|
||||
if (res.route.idRequired && !this.isIdConfirmed) {
|
||||
if (res.route.idRequired && this.isIdNotConfirmed) {
|
||||
res.route.component = this.notFoundPageComponent;
|
||||
res.props.set('showIdConfirm', true);
|
||||
}
|
||||
|
|
|
@ -572,7 +572,7 @@ const routes: RouteDef[] = [{
|
|||
path: '/timeline/antenna/:antennaId',
|
||||
component: page(() => import('@/pages/antenna-timeline.vue')),
|
||||
loginRequired: true,
|
||||
idRequired: userNeedsChecking || !noUserButCheckRequired,
|
||||
idRequired: userNeedsChecking || noUserButCheckRequired,
|
||||
}, {
|
||||
path: '/clicker',
|
||||
component: page(() => import('@/pages/clicker.vue')),
|
||||
|
@ -613,10 +613,10 @@ const routes: RouteDef[] = [{
|
|||
component: page(() => import('@/pages/not-found.vue')),
|
||||
}];
|
||||
|
||||
const isIdConfirmedCheck = userNeedsChecking ? false : true || noUserButCheckRequired ? false : true || userNotVerifiedYet ? false : true;
|
||||
const isIdNotConfirmedCheck = userNeedsChecking || noUserButCheckRequired || userNotVerifiedYet;
|
||||
|
||||
function createRouterImpl(path: string): IRouter {
|
||||
return new Router(routes, path, !!$i, isIdConfirmedCheck, page(() => import('@/pages/not-found.vue')));
|
||||
return new Router(routes, path, !!$i, isIdNotConfirmedCheck, page(() => import('@/pages/not-found.vue')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue