feat: select-none
This commit is contained in:
parent
a10c9d8ffe
commit
ea5b50cf0a
7 changed files with 26 additions and 14 deletions
|
|
@ -18,7 +18,7 @@ export default function FavoriteRelaysSetting() {
|
|||
<TemporaryRelaySet />
|
||||
<div className="space-y-2">
|
||||
<div className="flex flex-wrap items-center justify-between gap-2">
|
||||
<div className="text-muted-foreground font-semibold select-nones shrink-0">
|
||||
<div className="text-muted-foreground font-semibold select-none shrink-0">
|
||||
{t('Relay sets')}
|
||||
</div>
|
||||
<PullRelaySetsButton />
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ export default function RawEventDialog({
|
|||
<DialogDescription className="hidden" />
|
||||
</DialogHeader>
|
||||
<ScrollArea className="h-full">
|
||||
<pre className="text-sm text-muted-foreground">{JSON.stringify(event, null, 2)}</pre>
|
||||
<pre className="text-sm text-muted-foreground select-text">
|
||||
{JSON.stringify(event, null, 2)}
|
||||
</pre>
|
||||
<ScrollBar orientation="horizontal" />
|
||||
</ScrollArea>
|
||||
</DialogContent>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default function RelayInfo({ url }: { url: string }) {
|
|||
<div className="space-y-2">
|
||||
<div className="flex gap-2 items-center">
|
||||
<RelayIcon url={url} className="w-8 h-8" />
|
||||
<div className="text-2xl font-semibold truncate">
|
||||
<div className="text-2xl font-semibold truncate select-text">
|
||||
{relayInfo.name || relayInfo.shortUrl}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -33,7 +33,7 @@ export default function RelayInfo({ url }: { url: string }) {
|
|||
</div>
|
||||
)}
|
||||
{relayInfo.description && (
|
||||
<div className="text-wrap break-words whitespace-pre-wrap mt-2">
|
||||
<div className="text-wrap break-words whitespace-pre-wrap mt-2 select-text">
|
||||
{relayInfo.description}
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -67,7 +67,7 @@ export default function RelayInfo({ url }: { url: string }) {
|
|||
<a
|
||||
href={normalizeHttpUrl(relayInfo.payments_url)}
|
||||
target="_blank"
|
||||
className="hover:underline text-primary"
|
||||
className="hover:underline text-primary select-text"
|
||||
>
|
||||
{relayInfo.payments_url}
|
||||
</a>
|
||||
|
|
@ -86,7 +86,7 @@ export default function RelayInfo({ url }: { url: string }) {
|
|||
{relayInfo.contact && (
|
||||
<div className="space-y-2 flex-1">
|
||||
<div className="text-sm font-semibold text-muted-foreground">{t('Contact')}</div>
|
||||
<div className="flex gap-2 items-center font-semibold">
|
||||
<div className="flex gap-2 items-center font-semibold select-text">
|
||||
<Mail />
|
||||
{relayInfo.contact}
|
||||
</div>
|
||||
|
|
@ -95,7 +95,7 @@ export default function RelayInfo({ url }: { url: string }) {
|
|||
{relayInfo.software && (
|
||||
<div className="space-y-2 flex-1">
|
||||
<div className="text-sm font-semibold text-muted-foreground">{t('Software')}</div>
|
||||
<div className="flex gap-2 items-center font-semibold">
|
||||
<div className="flex gap-2 items-center font-semibold select-text">
|
||||
<SquareCode />
|
||||
{formatSoftware(relayInfo.software)}
|
||||
</div>
|
||||
|
|
@ -104,7 +104,7 @@ export default function RelayInfo({ url }: { url: string }) {
|
|||
{relayInfo.version && (
|
||||
<div className="space-y-2 flex-1">
|
||||
<div className="text-sm font-semibold text-muted-foreground">{t('Version')}</div>
|
||||
<div className="flex gap-2 items-center font-semibold">
|
||||
<div className="flex gap-2 items-center font-semibold select-text">
|
||||
<GitBranch />
|
||||
{relayInfo.version}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, React.ComponentProps<'tex
|
|||
return (
|
||||
<textarea
|
||||
className={cn(
|
||||
'flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
||||
'flex min-h-[80px] w-full rounded-md border border-input bg-transparent select-text px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
||||
className
|
||||
)}
|
||||
ref={ref}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue