From 624c5aa1f87a758586113e9ba0feb16f606a0e22 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Tue, 2 Jun 2026 11:36:34 +0800 Subject: [PATCH] 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) --- .../home/components/home-sidebar/HomeSidebar.tsx | 16 +++++++++++++++- web/src/i18n/locales/en-US.ts | 2 ++ web/src/i18n/locales/es-ES.ts | 2 ++ web/src/i18n/locales/ja-JP.ts | 2 ++ web/src/i18n/locales/ru-RU.ts | 2 ++ web/src/i18n/locales/th-TH.ts | 2 ++ web/src/i18n/locales/vi-VN.ts | 2 ++ web/src/i18n/locales/zh-Hans.ts | 2 ++ web/src/i18n/locales/zh-Hant.ts | 2 ++ 9 files changed, 31 insertions(+), 1 deletion(-) diff --git a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx index f5ef36ea..c009eb0d 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx +++ b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx @@ -1801,7 +1801,21 @@ export default function HomeSidebar({ className="size-8 rounded-lg" />
- LangBot +
+ LangBot + + {systemInfo?.edition === 'cloud' + ? t('sidebar.editionCloud') + : t('sidebar.editionCommunity')} + +
{systemInfo?.version} diff --git a/web/src/i18n/locales/en-US.ts b/web/src/i18n/locales/en-US.ts index cea2c33c..dcec8f31 100644 --- a/web/src/i18n/locales/en-US.ts +++ b/web/src/i18n/locales/en-US.ts @@ -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', diff --git a/web/src/i18n/locales/es-ES.ts b/web/src/i18n/locales/es-ES.ts index 2a0d7c5d..080793ec 100644 --- a/web/src/i18n/locales/es-ES.ts +++ b/web/src/i18n/locales/es-ES.ts @@ -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', diff --git a/web/src/i18n/locales/ja-JP.ts b/web/src/i18n/locales/ja-JP.ts index 68cd928a..10df5e8f 100644 --- a/web/src/i18n/locales/ja-JP.ts +++ b/web/src/i18n/locales/ja-JP.ts @@ -10,6 +10,8 @@ const jaJP = { pluginPagesTooltip: 'インストール済みプラグインが提供するビジュアルページ', quickStart: 'クイックスタート', scrollToBottom: '一番下までスクロール', + editionCommunity: 'コミュニティ版', + editionCloud: 'クラウド版', }, common: { login: 'ログイン', diff --git a/web/src/i18n/locales/ru-RU.ts b/web/src/i18n/locales/ru-RU.ts index eb79dba7..f66f4eab 100644 --- a/web/src/i18n/locales/ru-RU.ts +++ b/web/src/i18n/locales/ru-RU.ts @@ -11,6 +11,8 @@ const ruRU = { 'Визуальные страницы, предоставляемые установленными плагинами', quickStart: 'Быстрый старт', scrollToBottom: 'Прокрутить вниз', + editionCommunity: 'Сообщество', + editionCloud: 'Облако', }, common: { login: 'Войти', diff --git a/web/src/i18n/locales/th-TH.ts b/web/src/i18n/locales/th-TH.ts index f9458710..a25a8cca 100644 --- a/web/src/i18n/locales/th-TH.ts +++ b/web/src/i18n/locales/th-TH.ts @@ -10,6 +10,8 @@ const thTH = { pluginPagesTooltip: 'หน้าเว็บที่จัดทำโดยปลั๊กอินที่ติดตั้ง', quickStart: 'เริ่มต้นอย่างรวดเร็ว', scrollToBottom: 'เลื่อนไปด้านล่าง', + editionCommunity: 'รุ่นชุมชน', + editionCloud: 'รุ่นคลาวด์', }, common: { login: 'เข้าสู่ระบบ', diff --git a/web/src/i18n/locales/vi-VN.ts b/web/src/i18n/locales/vi-VN.ts index 4c224879..cae11960 100644 --- a/web/src/i18n/locales/vi-VN.ts +++ b/web/src/i18n/locales/vi-VN.ts @@ -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', diff --git a/web/src/i18n/locales/zh-Hans.ts b/web/src/i18n/locales/zh-Hans.ts index f7512c6c..f40cf981 100644 --- a/web/src/i18n/locales/zh-Hans.ts +++ b/web/src/i18n/locales/zh-Hans.ts @@ -10,6 +10,8 @@ const zhHans = { pluginPagesTooltip: '由已安装的插件提供的可视化页面', quickStart: '快速开始向导', scrollToBottom: '滚动到底部', + editionCommunity: '社区版', + editionCloud: '云版', }, common: { login: '登录', diff --git a/web/src/i18n/locales/zh-Hant.ts b/web/src/i18n/locales/zh-Hant.ts index 79875383..100487b2 100644 --- a/web/src/i18n/locales/zh-Hant.ts +++ b/web/src/i18n/locales/zh-Hant.ts @@ -10,6 +10,8 @@ const zhHant = { pluginPagesTooltip: '由已安裝的插件提供的視覺化頁面', quickStart: '快速開始', scrollToBottom: '捲動到底部', + editionCommunity: '社區版', + editionCloud: '雲端版', }, common: { login: '登入',