feat(dashboard): add copy button next to API link in API info panel
Closes #4058
This commit is contained in:
@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Card, Avatar, Tag, Divider, Empty } from '@douyinfe/semi-ui';
|
import { Card, Avatar, Tag, Divider, Empty } from '@douyinfe/semi-ui';
|
||||||
import { Server, Gauge, ExternalLink } from 'lucide-react';
|
import { Server, Gauge, ExternalLink, Copy } from 'lucide-react';
|
||||||
import {
|
import {
|
||||||
IllustrationConstruction,
|
IllustrationConstruction,
|
||||||
IllustrationConstructionDark,
|
IllustrationConstructionDark,
|
||||||
@@ -87,11 +87,18 @@ const ApiInfoPanel = ({
|
|||||||
</Tag>
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className='flex items-center gap-1 mb-1'>
|
||||||
className='!text-semi-color-primary break-all cursor-pointer hover:underline mb-1'
|
<span
|
||||||
onClick={() => handleCopyUrl(api.url)}
|
className='!text-semi-color-primary break-all cursor-pointer hover:underline'
|
||||||
>
|
onClick={() => handleCopyUrl(api.url)}
|
||||||
{api.url}
|
>
|
||||||
|
{api.url}
|
||||||
|
</span>
|
||||||
|
<Copy
|
||||||
|
size={14}
|
||||||
|
className='flex-shrink-0 text-gray-400 hover:text-semi-color-primary cursor-pointer transition-colors'
|
||||||
|
onClick={() => handleCopyUrl(api.url)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='text-gray-500'>{api.description}</div>
|
<div className='text-gray-500'>{api.description}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user