mirror of
https://github.com/h44z/wg-portal.git
synced 2025-11-21 16:26:17 +00:00
add IPCalculator View (#557)
* create IPCalculator View + add cidr_tools package * fixed translation and comma separated ip as placeholder
This commit is contained in:
@@ -72,6 +72,14 @@ const router = createRouter({
|
||||
// this generates a separate chunk (About.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import('../views/KeyGeneraterView.vue')
|
||||
},
|
||||
{
|
||||
path: '/ip-calculator',
|
||||
name: 'ip-calculator',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (About.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import('../views/IPCalculatorView.vue')
|
||||
}
|
||||
],
|
||||
linkActiveClass: "active",
|
||||
@@ -122,7 +130,7 @@ router.beforeEach(async (to) => {
|
||||
}
|
||||
|
||||
// redirect to login page if not logged in and trying to access a restricted page
|
||||
const publicPages = ['/', '/login', '/key-generator']
|
||||
const publicPages = ['/', '/login', '/key-generator', '/ip-calculator']
|
||||
const authRequired = !publicPages.includes(to.path)
|
||||
|
||||
if (authRequired && !auth.IsAuthenticated) {
|
||||
|
||||
Reference in New Issue
Block a user