feat: add parent PIN setup functionality and email notifications
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 23s
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 23s
- Implemented User model updates to include PIN and related fields. - Created email sender utility for sending verification and reset emails. - Developed ParentPinSetup component for setting up a parent PIN with verification code. - Enhanced UserProfile and EntityEditForm components to support new features. - Updated routing to include PIN setup and authentication checks. - Added styles for new components and improved existing styles for consistency. - Introduced loading states and error handling in various components.
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
import { ref } from 'vue'
|
||||
import { ref, watch } from 'vue'
|
||||
|
||||
export const isParentAuthenticated = ref(false)
|
||||
export const isParentAuthenticated = ref(localStorage.getItem('isParentAuthenticated') === 'true')
|
||||
export const isUserLoggedIn = ref(false)
|
||||
export const isAuthReady = ref(false)
|
||||
export const currentUserId = ref('')
|
||||
|
||||
watch(isParentAuthenticated, (val) => {
|
||||
localStorage.setItem('isParentAuthenticated', val ? 'true' : 'false')
|
||||
})
|
||||
|
||||
export function authenticateParent() {
|
||||
isParentAuthenticated.value = true
|
||||
}
|
||||
|
||||
export function logoutParent() {
|
||||
isParentAuthenticated.value = false
|
||||
localStorage.removeItem('isParentAuthenticated')
|
||||
}
|
||||
|
||||
export function loginUser() {
|
||||
|
||||
Reference in New Issue
Block a user