Skip to content

Commit

Permalink
πŸ— : init frontend structure and routes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubuisson committed Apr 9, 2020
1 parent ae1225d commit 8d0a71c
Show file tree
Hide file tree
Showing 49 changed files with 8,598 additions and 12 deletions.
39 changes: 36 additions & 3 deletions src/main/client/app/app-routes.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
import Vue from 'vue';
import Router from 'vue-router';

import { loginRoutes } from './pages/login';
import { dashboardRoutes } from './pages/dashboard';
import { modulesRoutes } from './pages/modules';
import { stacksRoutes } from './pages/stacks';
import { jobsRoutes } from './pages/jobs';
import { settingsRoutes } from './pages/settings';
import { usersRoutes } from './pages/users';

import { AppPageNotFound } from './shared/components';
import { isUserAuthenticated } from './shared/services';

Vue.use(Router);

const appRoutes = [];
const appRoutes = [
{
path: '/',
name: 'home',
redirect: '/dashboard',
beforeEnter: isUserAuthenticated,
},
{
path: '*',
name: 'page-not-found',
component: AppPageNotFound,
beforeEnter: isUserAuthenticated,
},
];

export default new Router({
mode: 'history',
routes: [...appRoutes],
mode: 'history',
routes: [
...loginRoutes,
...dashboardRoutes,
...modulesRoutes,
...stacksRoutes,
...jobsRoutes,
...settingsRoutes,
...usersRoutes,
...appRoutes,
],
});
18 changes: 11 additions & 7 deletions src/main/client/app/app.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<template>
<div id="app">
<router-view />
</div>
<div id="app">
<router-view />
</div>
</template>

<style>
/* vendor css */
@import '~bootstrap/dist/css/bootstrap.min.css';
@import '~bootstrap-vue/dist/bootstrap-vue.min.css';
@import '~vue-multiselect/dist/vue-multiselect.min.css';
/* vendor css */
@import '~bootstrap/dist/css/bootstrap.min.css';
@import '~bootstrap-vue/dist/bootstrap-vue.min.css';
@import '~vue-multiselect/dist/vue-multiselect.min.css';
/* application css */
@import "./assets/css/style.css";
@import "./assets/css/color_2.css";
@import "./assets/css/responsive.css";
</style>
Loading

0 comments on commit 8d0a71c

Please sign in to comment.