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', path: '/invite/:inviteUuid',
name: 'invite-accept', name: 'invite-accept',
component: () => import('../views/InviteAccept.vue'), component: () => import('../views/InviteAccept.vue'),
meta: { requiresAuth: true },
}, },
{ {
path: '/agents', path: '/agents',

View file

@ -97,6 +97,10 @@ onMounted(async () => {
/> />
</Form.Item> </Form.Item>
<Button type="primary" html-type="submit" block :loading="loading">Login</Button> <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> </Form>
</Card> </Card>
</div> </div>
@ -114,4 +118,10 @@ onMounted(async () => {
max-width: 400px; max-width: 400px;
width: 100%; width: 100%;
} }
.auth-switch {
margin-top: 1rem;
text-align: center;
font-size: 0.875rem;
color: #6b7280;
}
</style> </style>

View file

@ -164,6 +164,10 @@ onMounted(async () => {
</Form.Item> </Form.Item>
<Button type="primary" html-type="submit" block :loading="loading">Register</Button> <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> </Form>
</Card> </Card>
</div> </div>
@ -175,4 +179,10 @@ onMounted(async () => {
margin: 0 auto; margin: 0 auto;
padding: 1rem; padding: 1rem;
} }
.auth-switch {
margin-top: 1rem;
text-align: center;
font-size: 0.875rem;
color: #6b7280;
}
</style> </style>