feat(sidebar): show edition badge (Community / Cloud) in logo area

Add a small badge next to the LangBot name in the sidebar header that reflects
systemInfo.edition: a neutral "Community" badge for the community edition and a
blue "Cloud" badge for the cloud edition. Adds sidebar.editionCommunity /
sidebar.editionCloud across all 8 locales.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Junyan Qin
2026-06-02 11:36:34 +08:00
parent 2445ee19ab
commit 624c5aa1f8
9 changed files with 31 additions and 1 deletions

View File

@@ -1801,7 +1801,21 @@ export default function HomeSidebar({
className="size-8 rounded-lg"
/>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-semibold">LangBot</span>
<div className="flex items-center gap-1.5">
<span className="truncate font-semibold">LangBot</span>
<Badge
variant="secondary"
className={`shrink-0 px-1 py-0 h-3.5 text-[0.55rem] font-medium ${
systemInfo?.edition === 'cloud'
? 'border-transparent bg-blue-500 text-white hover:bg-blue-600'
: ''
}`}
>
{systemInfo?.edition === 'cloud'
? t('sidebar.editionCloud')
: t('sidebar.editionCommunity')}
</Badge>
</div>
<div className="flex items-center gap-1.5">
<span className="truncate text-xs text-muted-foreground">
{systemInfo?.version}

View File

@@ -10,6 +10,8 @@ const enUS = {
pluginPagesTooltip: 'Visual pages provided by installed plugins',
quickStart: 'Quick Start',
scrollToBottom: 'Scroll to bottom',
editionCommunity: 'Community',
editionCloud: 'Cloud',
},
common: {
login: 'Login',

View File

@@ -11,6 +11,8 @@ const esES = {
'Páginas visuales proporcionadas por los plugins instalados',
quickStart: 'Inicio rápido',
scrollToBottom: 'Desplazar al final',
editionCommunity: 'Comunidad',
editionCloud: 'Nube',
},
common: {
login: 'Iniciar sesión',

View File

@@ -10,6 +10,8 @@ const jaJP = {
pluginPagesTooltip: 'インストール済みプラグインが提供するビジュアルページ',
quickStart: 'クイックスタート',
scrollToBottom: '一番下までスクロール',
editionCommunity: 'コミュニティ版',
editionCloud: 'クラウド版',
},
common: {
login: 'ログイン',

View File

@@ -11,6 +11,8 @@ const ruRU = {
'Визуальные страницы, предоставляемые установленными плагинами',
quickStart: 'Быстрый старт',
scrollToBottom: 'Прокрутить вниз',
editionCommunity: 'Сообщество',
editionCloud: 'Облако',
},
common: {
login: 'Войти',

View File

@@ -10,6 +10,8 @@ const thTH = {
pluginPagesTooltip: 'หน้าเว็บที่จัดทำโดยปลั๊กอินที่ติดตั้ง',
quickStart: 'เริ่มต้นอย่างรวดเร็ว',
scrollToBottom: 'เลื่อนไปด้านล่าง',
editionCommunity: 'รุ่นชุมชน',
editionCloud: 'รุ่นคลาวด์',
},
common: {
login: 'เข้าสู่ระบบ',

View File

@@ -11,6 +11,8 @@ const viVN = {
'Các trang trực quan được cung cấp bởi plugin đã cài đặt',
quickStart: 'Bắt đầu nhanh',
scrollToBottom: 'Cuộn xuống cuối',
editionCommunity: 'Bản cộng đồng',
editionCloud: 'Bản đám mây',
},
common: {
login: 'Đăng nhập',

View File

@@ -10,6 +10,8 @@ const zhHans = {
pluginPagesTooltip: '由已安装的插件提供的可视化页面',
quickStart: '快速开始向导',
scrollToBottom: '滚动到底部',
editionCommunity: '社区版',
editionCloud: '云版',
},
common: {
login: '登录',

View File

@@ -10,6 +10,8 @@ const zhHant = {
pluginPagesTooltip: '由已安裝的插件提供的視覺化頁面',
quickStart: '快速開始',
scrollToBottom: '捲動到底部',
editionCommunity: '社區版',
editionCloud: '雲端版',
},
common: {
login: '登入',