mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
style(web): change adapter doc button to link style with external link icon
This commit is contained in:
@@ -15,13 +15,7 @@ import DynamicFormComponent from '@/app/home/components/dynamic-form/DynamicForm
|
|||||||
import { httpClient } from '@/app/infra/http/HttpClient';
|
import { httpClient } from '@/app/infra/http/HttpClient';
|
||||||
import { Bot } from '@/app/infra/entities/api';
|
import { Bot } from '@/app/infra/entities/api';
|
||||||
import { getAdapterDocUrl } from '@/app/infra/entities/adapter-docs';
|
import { getAdapterDocUrl } from '@/app/infra/entities/adapter-docs';
|
||||||
import { FileText } from 'lucide-react';
|
import { ExternalLink } from 'lucide-react';
|
||||||
import { Button } from '@/components/ui/button';
|
|
||||||
import {
|
|
||||||
Tooltip,
|
|
||||||
TooltipContent,
|
|
||||||
TooltipTrigger,
|
|
||||||
} from '@/components/ui/tooltip';
|
|
||||||
|
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
@@ -541,27 +535,15 @@ export default function BotForm({
|
|||||||
i18n.language,
|
i18n.language,
|
||||||
);
|
);
|
||||||
return docUrl ? (
|
return docUrl ? (
|
||||||
<Tooltip>
|
<a
|
||||||
<TooltipTrigger asChild>
|
href={docUrl}
|
||||||
<Button
|
target="_blank"
|
||||||
variant="outline"
|
rel="noopener noreferrer"
|
||||||
size="icon"
|
className="inline-flex shrink-0 items-center gap-1 text-xs text-primary hover:underline"
|
||||||
className="h-9 w-9 shrink-0"
|
>
|
||||||
asChild
|
{t('bots.viewAdapterDocs')}
|
||||||
>
|
<ExternalLink className="h-3 w-3" />
|
||||||
<a
|
</a>
|
||||||
href={docUrl}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
<FileText className="h-4 w-4" />
|
|
||||||
</a>
|
|
||||||
</Button>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent>
|
|
||||||
{t('bots.viewAdapterDocs')}
|
|
||||||
</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
) : null;
|
) : null;
|
||||||
})()}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user