2020-02-02 22:42:18 +00:00
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from "vue";
|
|
|
|
import VueRouter, {
|
|
|
|
RouteConfig,
|
|
|
|
RouterOptions,
|
|
|
|
RouterMode,
|
|
|
|
NavigationGuard
|
|
|
|
} from "vue-router";
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
// Views
|
|
|
|
import Home from "../views/home.vue";
|
|
|
|
import Settings from "../views/settings.vue";
|
2020-04-12 14:25:42 +00:00
|
|
|
import Call from "../views/call.vue";
|
|
|
|
import ChildProfile from "../views/child_profile.vue";
|
2020-02-02 22:42:18 +00:00
|
|
|
|
2020-04-29 23:45:50 +00:00
|
|
|
// Call Views
|
|
|
|
import CallLobby from "../views/call_views/Lobby.vue";
|
|
|
|
import CallBook from "../views/call_views/Book.vue";
|
|
|
|
|
2020-02-02 22:42:18 +00:00
|
|
|
const routes: RouteConfig[] = [
|
|
|
|
/** Define Application Routes */
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
component: Home,
|
|
|
|
name: "root"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/settings",
|
|
|
|
component: Settings
|
|
|
|
},
|
|
|
|
{
|
2020-04-12 14:25:42 +00:00
|
|
|
path: "/call/:id",
|
2020-04-29 23:45:50 +00:00
|
|
|
component: Call,
|
|
|
|
children: [
|
|
|
|
{ path: "", component: CallLobby, name: "lobby" },
|
|
|
|
{ path: "book", component: CallBook, name: "book" }
|
|
|
|
]
|
2020-04-12 14:25:42 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/child/:id",
|
|
|
|
component: ChildProfile
|
2020-03-17 22:16:34 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "*",
|
|
|
|
redirect: { name: "root" }
|
2020-02-02 22:42:18 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const AppRouter = new VueRouter({ routes, mode: "history" });
|
|
|
|
|
|
|
|
export default AppRouter;
|
|
|
|
</script>
|