reticulum-meshchat/src/frontend/main.js

33 lines
1.6 KiB
JavaScript
Raw Normal View History

2024-08-02 18:12:01 +12:00
import { createApp } from 'vue';
2024-08-02 20:17:41 +12:00
import { createRouter, createWebHashHistory } from 'vue-router';
import vClickOutside from "click-outside-vue3";
2024-08-02 18:12:01 +12:00
import App from './components/App.vue';
2024-08-02 20:17:41 +12:00
import AboutPage from "./components/about/AboutPage.vue";
import SettingsPage from "./components/settings/SettingsPage.vue";
2024-08-11 20:41:25 +12:00
import NetworkVisualiserPage from "./components/network-visualiser/NetworkVisualiserPage.vue";
2024-08-05 21:07:25 +12:00
import InterfacesPage from "./components/interfaces/InterfacesPage.vue";
import NomadNetworkPage from "./components/nomadnetwork/NomadNetworkPage.vue";
2024-08-05 23:45:20 +12:00
import MessagesPage from "./components/messages/MessagesPage.vue";
import AddInterfacePage from "./components/interfaces/AddInterfacePage.vue";
2024-08-02 18:12:01 +12:00
2024-08-02 20:17:41 +12:00
const router = createRouter({
history: createWebHashHistory(),
routes: [
2024-08-05 23:47:17 +12:00
{ path: '/', redirect: '/messages' },
2024-08-02 20:17:41 +12:00
{ path: '/about', name: "about", component: AboutPage },
2024-08-05 21:07:25 +12:00
{ path: '/interfaces', name: "interfaces", component: InterfacesPage },
{ path: '/interfaces/add', name: "interfaces.add", component: AddInterfacePage },
{ path: '/interfaces/edit', name: "interfaces.edit", component: AddInterfacePage, props: { interface_name: String } },
2024-08-07 22:00:17 +12:00
{ path: '/messages', name: "messages", component: MessagesPage },
2024-08-02 20:17:41 +12:00
{ path: '/network-visualiser', name: "network-visualiser", component: NetworkVisualiserPage },
2024-08-07 22:00:17 +12:00
{ path: '/nomadnetwork', name: "nomadnetwork", component: NomadNetworkPage },
{ path: '/settings', name: "settings", component: SettingsPage },
2024-08-02 20:17:41 +12:00
],
})
createApp(App)
.use(router)
.use(vClickOutside)
2024-08-02 20:17:41 +12:00
.mount('#app');