Many an update!
This commit is contained in:
parent
85195d6c7a
commit
d588c49946
35 changed files with 3528 additions and 1142 deletions
30
app/composables/useLoginModal.js
Normal file
30
app/composables/useLoginModal.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
export const useLoginModal = () => {
|
||||
const showLoginModal = useState('loginModal.show', () => false)
|
||||
const loginModalOptions = useState('loginModal.options', () => ({
|
||||
title: 'Sign in to continue',
|
||||
description: 'Enter your email to receive a secure login link',
|
||||
dismissible: true,
|
||||
redirectTo: null,
|
||||
}))
|
||||
|
||||
const openLoginModal = (options = {}) => {
|
||||
loginModalOptions.value = {
|
||||
title: options.title || 'Sign in to continue',
|
||||
description: options.description || 'Enter your email to receive a secure login link',
|
||||
dismissible: options.dismissible !== false,
|
||||
redirectTo: options.redirectTo || null,
|
||||
}
|
||||
showLoginModal.value = true
|
||||
}
|
||||
|
||||
const hideLoginModal = () => {
|
||||
showLoginModal.value = false
|
||||
}
|
||||
|
||||
return {
|
||||
showLoginModal: readonly(showLoginModal),
|
||||
loginModalOptions: readonly(loginModalOptions),
|
||||
openLoginModal,
|
||||
hideLoginModal,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue