index.js 7.71 KB
import Vue from 'vue'
import Router from 'vue-router'
import { authGuard } from "../auth/authGuard"
import LandingPage from '@/components/LandingPage'
import SignUp from '@/components/SignUp'
import Reset from '@/components/Reset'
import Profile from '@/components/Profile'
import welcome from '@/components/welcome'
import Intermediate from '@/components/Intermediate'
import Insight from '@/components/Insight'
import ProductInsight from '@/components/ProductInsight'
import EpisodeIntro from '@/components/EpisodeIntro'
import AuthorIntro from '@/components/AuthorIntro'
import AuthorReadingNow from '@/components/AuthorReadingNow'
import SingleAuthor from '@/components/SingleAuthor'
import Outro from '@/components/Outro'
import SingleMobileInsight from '@/components/SingleMobileInsight'
import TwoScreenWithoutInsight from '@/components/TwoScreenWithoutInsight'
import SingleMobileScreenInsightOne from '@/components/SingleMobileScreenInsightOne'
import SingleWebScreenInsightOne from '@/components/SingleWebScreenInsightOne'
import SingleMobileScreenInsightTwo from '@/components/SingleMobileScreenInsightTwo'
import SingleScreengrabOneInsight from '@/components/SingleScreengrabOneInsight'
import TwoScreenWithInsight from '@/components/TwoScreenWithInsight'
import TwoScreengrabWithComments from '@/components/TwoScreengrabWithComments'
import TwoWebScreenWithInsight from '@/components/TwoWebScreenWithInsight'
import NoScreenshotSingleAuthor from '@/components/NoScreenshotSingleAuthor'
import TwoAuthor from '@/components/TwoAuthor'
import TwoAuthorDesktop from '@/components/TwoAuthorDesktop'
import TwoAuthorReadingNow from '@/components/TwoAuthorReadingNow'
import SingleMobileScreenChatComments from '@/components/SingleMobileScreenChatComments'
import TwoScreensWithTwoAuthor from '@/components/TwoScreensWithTwoAuthor'
import NoScreenshotTwoAuthor from '@/components/NoScreenshotTwoAuthor'
import ToAddYourComment from '@/components/ToAddYourComment'
import ReadingFlowBounceBoard from '@/components/ReadingFlowBounceBoard'
import ReadingFlowBounceBoard_chat from '@/components/ReadingFlowBounceBoard_chat'
import Otp from '@/components/Otp'
import ChangePassword from '@/components/ChangePassword'

import router from '../router'
Vue.use(Router)

export default new Router({
    mode: 'history',
    routes: [{
            path: '/',
            name: 'LandingPage',
            component: LandingPage,
            // beforeEnter: function(to, from, next) {
            //     var userdata = localStorage.getItem('spotlight_usertoken')
            //     if (userdata) {
            //         router.push({ name: 'Welcome' })
            //     }
            //     next()
            // }
        },
        {
            path: '/signup',
            name: 'SignUp',
            component: SignUp,
        },
        {
            path: '/intermediate',
            name: 'Intermediate',
            component: Intermediate
        },
        {
            path: '/reset',
            name: 'Reset',
            component: Reset,
        },
        {
            path: '/profile',
            name: 'Profile',
            component: Profile,
        },
        {
            path: '/insight',
            name: 'Insight',
            component: Insight,
        },
        {
            path: '/product-insight',
            name: 'ProductInsight',
            component: ProductInsight,
        },
        {
            path: '/episode-intro/:caseStudyId/:slideId',
            name: 'EpisodeIntro',
            component: EpisodeIntro,
        },
        ,
        {
            path: '/author-intro/:caseStudyId/:slideId',
            name: 'AuthorIntro',
            component: AuthorIntro,
        },
        {
            path: '/author-reading-now',
            name: 'AuthorReadingNow',
            component: AuthorReadingNow,
        },
        {
            path: '/single-author',
            name: 'SingleAuthor',
            component: SingleAuthor,
        },
        {
            path: '/outro/:caseStudyId/:slideId',
            name: 'Outro',
            component: Outro,
        },
        {
            path: '/single-mobile-insight',
            name: 'SingleMobileInsight',
            component: SingleMobileInsight,
        },
        {
            path: '/two-screen-without-insight',
            name: 'TwoScreenWithoutInsight',
            component: TwoScreenWithoutInsight,
        },
        {
            path: '/single-m-screen-insight-one/:caseStudyId/:slideId',
            name: 'SingleMobileScreenInsightOne',
            component: SingleMobileScreenInsightOne,
        },
        {
            path: '/single-m-screen-insight-two/:caseStudyId/:slideId',
            name: 'SingleMobileScreenInsightTwo',
            component: SingleMobileScreenInsightTwo,
        },
        {
            path: '/single-web-screen-insight-one',
            name: 'SingleWebScreenInsightOne',
            component: SingleWebScreenInsightOne,
        },
        {
            path: '/single-screengrab-one-insight',
            name: 'SingleScreengrabOneInsight',
            component: SingleScreengrabOneInsight,
        },
        {
            path: '/two-screen-with-insight',
            name: 'TwoScreenWithInsight',
            component: TwoScreenWithInsight,
        },
        {
            path: '/two-screengrab-with-comments',
            name: 'TwoScreengrabWithComments',
            component: TwoScreengrabWithComments,
        },
        {
            path: '/two-webscreen-with-insight',
            name: 'TwoWebScreenWithInsight',
            component: TwoWebScreenWithInsight,
        },
        {
            path: '/noscreenshot-single-author/:caseStudyId/:slideId',
            name: 'NoScreenshotSingleAuthor',
            component: NoScreenshotSingleAuthor,
        },
        {
            path: '/two-author-intro',
            name: 'TwoAuthor',
            component: TwoAuthor,
        },
        {
            path: '/two-author-desktop',
            name: 'TwoAuthorDesktop',
            component: TwoAuthorDesktop,
        },
        {
            path: '/two-author-reading-now',
            name: 'TwoAuthorReadingNow',
            component: TwoAuthorReadingNow,
        },
        {
            path: '/single-mobile-screen-chat-comments',
            name: 'SingleMobileScreenChatComments',
            component: SingleMobileScreenChatComments,
        },
        {
            path: '/two-screen-with-two-author',
            name: 'TwoScreensWithTwoAuthor',
            component: TwoScreensWithTwoAuthor,
        },
        {
            path: '/no-screenshot-two-author',
            name: 'NoScreenshotTwoAuthor',
            component: NoScreenshotTwoAuthor,
        },
        {
            path: '/to-add-your-comment',
            name: 'ToAddYourComment',
            component: ToAddYourComment,
        },
        {
            path: '/reading-flow-bounce-board',
            name: 'ReadingFlowBounceBoard',
            component: ReadingFlowBounceBoard,
        },
        {
            path: '/reading-flow-bounce-board-chat',
            name: 'ReadingFlowBounceBoard_chat',
            component: ReadingFlowBounceBoard_chat,
        },            
        {
            path: '/otp/:flag',
            name: 'Otp',
            component: Otp,
        },               
        {
            path: '/changepassword',
            name: 'ChangePassword',
            component: ChangePassword,
        }               
        
        
        
    ],
    scrollBehavior(to, from, savedPosition) {
        this.seen = false
        return { x: 0, y: 0 }
    }
})