Moved file and add new listings page

This commit is contained in:
QiTao Weng 2022-04-10 04:01:43 -05:00
parent ac4a5e8055
commit cea59cba29
5 changed files with 10 additions and 5 deletions

View File

@ -44,7 +44,7 @@ const login = async () => {
return user.message return user.message
} }
loggedIn() loggedIn()
router.push({ path: '/Editor'}) router.push({ path: '/Listings'})
} }
const register = async () => { const register = async () => {
@ -61,12 +61,12 @@ const register = async () => {
return user.message return user.message
} }
loggedIn() loggedIn()
router.push({ path: '/Editor'}) router.push({ path: '/Listings'})
} }
onMounted(() => { onMounted(() => {
if ( checkLoggedIn() ) { if ( checkLoggedIn() ) {
router.push({ path: '/Editor'}) router.push({ path: '/Listings'})
} }
}) })

View File

@ -3,7 +3,7 @@ import * as math from 'mathjs'
import {onMounted, ref} from 'vue' import {onMounted, ref} from 'vue'
import {MathStatement} from '../support/parse' import {MathStatement} from '../support/parse'
import {v4 as uuidv4} from 'uuid' import {v4 as uuidv4} from 'uuid'
import Katex from '../components/Katex.vue' import Katex from './Katex.vue'
import {ChartBox, StatementID} from '../support/types' import {ChartBox, StatementID} from '../support/types'
import {MathPage} from '../support/page' import {MathPage} from '../support/page'

View File

@ -13,7 +13,7 @@ import ImageBox from '../components/ImageBox.vue'
import FunctionEditor from '../components/FunctionEditor.vue' import FunctionEditor from '../components/FunctionEditor.vue'
import { RichTextBox, ImageContainer } from '../support/types' import { RichTextBox, ImageContainer } from '../support/types'
import RangeChart from '../components/RangeChart.vue' import RangeChart from '../components/RangeChart.vue'
import RangeChartEditor from './RangeChartEditor.vue' import RangeChartEditor from '../components/RangeChartEditor.vue'
import { stepX, stepY } from '../support/const' import { stepX, stepY } from '../support/const'
import { checkLoggedIn, loggedOut } from '../support/auth' import { checkLoggedIn, loggedOut } from '../support/auth'
import router from '../router' import router from '../router'

0
src/pages/Listings.vue Normal file
View File

View File

@ -17,6 +17,11 @@ const routes = [
name: 'Editor', name: 'Editor',
component: () => import(/* webpackChunkName: "Editor" */ './pages/Editor.vue'), component: () => import(/* webpackChunkName: "Editor" */ './pages/Editor.vue'),
}, },
{
path: '/listings',
name: 'Listings',
component: () => import(/* webpackChunkName: "Listings" */ './pages/Listings.vue'),
},
] ]