Fix sentry tracked issues
This commit is contained in:
@@ -130,7 +130,7 @@ export default {
|
||||
}) ?? null
|
||||
},
|
||||
onInput (event) {
|
||||
this.inputVal = event.target.value.replace(/[^0-9]/g, '')
|
||||
this.inputVal = event?.target?.value.replace(/[^0-9]/g, '')
|
||||
},
|
||||
onChangeCountryCode () {
|
||||
if (!this.selectedCountryCode && this.countries.length > 0) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<editor-options-panel name="Link Settings - SEO" :already-opened="false" :has-pro-tag="true">
|
||||
<template #icon>
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"
|
||||
/>
|
||||
@@ -10,7 +11,8 @@
|
||||
<p class="mt-4 text-gray-500 text-sm">
|
||||
Customize the link, images and text that appear when you share your form on other sites (Open Graph).
|
||||
</p>
|
||||
<select-input v-if="customDomainAllowed" v-model="form.custom_domain" :disabled="customDomainOptions.length <= 0" :options="customDomainOptions" name="type"
|
||||
<select-input v-if="customDomainAllowed" v-model="form.custom_domain" :disabled="customDomainOptions.length <= 0"
|
||||
:options="customDomainOptions" name="type"
|
||||
class="mt-4" label="Form Domain" placeholder="yourdomain.com"
|
||||
/>
|
||||
<text-input v-model="form.seo_meta.page_title" name="page_title" class="mt-4"
|
||||
@@ -26,50 +28,49 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useWorkingFormStore } from '../../../../../stores/working_form'
|
||||
import {useWorkingFormStore} from '../../../../../stores/working_form'
|
||||
import EditorOptionsPanel from '../../../editors/EditorOptionsPanel.vue'
|
||||
|
||||
export default {
|
||||
components: { EditorOptionsPanel },
|
||||
components: {EditorOptionsPanel},
|
||||
props: {},
|
||||
setup () {
|
||||
setup() {
|
||||
const workingFormStore = useWorkingFormStore()
|
||||
return {
|
||||
workspacesStore: useWorkspacesStore(),
|
||||
workingFormStore
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
form: {
|
||||
get () {
|
||||
get() {
|
||||
return this.workingFormStore.content
|
||||
},
|
||||
/* We add a setter */
|
||||
set (value) {
|
||||
set(value) {
|
||||
this.workingFormStore.set(value)
|
||||
}
|
||||
},
|
||||
workspace () {
|
||||
workspace() {
|
||||
return this.workspacesStore.getCurrent
|
||||
},
|
||||
customDomainOptions () {
|
||||
return this.workspace.custom_domains.map((domain) => {
|
||||
customDomainOptions() {
|
||||
return this.workspace.custom_domains ? this.workspace.custom_domains.map((domain) => {
|
||||
return {
|
||||
name: domain,
|
||||
value: domain
|
||||
}
|
||||
})
|
||||
}) : []
|
||||
},
|
||||
customDomainAllowed () {
|
||||
customDomainAllowed() {
|
||||
return useRuntimeConfig().public.customDomainsEnabled
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
mounted () {
|
||||
mounted() {
|
||||
['page_title', 'page_description', 'page_thumbnail'].forEach((keyname) => {
|
||||
if (this.form.seo_meta[keyname] === undefined) {
|
||||
this.form.seo_meta[keyname] = null
|
||||
|
||||
@@ -38,14 +38,14 @@ export default {
|
||||
|
||||
computed: {
|
||||
parsedFiles() {
|
||||
return this.value.map((file) => {
|
||||
return this.value ? this.value.map((file) => {
|
||||
return {
|
||||
file_name: file.file_name,
|
||||
file_url: file.file_url,
|
||||
displayed_file_name: this.displayedFileName(file.file_name),
|
||||
is_image: !this.failedImages.includes(file.file_url) && this.isImage(file.file_name)
|
||||
}
|
||||
})
|
||||
}): []
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<forgot-password-modal :show="showForgotModal" @close="showForgotModal=false" />
|
||||
<forgot-password-modal :show="showForgotModal" @close="showForgotModal=false"/>
|
||||
|
||||
<form class="mt-4" @submit.prevent="login" @keydown="form.onKeydown($event)">
|
||||
<!-- Email -->
|
||||
<text-input name="email" :form="form" label="Email" :required="true" placeholder="Your email address" />
|
||||
<text-input name="email" :form="form" label="Email" :required="true" placeholder="Your email address"/>
|
||||
|
||||
<!-- Password -->
|
||||
<text-input native-type="password" placeholder="Your password"
|
||||
@@ -18,7 +18,8 @@
|
||||
</v-checkbox>
|
||||
|
||||
<div class="w-full md:w-1/2 text-right">
|
||||
<a href="#" class="text-xs hover:underline text-gray-500 sm:text-sm hover:text-gray-700" @click.prevent="showForgotModal=true">
|
||||
<a href="#" class="text-xs hover:underline text-gray-500 sm:text-sm hover:text-gray-700"
|
||||
@click.prevent="showForgotModal=true">
|
||||
Forgot your password?
|
||||
</a>
|
||||
</div>
|
||||
@@ -58,7 +59,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
setup () {
|
||||
setup() {
|
||||
return {
|
||||
authStore: useAuthStore(),
|
||||
formsStore: useFormsStore(),
|
||||
@@ -76,27 +77,29 @@ export default {
|
||||
}),
|
||||
|
||||
methods: {
|
||||
async login () {
|
||||
login() {
|
||||
// Submit the form.
|
||||
const data = await this.form.post('login')
|
||||
this.form.post('login').then(async (data) => {
|
||||
// Save the token.
|
||||
this.authStore.setToken(data.token)
|
||||
|
||||
// Save the token.
|
||||
this.authStore.setToken(data.token)
|
||||
const userData = await opnFetch('user')
|
||||
this.authStore.setUser(userData)
|
||||
|
||||
const userData = await opnFetch('user')
|
||||
this.authStore.setUser(userData)
|
||||
const workspaces = await fetchAllWorkspaces()
|
||||
this.workspaceStore.set(workspaces.data.value)
|
||||
|
||||
const workspaces = await fetchAllWorkspaces()
|
||||
this.workspaceStore.set(workspaces.data.value)
|
||||
// Load forms
|
||||
this.formsStore.loadAll(this.workspaceStore.currentId)
|
||||
|
||||
// Load forms
|
||||
this.formsStore.loadAll(this.workspaceStore.currentId)
|
||||
// Redirect home.
|
||||
this.redirect()
|
||||
}).catch(() => {
|
||||
|
||||
// Redirect home.
|
||||
this.redirect()
|
||||
})
|
||||
},
|
||||
|
||||
redirect () {
|
||||
redirect() {
|
||||
if (this.isQuick) {
|
||||
this.$emit('afterQuickLogin')
|
||||
return
|
||||
@@ -106,10 +109,10 @@ export default {
|
||||
const router = useRouter()
|
||||
|
||||
if (intendedUrlCookie.value) {
|
||||
router.push({ path: intendedUrlCookie.value })
|
||||
router.push({path: intendedUrlCookie.value})
|
||||
useCookie('intended_url').value = null
|
||||
} else {
|
||||
router.push({ name: 'home' })
|
||||
router.push({name: 'home'})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
if (this.loadingNewLink) return
|
||||
this.loadingNewLink = true
|
||||
opnFetch(this.formEndpoint.replace('{id}', this.form.id) + '/regenerate-link/' + option, {method:'PUT'}).then((data) => {
|
||||
this.formsStore.addOrUpdate(data.form)
|
||||
this.formsStore.save(data.form)
|
||||
this.$router.push({name: 'forms-slug-show-share', params: {slug: data.form.slug}})
|
||||
useAlert().success(data.message)
|
||||
this.loadingNewLink = false
|
||||
|
||||
Reference in New Issue
Block a user