58 lines
1.5 KiB
JavaScript
Raw Normal View History

2023-11-04 00:27:28 +01:00
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import * as VueRouter from 'vue-router'
2023-11-04 00:27:28 +01:00
import App from './App.vue'
import './registerServiceWorker'
import './index.css'
2023-11-04 00:27:28 +01:00
2023-11-20 00:31:49 +01:00
import HomeView from '@/views/HomeView'
2023-11-08 01:19:52 +01:00
import LoginView from '@/views/LoginView'
import UserView from '@/views/UserView'
2023-11-08 23:52:28 +01:00
import MarketView from '@/views/MarketView'
2023-11-09 03:02:03 +01:00
import InvoiceView from '@/views/InvoiceView'
2023-11-26 22:37:06 +01:00
import UserSettings from '@/components/UserSettings'
2023-11-26 22:07:56 +01:00
import UserInvoices from '@/components/UserInvoices'
2023-11-27 00:21:09 +01:00
import UserOrders from '@/components/UserOrders'
2023-11-27 00:59:15 +01:00
import OrderForm from '@/components/OrderForm'
import MarketOrders from '@/components/MarketOrders'
const routes = [
{
2023-11-20 00:31:49 +01:00
path: '/', component: HomeView
},
{
path: '/login', component: LoginView
2023-11-07 09:48:01 +01:00
},
{
2023-11-26 22:07:56 +01:00
path: '/user',
component: UserView,
children: [
2023-11-26 22:37:06 +01:00
{ path: 'settings', name: 'user', component: UserSettings },
2023-11-27 00:21:09 +01:00
{ path: 'invoices', name: 'invoices', component: UserInvoices },
{ path: 'orders', name: 'orders', component: UserOrders }
2023-11-26 22:07:56 +01:00
]
2023-11-08 23:52:28 +01:00
},
{
2023-11-27 00:59:15 +01:00
path: '/market/:id',
component: MarketView,
children: [
{ path: 'form', name: 'form', component: OrderForm },
{ path: 'orders', name: 'market-orders', component: MarketOrders }
]
2023-11-09 03:02:03 +01:00
},
{
path: '/invoice/:id', component: InvoiceView
}
]
const router = VueRouter.createRouter({
history: VueRouter.createWebHashHistory(),
routes
})
const pinia = createPinia()
const app = createApp(App)
app.use(router)
app.use(pinia)
app.mount('#app')