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