Do not show copy button in not secured contexts and add product number to the backlog header

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2024-02-21 11:56:01 +08:00
parent 4906ad1713
commit df7607ffd8
3 changed files with 13 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@ export function ProductItem({card_index}) {
<section className="productItem">
<div className="content">
<h3 style={{'marginBottom': card.name_codename ? '5px' : '20px'}}>{card.name}</h3>
<h3 style={{'marginBottom': card.name_codename ? '5px' : '20px'}}>{card.name_number} {card.name}</h3>
{card.name_codename ? (
<p>{card.name_codename}</p>
) : null}

View File

@ -79,12 +79,17 @@ export function ShowJSON() {
placeholder="There should be description of the crate"/>
<div className="d-flex flex-column flex-sm-row justify-content-end">
{window.isSecureContext && (
<a type="button"
onClick={() => {copyToClipboard(description)}}
onClick={() => {
copyToClipboard(description)
}}
className={"btn btn-sm m-0 mb-1 mt-2 mb-sm-0 me-sm-2 " + copyButtonStates[copiedState].style}
>
{ copyButtonStates[copiedState].content }
{copyButtonStates[copiedState].content}
</a>
)}
<a type="button" onClick={closeDescription}
className="btn btn-sm btn-outline-primary m-0 mb-1 mt-2 mb-sm-0 me-sm-2">Close</a>
</div>