Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLA-1731] text fixes #103

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions resources/js/components/pages/create/CreateCollection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@
<Btn primary> Documentation </Btn>
</a>
</div>
<FormInput
v-model="name"
name="name"
label="Name"
description="The name of the collection."
required
/>
<FormInput
v-model="imageUrl"
name="imageUrl"
label="Image URL"
class="w-full"
description="The URL of the image for the collection."
required
/>
<FormInput
v-model="bannerUrl"
Expand All @@ -39,13 +45,6 @@
label="Banner URL"
description="The URL of the banner image for the collection."
/>
<FormInput
v-model="name"
name="name"
label="Name"
description="The name of the collection."
required
/>
<RichTextEditor
v-model="description"
name="description"
Expand Down Expand Up @@ -295,7 +294,13 @@ import { TokenIdSelectType } from '~/types/types.enums';
import { useAppStore } from '~/store';
import { CollectionApi } from '~/api/collection';
import ReadMoreButton from '~/components/ReadMoreButton.vue';
import { addressNotRequiredSchema, booleanNotRequiredSchema, numberNotRequiredSchema } from '~/util/schemas';
import {
addressNotRequiredSchema,
booleanNotRequiredSchema,
numberNotRequiredSchema,
stringNotRequiredSchema,
stringRequiredSchema,
} from '~/util/schemas';
import { TokenIdType } from '~/types/types.interface';
import Tooltip from '~/components/Tooltip.vue';
import { QuestionMarkCircleIcon } from '@heroicons/vue/24/outline';
Expand Down Expand Up @@ -350,10 +355,10 @@ const explicitRoyaltyCurrencies: Ref<
const isAdvanced = computed(() => mode.value === 'advanced');

const validation = yup.object({
name: yup.string().required('Name is required'),
description: yup.string().nullable(),
imageUrl: yup.string().required('Image URL is required'),
bannerUrl: yup.string().nullable(),
name: stringRequiredSchema.typeError('Name is required'),
description: stringNotRequiredSchema,
imageUrl: stringNotRequiredSchema,
bannerUrl: stringNotRequiredSchema,
maxTokenCount: numberNotRequiredSchema.typeError('Max token count must be a number'),
maxTokenSupply: numberNotRequiredSchema.typeError('Max token supply must be a number'),
forceSingleMint: booleanNotRequiredSchema,
Expand Down
19 changes: 9 additions & 10 deletions resources/js/components/pages/create/CreateToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,25 @@
required
readmore="Token ID"
/>
<FormInput
v-model="name"
name="name"
label="Name"
description="The name of the token."
required
/>
<FormInput
v-model="imageUrl"
name="imageUrl"
label="Image URL"
class="w-full"
description="The URL of the image for the token."
required
/>
<FormInput
v-model="name"
name="name"
label="Name"
description="The name of the collection."
required
/>
<RichTextEditor
v-model="description"
name="description"
label="Description"
description="The description of the collection."
description="The description of the token."
/>
<FormInput
v-model="recipient"
Expand Down Expand Up @@ -326,7 +325,7 @@ const collectionIds = computed(() => appStore.collections);
const isAdvanced = computed(() => mode.value === 'advanced');

const validation = yup.object({
imageUrl: stringRequiredSchema,
imageUrl: stringNotRequiredSchema,
name: stringRequiredSchema,
description: stringNotRequiredSchema,
collectionId: collectionIdRequiredSchema,
Expand Down
Loading