forked from M-Labs/web2019
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:
parent
4906ad1713
commit
df7607ffd8
File diff suppressed because one or more lines are too long
@ -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}
|
||||
|
@ -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">
|
||||
<a type="button"
|
||||
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 }
|
||||
</a>
|
||||
{window.isSecureContext && (
|
||||
<a type="button"
|
||||
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}
|
||||
</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>
|
||||
|
Loading…
Reference in New Issue
Block a user