2020-04-25 18:43:17 +02:00
|
|
|
import Vue from 'vue'
|
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
import Home from './routes/Home.vue'
|
2020-04-27 00:39:40 +02:00
|
|
|
import TokenGenerator from "./routes/tools/TokenGenerator";
|
|
|
|
import Hash from "./routes/tools/Hash";
|
|
|
|
import DateConverter from "./routes/tools/DateConverter";
|
|
|
|
import UrlEncoder from "./routes/tools/UrlEncoder";
|
|
|
|
import FileToBase64 from "./routes/tools/FileToBase64";
|
2020-05-31 23:33:19 +02:00
|
|
|
import TextCypher from "./routes/tools/TextCypher";
|
2020-04-25 18:43:17 +02:00
|
|
|
|
|
|
|
Vue.use(VueRouter)
|
|
|
|
|
2020-05-15 12:27:18 +02:00
|
|
|
const toolsRoutes = [
|
2020-04-25 18:43:17 +02:00
|
|
|
{
|
|
|
|
path: '/token-generator',
|
|
|
|
component: TokenGenerator
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/hash',
|
|
|
|
component: Hash
|
|
|
|
},
|
2020-04-25 21:05:40 +02:00
|
|
|
{
|
|
|
|
path: '/date-converter',
|
|
|
|
component: DateConverter
|
|
|
|
},
|
2020-04-27 00:39:40 +02:00
|
|
|
{
|
|
|
|
path: '/url-encoder',
|
|
|
|
component: UrlEncoder
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/file-to-base64',
|
|
|
|
component: FileToBase64
|
2020-05-31 23:33:19 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/cypher',
|
|
|
|
component: TextCypher
|
2020-05-15 12:27:18 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
...toolsRoutes,
|
|
|
|
{
|
|
|
|
path: '/',
|
|
|
|
component: Home
|
2020-04-27 00:39:40 +02:00
|
|
|
},
|
2020-04-25 18:43:17 +02:00
|
|
|
{
|
|
|
|
path: '/about',
|
|
|
|
name: 'About',
|
|
|
|
component: () => import('./routes/About.vue')
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
|
mode: 'history',
|
|
|
|
base: process.env.BASE_URL,
|
|
|
|
routes
|
2020-05-15 12:27:18 +02:00
|
|
|
});
|
2020-04-25 18:43:17 +02:00
|
|
|
|
2020-05-15 12:27:18 +02:00
|
|
|
export default router;
|
|
|
|
export {
|
|
|
|
routes,
|
|
|
|
toolsRoutes
|
|
|
|
};
|