Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,70 +56,6 @@
</lf-field>
</article>

<!-- Appearance section -->
<div class="mb-6">
<h6 class="text-sm font-semibold text-gray-500 mb-4 border-b border-gray-100 pb-2">
Appearance
</h6>

<!-- Card image URL -->
<article class="mb-6">
<lf-field label-text="Card image URL" :required="true">
<lf-input
v-model="form.imageUrl"
class="h-10"
placeholder="https://example.com/card-image.png"
:invalid="$v.imageUrl.$invalid && $v.imageUrl.$dirty"
@blur="$v.imageUrl.$touch()"
@change="$v.imageUrl.$touch()"
/>
<lf-field-messages
:validation="$v.imageUrl"
:error-messages="{ url: 'Please enter a valid URL' }"
/>
<span class="text-2xs text-gray-400">Recommended image size: 800×240px</span>
</lf-field>
</article>

<!-- Collection logo URL -->
<article class="mb-6">
<lf-field label-text="Collection logo URL" :required="true">
<lf-input
v-model="form.logoUrl"
class="h-10"
placeholder="https://example.com/logo.png"
:invalid="$v.logoUrl.$invalid && $v.logoUrl.$dirty"
@blur="$v.logoUrl.$touch()"
@change="$v.logoUrl.$touch()"
/>
<lf-field-messages
:validation="$v.logoUrl"
:error-messages="{ url: 'Please enter a valid URL' }"
/>
<span class="text-2xs text-gray-400">Recommended image size: 400×400px</span>
</lf-field>
</article>

<!-- Collection color -->
<article class="mb-6">
<lf-field label-text="Collection color">
<div class="flex items-center gap-2">
<span
class="w-6 h-6 rounded-full flex-shrink-0 border border-gray-200"
:style="{ backgroundColor: form.color || '#009AFF' }"
/>
<lf-input
v-model="form.color"
class="h-10 flex-grow"
placeholder="#FE9A00"
type="color"
/>
</div>
<span class="text-2xs text-gray-400">Leave blank to use the default color #009AFF</span>
</lf-field>
</article>
</div>

<!-- Category -->
<article class="mb-5">
<lf-field label-text="Category">
Expand Down Expand Up @@ -180,6 +116,76 @@
/>
</lf-field>
</article>

<!-- Appearance section -->
<div class="mb-6">
<div class="flex items-center gap-3">
<h6 class="text-sm font-primary font-semibold text-gray-500 mb-4 pb-2">
Appearance
</h6>
<div class="border-b border-gray-100 w-full" />
</div>

<!-- Card image URL -->
<article class="mb-6">
<lf-field label-text="Card image URL" :required="true">
<lf-input
v-model="form.imageUrl"
class="h-10"
placeholder="https://example.com/card-image.png"
:invalid="$v.imageUrl.$invalid && $v.imageUrl.$dirty"
@blur="$v.imageUrl.$touch()"
@change="$v.imageUrl.$touch()"
/>
<lf-field-messages
:validation="$v.imageUrl"
:error-messages="{ url: 'Please enter a valid URL' }"
/>
<span class="text-2xs text-gray-400">Recommended image size: 800×240px</span>
</lf-field>
</article>

<!-- Collection logo URL -->
<article class="mb-6">
<lf-field label-text="Collection logo URL" :required="true">
<lf-input
v-model="form.logoUrl"
class="h-10"
placeholder="https://example.com/logo.png"
:invalid="$v.logoUrl.$invalid && $v.logoUrl.$dirty"
@blur="$v.logoUrl.$touch()"
@change="$v.logoUrl.$touch()"
/>
<lf-field-messages
:validation="$v.logoUrl"
:error-messages="{ url: 'Please enter a valid URL' }"
/>
<span class="text-2xs text-gray-400">Recommended image size: 400×400px</span>
</lf-field>
</article>

<!-- Collection color -->
<article class="mb-6">
<lf-field label-text="Collection color">
<div class="flex items-center gap-2">
<lf-input
v-model="form.color"
class="h-10 flex-grow"
placeholder="Enter HEX code"
>
<template #prefix>
<span
v-if="form.color"
class="w-6 h-6 rounded-full flex-shrink-0 border border-gray-200"
:style="{ backgroundColor: form.color || '#009AFF' }"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreachable fallback due to v-if guard

Low Severity

The v-if="form.color" on line 178 ensures the color preview span only renders when form.color is truthy, which makes the || '#009AFF' fallback in the backgroundColor style binding on line 180 unreachable dead code. If the intent was to show a default color swatch when the field is empty, the v-if prevents that. If the intent was to only show a preview when the user has typed something, the fallback is unnecessary.

Fix in Cursor Fix in Web

/>
</template>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty prefix div renders with padding when color blank

Low Severity

The #prefix slot is always provided to lf-input, so the $slots['prefix'] check inside Input.vue is always truthy — even when form.color is falsy and the inner span doesn't render via v-if. This causes the c-input__prefix wrapper div (which applies pl-2 padding) to always be present in the DOM, resulting in an empty padded area inside the input when no color is entered. The text position also visually shifts when a color is typed and the circle appears.

Fix in Cursor Fix in Web

</lf-input>
</div>
<span class="text-2xs text-gray-400">Leave blank to use the default color #009AFF</span>
</lf-field>
</article>
</div>
</div>
<lf-collection-add-projects-tab
v-if="activeTab === 'projects'"
Expand Down