Commit 000b65d 1 parent 0c88c98 commit 000b65d Copy full SHA for 000b65d
File tree 2 files changed +43
-3
lines changed
components/pages/forms/show
2 files changed +43
-3
lines changed Original file line number Diff line number Diff line change 24
24
</svg >
25
25
</v-button >
26
26
</template >
27
- <a v-if =" isMainPage && user" v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" :href =" form.share_url"
27
+ <span v-if =" form.visibility === 'draft'"
28
+ class =" block px-4 py-2 text-md text-gray-700 cursor-pointer dark:text-white hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
29
+ @click =" showDraftFormWarningNotification"
30
+ >
31
+ <svg class =" w-4 h-4 mr-2" viewBox =" 0 0 24 24" fill =" none"
32
+ xmlns =" http://www.w3.org/2000/svg"
33
+ >
34
+ <path d =" M1 12C1 12 5 4 12 4C19 4 23 12 23 12C23 12 19 20 12 20C5 20 1 12 1 12Z"
35
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
36
+ />
37
+ <path
38
+ d =" M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z"
39
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
40
+ />
41
+ </svg >
42
+ View form
43
+ </span >
44
+
45
+ <a v-else-if =" isMainPage && user" v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" :href =" form.share_url"
28
46
target =" _blank"
29
47
class =" block px-4 py-2 text-md text-gray-700 dark:text-white hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
30
48
>
133
151
</div >
134
152
</div >
135
153
</modal >
136
-
137
154
<form-template-modal v-if =" !isMainPage && user" :form =" form" :show =" showFormTemplateModal" @close =" showFormTemplateModal=false" />
138
155
</div >
139
156
</template >
@@ -185,4 +202,8 @@ const deleteForm = () => {
185
202
loadingDelete .value = false
186
203
})
187
204
}
205
+
206
+ const showDraftFormWarningNotification = () => {
207
+ useAlert ().warning (' This form is currently in Draft mode and is not publicly accessible, You can change the form status on the edit form page.' )
208
+ }
188
209
</script >
Original file line number Diff line number Diff line change 22
22
<div class =" flex" >
23
23
<extra-menu class =" mr-2" :form =" form" />
24
24
25
- <v-button v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" target =" _blank"
25
+ <v-button v-if =" form.visibility === 'draft'" color =" white"
26
+ class =" mr-2 text-blue-600 hidden sm:block" @click =" showDraftFormWarningNotification"
27
+ >
28
+ <svg class =" w-6 h-6 inline -mt-1" viewBox =" 0 0 24 24" fill =" none"
29
+ xmlns =" http://www.w3.org/2000/svg"
30
+ >
31
+ <path d =" M1 12C1 12 5 4 12 4C19 4 23 12 23 12C23 12 19 20 12 20C5 20 1 12 1 12Z"
32
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
33
+ />
34
+ <path
35
+ d =" M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z"
36
+ stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round"
37
+ />
38
+ </svg >
39
+ </v-button >
40
+ <v-button v-else v-track.view_form_click =" {form_id:form.id, form_slug:form.slug}" target =" _blank"
26
41
:href =" form.share_url" color =" white"
27
42
class =" mr-2 text-blue-600 hidden sm:block"
28
43
>
@@ -196,4 +211,8 @@ watch(() => form?.value?.id, (id) => {
196
211
const goBack = () => {
197
212
useRouter ().push ({name: ' home' })
198
213
}
214
+
215
+ const showDraftFormWarningNotification = () => {
216
+ useAlert ().warning (' This form is currently in Draft mode and is not publicly accessible, You can change the form status on the edit form page.' )
217
+ }
199
218
< / script>
You can’t perform that action at this time.
0 commit comments