Nuxt Migration notifications (#265)
* Nuxt Migration notifications * @input to @update:model-value * change field type fixes * @update:model-value * Enable form-block-logic-editor * vue-confetti migration * PR request changes * useAlert in setup
This commit is contained in:
@@ -25,7 +25,7 @@ export default {
|
||||
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (this.isDirty()) {
|
||||
return this.alertConfirm('Changes you made may not be saved. Are you sure want to leave?', () => {
|
||||
return useAlert().confirm('Changes you made may not be saved. Are you sure want to leave?', () => {
|
||||
window.onbeforeunload = null
|
||||
next()
|
||||
}, () => {})
|
||||
|
||||
@@ -30,7 +30,7 @@ import CreateFormBaseModal from '../../../components/pages/forms/create/CreateFo
|
||||
|
||||
// beforeRouteLeave (to, from, next) {
|
||||
// if (this.isDirty()) {
|
||||
// return this.alertConfirm('Changes you made may not be saved. Are you sure want to leave?', () => {
|
||||
// return useAlert().confirm('Changes you made may not be saved. Are you sure want to leave?', () => {
|
||||
// window.onbeforeunload = null
|
||||
// next()
|
||||
// }, () => {})
|
||||
|
||||
@@ -41,14 +41,14 @@ export default {
|
||||
this.loading = true
|
||||
axios.delete('/api/user').then(async (response) => {
|
||||
this.loading = false
|
||||
this.alertSuccess(response.data.message)
|
||||
useAlert().success(response.data.message)
|
||||
// Log out the user.
|
||||
await this.authStore.logout()
|
||||
|
||||
// Redirect to login.
|
||||
this.$router.push({ name: 'login' })
|
||||
}).catch((error) => {
|
||||
this.alertError(error.response.data.message)
|
||||
useAlert().error(error.response.data.message)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
this.workspacesStore.set([])
|
||||
this.$router.push({ name: 'home' })
|
||||
}).catch((error) => {
|
||||
this.alertError(error.response.data.message)
|
||||
useAlert().error(error.response.data.message)
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
const url = response.data.portal_url
|
||||
window.location = url
|
||||
}).catch((error) => {
|
||||
this.alertError(error.response.data.message)
|
||||
useAlert().error(error.response.data.message)
|
||||
}).finally(() => {
|
||||
this.billingLoading = false
|
||||
})
|
||||
|
||||
@@ -169,9 +169,9 @@ export default {
|
||||
.filter(domain => domain && domain.length > 0)
|
||||
}).then((response) => {
|
||||
this.workspacesStore.addOrUpdate(response.data)
|
||||
this.alertSuccess('Custom domains saved.')
|
||||
useAlert().success('Custom domains saved.')
|
||||
}).catch((error) => {
|
||||
this.alertError('Failed to update custom domains: ' + error.response.data.message)
|
||||
useAlert().error('Failed to update custom domains: ' + error.response.data.message)
|
||||
}).finally(() => {
|
||||
this.customDomainsLoading = false
|
||||
})
|
||||
@@ -182,12 +182,12 @@ export default {
|
||||
},
|
||||
deleteWorkspace (workspace) {
|
||||
if (this.workspaces.length <= 1) {
|
||||
this.alertError('You cannot delete your only workspace.')
|
||||
useAlert().error('You cannot delete your only workspace.')
|
||||
return
|
||||
}
|
||||
this.alertConfirm('Do you really want to delete this workspace? All forms created in this workspace will be removed.', () => {
|
||||
useAlert().confirm('Do you really want to delete this workspace? All forms created in this workspace will be removed.', () => {
|
||||
this.workspacesStore.delete(workspace.id).then(() => {
|
||||
this.alertSuccess('Workspace successfully removed.')
|
||||
useAlert().success('Workspace successfully removed.')
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
|
||||
mounted () {
|
||||
this.$router.push({ name: 'pricing' })
|
||||
this.alertError('Unfortunately we could not confirm your subscription. Please try again and contact us if the issue persists.')
|
||||
useAlert().error('Unfortunately we could not confirm your subscription. Please try again and contact us if the issue persists.')
|
||||
},
|
||||
|
||||
computed: {}
|
||||
|
||||
@@ -63,10 +63,10 @@ export default {
|
||||
this.$router.push({ name: 'home' })
|
||||
|
||||
if (this.user.has_enterprise_subscription) {
|
||||
this.alertSuccess('Awesome! Your subscription to OpnForm is now confirmed! You now have access to all Enterprise ' +
|
||||
useAlert().success('Awesome! Your subscription to OpnForm is now confirmed! You now have access to all Enterprise ' +
|
||||
'features. No need to invite your teammates, just ask them to create a OpnForm account and to connect the same Notion workspace. Feel free to contact us if you have any question 🙌')
|
||||
} else {
|
||||
this.alertSuccess('Awesome! Your subscription to OpnForm is now confirmed! You now have access to all Pro ' +
|
||||
useAlert().success('Awesome! Your subscription to OpnForm is now confirmed! You now have access to all Pro ' +
|
||||
'features. Feel free to contact us if you have any question 🙌')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ const copyTemplateUrl = () => {
|
||||
el.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(el)
|
||||
this.alertSuccess('Copied!')
|
||||
useAlert().success('Copied!')
|
||||
}
|
||||
|
||||
// metaTitle() {
|
||||
|
||||
Reference in New Issue
Block a user