Release 202506131339
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterEnum
|
||||||
|
ALTER TYPE "VerificationStepStatus" ADD VALUE 'WARNING';
|
||||||
@@ -578,6 +578,7 @@ enum VerificationStepStatus {
|
|||||||
IN_PROGRESS
|
IN_PROGRESS
|
||||||
PASSED
|
PASSED
|
||||||
FAILED
|
FAILED
|
||||||
|
WARNING
|
||||||
}
|
}
|
||||||
|
|
||||||
model VerificationStep {
|
model VerificationStep {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Icon } from 'astro-icon/components'
|
|||||||
import { differenceInDays, isPast } from 'date-fns'
|
import { differenceInDays, isPast } from 'date-fns'
|
||||||
|
|
||||||
import { verificationStatusesByValue } from '../constants/verificationStatus'
|
import { verificationStatusesByValue } from '../constants/verificationStatus'
|
||||||
|
import { verificationStepStatusesByValue } from '../constants/verificationStepStatus'
|
||||||
import { cn } from '../lib/cn'
|
import { cn } from '../lib/cn'
|
||||||
|
|
||||||
import TimeFormatted from './TimeFormatted.astro'
|
import TimeFormatted from './TimeFormatted.astro'
|
||||||
@@ -67,7 +68,7 @@ const wasRecentlyAdded = isPast(listedDate) && differenceInDays(new Date(), list
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : wasRecentlyAdded ? (
|
) : wasRecentlyAdded ? (
|
||||||
<div class="mb-3 rounded-md bg-red-900/50 p-2 text-sm text-red-400">
|
<div class="mb-3 rounded-md bg-yellow-900/50 p-2 text-sm text-yellow-400">
|
||||||
This service was {service.listedAt === null ? 'added ' : 'listed '}{' '}
|
This service was {service.listedAt === null ? 'added ' : 'listed '}{' '}
|
||||||
<TimeFormatted date={listedDate} daysUntilDate={RECENTLY_ADDED_DAYS} />
|
<TimeFormatted date={listedDate} daysUntilDate={RECENTLY_ADDED_DAYS} />
|
||||||
{service.verificationStatus !== 'VERIFICATION_SUCCESS' && ' and it is not verified'}. Proceed with
|
{service.verificationStatus !== 'VERIFICATION_SUCCESS' && ' and it is not verified'}. Proceed with
|
||||||
@@ -98,14 +99,29 @@ const wasRecentlyAdded = isPast(listedDate) && differenceInDays(new Date(), list
|
|||||||
{
|
{
|
||||||
service.verificationStatus !== 'VERIFICATION_FAILED' &&
|
service.verificationStatus !== 'VERIFICATION_FAILED' &&
|
||||||
service.verificationSteps.some((step) => step.status === 'FAILED') && (
|
service.verificationSteps.some((step) => step.status === 'FAILED') && (
|
||||||
<div class="mb-3 flex items-center gap-2 rounded-md bg-red-900/50 p-2 text-sm text-red-400">
|
<a
|
||||||
|
href="#verification"
|
||||||
|
class="mb-3 flex items-center gap-2 rounded-md bg-red-900/50 p-2 text-sm text-red-400 transition-colors hover:bg-red-900/60"
|
||||||
|
>
|
||||||
<Icon
|
<Icon
|
||||||
name={verificationStatusesByValue.VERIFICATION_FAILED.icon}
|
name={verificationStatusesByValue.VERIFICATION_FAILED.icon}
|
||||||
class={cn('size-5', verificationStatusesByValue.VERIFICATION_FAILED.classNames.icon)}
|
class={cn('size-5', verificationStatusesByValue.VERIFICATION_FAILED.classNames.icon)}
|
||||||
/>
|
/>
|
||||||
<span>
|
<span>Some verification steps failed. Please review the details below.</span>
|
||||||
This service has failed one or more verification steps. Review the verification details carefully.
|
</a>
|
||||||
</span>
|
)
|
||||||
</div>
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
service.verificationStatus !== 'VERIFICATION_FAILED' &&
|
||||||
|
!service.verificationSteps.some((step) => step.status === 'FAILED') &&
|
||||||
|
service.verificationSteps.some((step) => step.status === 'WARNING') && (
|
||||||
|
<a
|
||||||
|
href="#verification"
|
||||||
|
class="mb-3 flex items-center gap-2 rounded-md bg-yellow-600/30 p-2 text-sm text-yellow-200 transition-colors hover:bg-yellow-600/40"
|
||||||
|
>
|
||||||
|
<Icon name={verificationStepStatusesByValue.WARNING.icon} class={cn('size-5 text-yellow-400')} />
|
||||||
|
<span>Some verification steps are marked as warnings.</span>
|
||||||
|
</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,12 @@ export const {
|
|||||||
icon: 'ri:alert-line',
|
icon: 'ri:alert-line',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'WARNING',
|
||||||
|
label: 'Warning',
|
||||||
|
icon: 'ri:alert-line',
|
||||||
|
color: 'yellow',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'PENDING',
|
value: 'PENDING',
|
||||||
label: 'Pending',
|
label: 'Pending',
|
||||||
|
|||||||
@@ -387,6 +387,13 @@ const getVerificationStepStatusInfo = (status: VerificationStepStatus) => {
|
|||||||
color: 'red',
|
color: 'red',
|
||||||
timelineIconClass: 'text-red-400',
|
timelineIconClass: 'text-red-400',
|
||||||
} as const
|
} as const
|
||||||
|
case VerificationStepStatus.WARNING:
|
||||||
|
return {
|
||||||
|
text: 'Warning',
|
||||||
|
icon: 'ri:alert-line',
|
||||||
|
color: 'yellow',
|
||||||
|
timelineIconClass: 'text-yellow-400',
|
||||||
|
} as const
|
||||||
default:
|
default:
|
||||||
return {
|
return {
|
||||||
text: 'Unknown',
|
text: 'Unknown',
|
||||||
|
|||||||
Reference in New Issue
Block a user