disable selecting card contents, press card icon to copy number

This commit is contained in:
ppc
2024-08-10 18:09:28 +01:00
parent 45f85fa837
commit fd300b3649
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ export function AimeCardEntry(props: AMCardActionProps & { card: AimeCard, child
</AMCardDetail>
)}
<AMCardDetail>
<CreditCard className="h-5 w-5"/>
<CreditCard className="h-5 w-5 cursor-pointer" onClick={() => navigator.clipboard.writeText(props.card.id)}/>
<code>{isDesktop
? props.card.id.match(/.{1,4}/g)?.join(" ")
: `•••• ${props.card.id.substring(props.card.id.length - 4)}`}
+1 -1
View File
@@ -34,7 +34,7 @@ export function AMCard(props: AMCardActionProps & { title: string, titlePerforms
export function AMCardDetail(props: { children?: Readonly<React.ReactNode> }) {
return (
<div className="inline-flex items-center max-w-full gap-2 text-gray-500">
<div className="inline-flex items-center max-w-full gap-2 text-gray-500 select-none md:select-text">
{props.children}
</div>
)