mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
feat: update DomainLifecycleSteps
This commit is contained in:
parent
87a69dac78
commit
607f6c75b4
@ -1,13 +1,7 @@
|
||||
import {StepProps, Steps, Tooltip} from "antd";
|
||||
import React from "react";
|
||||
import {t} from "ttag";
|
||||
import {
|
||||
CheckOutlined,
|
||||
DeleteOutlined,
|
||||
ExclamationCircleOutlined,
|
||||
ReloadOutlined,
|
||||
SignatureOutlined
|
||||
} from "@ant-design/icons";
|
||||
import {CheckOutlined, DeleteOutlined, ExclamationCircleOutlined, SignatureOutlined} from "@ant-design/icons";
|
||||
import {rdapEventDetailTranslation, rdapStatusCodeDetailTranslation} from "../../utils/functions/rdapTranslation";
|
||||
|
||||
export function DomainLifecycleSteps({status}: { status: string[] }) {
|
||||
@ -19,33 +13,29 @@ export function DomainLifecycleSteps({status}: { status: string[] }) {
|
||||
const steps: StepProps[] = [
|
||||
{
|
||||
title: <Tooltip title={rdapEventDetailTranslated.registration}>{t`Registration`}</Tooltip>,
|
||||
icon: <SignatureOutlined/>
|
||||
icon: <SignatureOutlined style={{color: 'green'}}/>
|
||||
},
|
||||
{
|
||||
title: <Tooltip title={rdapStatusCodeDetailTranslated.active}>{t`Active`}</Tooltip>,
|
||||
icon: <CheckOutlined/>
|
||||
},
|
||||
{
|
||||
title: <Tooltip title={rdapStatusCodeDetailTranslated["renew period"]}>{t`Renew Period`}</Tooltip>,
|
||||
icon: <ReloadOutlined/>
|
||||
},
|
||||
{
|
||||
title: <Tooltip
|
||||
title={rdapStatusCodeDetailTranslated["redemption period"]}>{t`Redemption Period`}</Tooltip>,
|
||||
icon: <ExclamationCircleOutlined/>
|
||||
icon: <ExclamationCircleOutlined style={{color: 'orangered'}}/>
|
||||
},
|
||||
{
|
||||
title: <Tooltip title={rdapStatusCodeDetailTranslated["pending delete"]}>{t`Pending Delete`}</Tooltip>,
|
||||
icon: <DeleteOutlined/>
|
||||
icon: <DeleteOutlined style={{color: 'palevioletred'}}/>
|
||||
}
|
||||
]
|
||||
|
||||
let currentStep = 1
|
||||
|
||||
if (status.includes('redemption period')) {
|
||||
currentStep = 4
|
||||
currentStep = 2
|
||||
} else if (status.includes('pending delete')) {
|
||||
currentStep = 5
|
||||
currentStep = 3
|
||||
}
|
||||
|
||||
return <Steps
|
||||
|
||||
@ -57,24 +57,20 @@ msgstr ""
|
||||
msgid "This domain name does not appear to be valid"
|
||||
msgstr ""
|
||||
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:21
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:15
|
||||
#: assets/utils/functions/rdapTranslation.ts:43
|
||||
msgid "Registration"
|
||||
msgstr ""
|
||||
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:25
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:19
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:29
|
||||
msgid "Renew Period"
|
||||
msgstr ""
|
||||
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:34
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:24
|
||||
msgid "Redemption Period"
|
||||
msgstr ""
|
||||
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:38
|
||||
#: assets/components/search/DomainLifecycleSteps.tsx:28
|
||||
msgid "Pending Delete"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user