mirror of
https://github.com/Luzifer/ots.git
synced 2024-12-18 03:54:38 -05:00
8c0807d486
Signed-off-by: Knut Ahlers <knut@ahlers.me>
46 lines
1.0 KiB
JavaScript
46 lines
1.0 KiB
JavaScript
import AppCreate from './components/create.vue'
|
|
import AppDisplayURL from './components/display-url.vue'
|
|
import AppExplanation from './components/explanation.vue'
|
|
import AppSecretDisplay from './components/secret-display.vue'
|
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
const routes = [
|
|
{
|
|
component: AppCreate,
|
|
name: 'create',
|
|
path: '/',
|
|
},
|
|
{
|
|
component: AppDisplayURL,
|
|
name: 'display-secret-url',
|
|
path: '/display-secret-url',
|
|
props: route => ({
|
|
expiresAt: route.query.expiresAt ? new Date(route.query.expiresAt) : null,
|
|
secretId: route.query.secretId,
|
|
securePassword: route.query.securePassword,
|
|
}),
|
|
},
|
|
{
|
|
component: AppExplanation,
|
|
name: 'explanation',
|
|
path: '/explanation',
|
|
},
|
|
{
|
|
component: AppSecretDisplay,
|
|
name: 'secret',
|
|
path: '/secret',
|
|
props: route => ({
|
|
secretId: route.query.secretId,
|
|
securePassword: route.query.securePassword,
|
|
}),
|
|
},
|
|
]
|
|
|
|
const router = new VueRouter({
|
|
mode: 'abstract',
|
|
routes,
|
|
})
|
|
|
|
export default router
|