mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-05 05:16:03 +00:00
feat(web): add Discord link to sidebar account menu
Add a "Join our Discord" entry to the account dropdown's external-links group, opening https://discord.gg/wdNEHETs87 in a new tab. lucide-react has no Discord brand glyph, so include a small inline Discord SVG icon (brand color). Add the joinDiscord label to all 8 locales. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -119,6 +119,22 @@ function compareVersions(v1: string, v2: string): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Discord brand glyph (lucide-react has no Discord icon).
|
||||
function DiscordIcon({ className }: { className?: string }) {
|
||||
return (
|
||||
<svg
|
||||
role="img"
|
||||
viewBox="0 0 24 24"
|
||||
fill="currentColor"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className={className}
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
// IDs of sidebar entries that have collapsible entity sub-items
|
||||
const ENTITY_CATEGORY_IDS = [
|
||||
'bots',
|
||||
@@ -2077,6 +2093,14 @@ export default function HomeSidebar({
|
||||
</Badge>
|
||||
)}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
window.open('https://discord.gg/wdNEHETs87', '_blank');
|
||||
}}
|
||||
>
|
||||
<DiscordIcon className="text-[#5865F2]" />
|
||||
{t('common.joinDiscord')}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
<DropdownMenuSeparator />
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ const enUS = {
|
||||
helpDocs: 'Get Help',
|
||||
featureRequest: 'Feature Request',
|
||||
starOnGitHub: 'Star on GitHub',
|
||||
joinDiscord: 'Join our Discord',
|
||||
create: 'Create',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
|
||||
@@ -40,6 +40,7 @@ const esES = {
|
||||
helpDocs: 'Obtener ayuda',
|
||||
featureRequest: 'Solicitar función',
|
||||
starOnGitHub: 'Dar estrella en GitHub',
|
||||
joinDiscord: 'Únete a Discord',
|
||||
create: 'Crear',
|
||||
edit: 'Editar',
|
||||
delete: 'Eliminar',
|
||||
|
||||
@@ -38,6 +38,7 @@ const jaJP = {
|
||||
helpDocs: 'ヘルプドキュメント',
|
||||
featureRequest: '機能リクエスト',
|
||||
starOnGitHub: 'GitHubでStarする',
|
||||
joinDiscord: 'Discord に参加',
|
||||
create: '作成',
|
||||
edit: '編集',
|
||||
delete: '削除',
|
||||
|
||||
@@ -38,6 +38,7 @@ const ruRU = {
|
||||
helpDocs: 'Помощь',
|
||||
featureRequest: 'Запрос функции',
|
||||
starOnGitHub: 'Поставить звезду на GitHub',
|
||||
joinDiscord: 'Присоединиться к Discord',
|
||||
create: 'Создать',
|
||||
edit: 'Редактировать',
|
||||
delete: 'Удалить',
|
||||
|
||||
@@ -37,6 +37,7 @@ const thTH = {
|
||||
helpDocs: 'ขอความช่วยเหลือ',
|
||||
featureRequest: 'ขอฟีเจอร์ใหม่',
|
||||
starOnGitHub: 'ให้ดาวบน GitHub',
|
||||
joinDiscord: 'เข้าร่วม Discord',
|
||||
create: 'สร้าง',
|
||||
edit: 'แก้ไข',
|
||||
delete: 'ลบ',
|
||||
|
||||
@@ -38,6 +38,7 @@ const viVN = {
|
||||
helpDocs: 'Trợ giúp',
|
||||
featureRequest: 'Yêu cầu tính năng',
|
||||
starOnGitHub: 'Star trên GitHub',
|
||||
joinDiscord: 'Tham gia Discord',
|
||||
create: 'Tạo',
|
||||
edit: 'Chỉnh sửa',
|
||||
delete: 'Xóa',
|
||||
|
||||
@@ -36,6 +36,7 @@ const zhHans = {
|
||||
helpDocs: '帮助文档',
|
||||
featureRequest: '需求建议',
|
||||
starOnGitHub: '在 GitHub 上 Star',
|
||||
joinDiscord: '加入 Discord 社区',
|
||||
create: '创建',
|
||||
edit: '编辑',
|
||||
delete: '删除',
|
||||
|
||||
@@ -36,6 +36,7 @@ const zhHant = {
|
||||
helpDocs: '輔助說明',
|
||||
featureRequest: '需求建議',
|
||||
starOnGitHub: '在 GitHub 上 Star',
|
||||
joinDiscord: '加入 Discord 社群',
|
||||
create: '建立',
|
||||
edit: '編輯',
|
||||
delete: '刪除',
|
||||
|
||||
Reference in New Issue
Block a user