Skip to content

Commit

Permalink
Rename “Public” status to “Published” (#236)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Nahum <[email protected]>
  • Loading branch information
formsdev and JhumanJ authored Nov 15, 2023
1 parent e99a055 commit 7b3be36
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ export default {
copyFormId: null,
visibilityOptions: [
{
name: "Public",
name: "Published",
value: "public"
},
{
name: "Draft (form won't be accessible)",
name: "Draft - not publicly accessible",
value: "draft"
},
{
name: "Closed",
name: "Closed - won\'t accept new submissions",
value: "closed"
}
],
Expand Down
9 changes: 6 additions & 3 deletions resources/js/pages/forms/show/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@
<span class="pr-1">- {{ form.submissions_count }}
submission{{ form.submissions_count > 0 ? 's' : '' }}
</span>
<span class="pr-1 text-blue-500" v-if="form.visibility=='closed'">- Closed</span>
<span class="">- Edited {{ form.last_edited_human }}</span>
<span>- Edited {{ form.last_edited_human }}</span>
</p>
<div v-if="form.visibility=='draft' || (form.tags && form.tags.length > 0)" class="mt-2 flex items-center flex-wrap gap-3">
<div v-if="['draft','closed'].includes(form.visibility) || (form.tags && form.tags.length > 0)" class="mt-2 flex items-center flex-wrap gap-3">
<span v-if="form.visibility=='draft'"
class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-1 text-xs font-medium text-yellow-600 ring-1 ring-inset ring-gray-500/10 dark:text-white dark:bg-gray-700">
Draft - not publicly accessible
</span>
<span v-else-if="form.visibility=='closed'"
class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-1 text-xs font-medium text-yellow-600 ring-1 ring-inset ring-gray-500/10 dark:text-white dark:bg-gray-700">
Closed - won't accept new submissions
</span>
<span v-for="(tag,i) in form.tags" :key="tag"
class="inline-flex items-center rounded-full bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 dark:text-white dark:bg-gray-700"
>
Expand Down
6 changes: 5 additions & 1 deletion resources/js/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@
</li>
<li class="list-disc ml-6">Edited {{ form.last_edited_human }}</li>
</ul>
<div v-if="form.visibility=='draft' || (form.tags && form.tags.length > 0)" class="mt-1 flex items-center flex-wrap gap-3">
<div v-if="['draft','closed'].includes(form.visibility) || (form.tags && form.tags.length > 0)" class="mt-1 flex items-center flex-wrap gap-3">
<span v-if="form.visibility=='draft'"
class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-1 text-xs font-medium text-yellow-600 ring-1 ring-inset ring-gray-500/10 dark:text-white dark:bg-gray-700">
Draft
</span>
<span v-else-if="form.visibility=='closed'"
class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-1 text-xs font-medium text-yellow-600 ring-1 ring-inset ring-gray-500/10 dark:text-white dark:bg-gray-700">
Closed
</span>
<span v-for="(tag,i) in form.tags" :key="tag"
class="inline-flex items-center rounded-full bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 dark:text-white dark:bg-gray-700"
>
Expand Down

0 comments on commit 7b3be36

Please sign in to comment.