Added gateway view for unauthenticated access to secure resources.

This commit is contained in:
Andrew Lalis 2023-10-25 18:53:46 -04:00
parent 035d2cde85
commit 321bad46a7
4 changed files with 68 additions and 2 deletions

View File

@ -0,0 +1,14 @@
<script setup lang="ts">
</script>
<template>
<div>
<h3>Login</h3>
<button>Submit!</button>
</div>
</template>
<style scoped>
</style>

View File

@ -0,0 +1,14 @@
<script setup lang="ts">
</script>
<template>
<div>
<h3>Register</h3>
<button>Register now!!!</button>
</div>
</template>
<style scoped>
</style>

View File

@ -1,13 +1,31 @@
import {createRouter, createWebHistory} from 'vue-router'
import MainView from "@/views/MainView.vue";
import GatewayView from "@/views/GatewayView.vue";
import LoginForm from "@/components/gateway/LoginForm.vue";
import RegisterForm from "@/components/gateway/RegisterForm.vue";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
path: "/",
name: "home",
component: MainView
},
{
path: "/gateway",
name: "gateway",
component: GatewayView,
children: [
{
path: "login",
component: LoginForm
},
{
path: "register",
component: RegisterForm
}
]
}
]
})

View File

@ -0,0 +1,20 @@
<!--
This is a view shown to unauthenticated users before they login or register
to the node. Attempting to access a non-public piece of content or other page
will redirect to the gateway before the user is allowed to view/edit it.
-->
<script setup lang="ts">
</script>
<template>
<main>
<h1>Gateway View</h1>
<RouterView/>
</main>
</template>
<style scoped>
</style>