Ensured users are logged in for using invites

This commit is contained in:
Viswamedha Nalabotu 2026-03-18 01:08:28 +00:00
parent 9085de6732
commit 64f2fa012e
3 changed files with 21 additions and 0 deletions

View file

@ -54,6 +54,7 @@ const router = createRouter({
path: '/invite/:inviteUuid',
name: 'invite-accept',
component: () => import('../views/InviteAccept.vue'),
meta: { requiresAuth: true },
},
{
path: '/agents',

View file

@ -97,6 +97,10 @@ onMounted(async () => {
/>
</Form.Item>
<Button type="primary" html-type="submit" block :loading="loading">Login</Button>
<div class="auth-switch">
Don't have an account?
<a @click="router.push({ path: '/register', query: route.query })">Register</a>
</div>
</Form>
</Card>
</div>
@ -114,4 +118,10 @@ onMounted(async () => {
max-width: 400px;
width: 100%;
}
.auth-switch {
margin-top: 1rem;
text-align: center;
font-size: 0.875rem;
color: #6b7280;
}
</style>

View file

@ -164,6 +164,10 @@ onMounted(async () => {
</Form.Item>
<Button type="primary" html-type="submit" block :loading="loading">Register</Button>
<div class="auth-switch">
Already have an account?
<a @click="router.push({ path: '/login', query: route.query })">Login</a>
</div>
</Form>
</Card>
</div>
@ -175,4 +179,10 @@ onMounted(async () => {
margin: 0 auto;
padding: 1rem;
}
.auth-switch {
margin-top: 1rem;
text-align: center;
font-size: 0.875rem;
color: #6b7280;
}
</style>