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:
@@ -157,7 +157,8 @@ export default {
|
||||
const formsStore = useFormsStore()
|
||||
return {
|
||||
formsStore,
|
||||
user: computed(() => authStore.user)
|
||||
user: computed(() => authStore.user),
|
||||
useAlert: useAlert()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -180,7 +181,7 @@ export default {
|
||||
el.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(el)
|
||||
this.alertSuccess('Copied!')
|
||||
this.useAlert.success('Copied!')
|
||||
},
|
||||
duplicateForm () {
|
||||
if (this.loadingDuplicate) return
|
||||
@@ -188,7 +189,7 @@ export default {
|
||||
opnFetch(this.formEndpoint.replace('{id}', this.form.id) + '/duplicate',{method: 'POST'}).then((data) => {
|
||||
this.formsStore.save(data.new_form)
|
||||
this.$router.push({ name: 'forms-show', params: { slug: data.new_form.slug } })
|
||||
this.alertSuccess('Form was successfully duplicated.')
|
||||
this.useAlert.success('Form was successfully duplicated.')
|
||||
this.loadingDuplicate = false
|
||||
})
|
||||
},
|
||||
@@ -198,7 +199,7 @@ export default {
|
||||
opnFetch(this.formEndpoint.replace('{id}', this.form.id),{method:'DELETE'}).then(() => {
|
||||
this.formsStore.remove(this.form)
|
||||
this.$router.push({ name: 'home' })
|
||||
this.alertSuccess('Form was deleted.')
|
||||
this.useAlert.success('Form was deleted.')
|
||||
this.loadingDelete = false
|
||||
})
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
axios.put(this.formEndpoint.replace('{id}', this.form.id) + '/regenerate-link/' + option).then((response) => {
|
||||
this.formsStore.addOrUpdate(response.data.form)
|
||||
this.$router.push({name: 'forms-slug-show-share', params: {slug: response.data.form.slug}})
|
||||
this.alertSuccess(response.data.message)
|
||||
useAlert().success(response.data.message)
|
||||
this.loadingNewLink = false
|
||||
}).finally(() => {
|
||||
this.showGenerateFormLinkModal = false
|
||||
|
||||
Reference in New Issue
Block a user