Skip to content

Commit b66f1c5

Browse files
committed
Rename Autofill settings section to Remote machines, update forwarded ports description, and add inline code rendering to item descriptions
- in settings > Web, rename 'autofill' group to 'Remote machines'/'Maszyny zdalne', etc. - Item description text between backticks should be written in monospace with background color [Pasted text] ├── apps │ └── editor │ └── src │ └── views │ └── settings │ └── frontend │ ├── Home │ │ ├── Home.tsx │ │ └── sections │ │ └── WebSection.tsx │ └── i18n │ └── translations │ └── web.ts └── packages └── ui └── src └── components └── editor └── settings-view ├── DefaultConfigurationSelector │ ├── DefaultConfigurationSelector.module.scss │ ├── DefaultConfigurationSelector.tsx │ └── index.ts ├── ForwardedPorts │ ├── ForwardedPorts.module.scss │ ├── ForwardedPorts.tsx │ └── index.ts ├── Group │ ├── Group.module.scss │ └── Group.tsx ├── Item │ ├── Item.module.scss │ ├── Item.stories.tsx │ ├── Item.tsx │ └── index.ts ├── Layout │ ├── Layout.module.scss │ ├── Layout.tsx │ └── index.ts ├── Modal │ ├── Form │ │ ├── Form.module.scss │ │ ├── Form.tsx │ │ └── index.ts │ ├── Modal.module.scss │ ├── Modal.tsx │ └── index.ts ├── NavigationItemGroup │ ├── NavigationItemGroup.module.scss │ ├── NavigationItemGroup.tsx │ └── index.ts ├── NavigationItemSection │ ├── NavigationItemSection.module.scss │ ├── NavigationItemSection.tsx │ └── index.ts ├── NavigationSection │ ├── NavigationSection.module.scss │ ├── NavigationSection.tsx │ └── index.ts ├── Notices │ ├── Notices.module.scss │ ├── Notices.tsx │ └── index.ts ├── PromptInstructions │ ├── PromptInstructions.module.scss │ ├── PromptInstructions.tsx │ └── index.ts ├── Section │ ├── Section.module.scss │ ├── Section.tsx │ └── index.ts └── SortableList ├── SortableList.module.scss ├── SortableList.stories.tsx ├── SortableList.tsx └── index.ts
1 parent b19534a commit b66f1c5

6 files changed

Lines changed: 61 additions & 40 deletions

File tree

‎apps/editor/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type NavItem =
2828
| 'section:general:group:agentic-search'
2929
| 'section:web'
3030
| 'section:web:group:chatbots'
31-
| 'section:web:group:ports'
31+
| 'section:web:group:remote-machines'
3232
| 'section:web:group:web-defaults'
3333
| 'section:api'
3434
| 'section:api:group:providers'
@@ -79,8 +79,8 @@ export const NAV_ITEMS_CONFIG: NavConfigItem[] = [
7979
label: 'chatbots.configurations.title'
8080
},
8181
{
82-
id: 'section:web:group:ports',
83-
label: 'web.autofill.title'
82+
id: 'section:web:group:remote-machines',
83+
label: 'web.remote-machines.title'
8484
},
8585
{
8686
id: 'section:web:group:web-defaults',

‎apps/editor/src/views/settings/frontend/Home/sections/WebSection.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,16 @@ export const WebSection = forwardRef<HTMLDivElement, Props>((props, ref) => {
351351
)}
352352
</UiGroup>
353353
</div>
354-
<div ref={(el) => props.set_section_ref('section:web:group:ports', el)}>
354+
<div
355+
ref={(el) =>
356+
props.set_section_ref('section:web:group:remote-machines', el)
357+
}
358+
>
355359
<ForwardedPorts
356360
forwarded_ports={props.forwarded_ports}
357361
on_update={props.on_update_forwarded_ports}
358362
translations={{
359-
title: t('web.autofill.title'),
363+
title: t('web.remote-machines.title'),
360364
item_title: t('forwarded-ports.add.title'),
361365
item_description: t('forwarded-ports.add.description'),
362366
placeholder: t('forwarded-ports.add.placeholder'),

‎apps/editor/src/views/settings/frontend/i18n/translations/web.ts‎

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ export const translations = {
22
'web.title': {
33
en: 'Web'
44
},
5-
'web.autofill.title': {
6-
en: 'Autofill',
7-
pl: 'Autouzupełnianie',
8-
'zh-cn': '自动填充',
9-
ja: '自動入力',
10-
'zh-tw': '自動填寫',
11-
de: 'Autofill',
12-
es: 'Autocompletar',
13-
fr: 'Remplissage automatique',
14-
'pt-br': 'Preenchimento automático',
15-
ru: 'Автозаполнение',
16-
ko: '자동 완성',
17-
it: 'Compilazione automatica',
18-
tr: 'Otomatik doldurma',
19-
cs: 'Automatické vyplňování',
20-
hu: 'Automatikus kitöltés',
21-
bg: 'Автоматично попълване'
5+
'web.remote-machines.title': {
6+
en: 'Remote machines',
7+
pl: 'Maszyny zdalne',
8+
'zh-cn': '远程机器',
9+
ja: 'リモートマシン',
10+
'zh-tw': '遠端機器',
11+
de: 'Remote-Maschinen',
12+
es: 'Máquinas remotas',
13+
fr: 'Machines distantes',
14+
'pt-br': 'Máquinas remotas',
15+
ru: 'Удаленные машины',
16+
ko: '원격 머신',
17+
it: 'Macchine remote',
18+
tr: 'Uzak makineler',
19+
cs: 'Vzdálené stroje',
20+
hu: 'Távoli gépek',
21+
bg: 'Отдалечени машини'
2222
},
2323
'forwarded-ports.title': {
2424
en: 'Ports',
@@ -57,23 +57,23 @@ export const translations = {
5757
bg: 'Пренасочени портове'
5858
},
5959
'forwarded-ports.add.description': {
60-
en: 'When using Remote-SSH, list ports the default port 55155 is forwarded to.',
61-
pl: 'Podczas korzystania z Remote-SSH wylistuj porty, na które przekierowano domyślny port 55155.',
62-
'zh-cn': '使用 Remote-SSH 时,列出默认端口 55155 转发到的端口。',
63-
ja: 'Remote-SSH を使用する場合、デフォルトポート 55155 の転送先ポートを一覧表示します。',
64-
'zh-tw': '使用 Remote-SSH 時,列出預設埠 55155 轉送到的埠。',
65-
de: 'Bei Verwendung von Remote-SSH listen Sie die Ports auf, auf die der Standardport 55155 weitergeleitet wurde.',
66-
es: 'Al usar Remote-SSH, enumera los puertos a los que se reenvió el puerto predeterminado 55155.',
67-
fr: "Lors de l'utilisation de Remote-SSH, listez les ports vers lesquels le port par défaut 55155 a été transféré.",
60+
en: "List ports CWC's Websockets server port `55155` is forwarded to.",
61+
pl: 'Wypisz porty, na które przekierowany jest port `55155` serwera Websockets CWC.',
62+
'zh-cn': '列出 CWC 的 Websockets 服务器端口 `55155` 转发到的端口。',
63+
ja: 'CWC の Websockets サーバーポート `55155` が転送されるポートのリスト。',
64+
'zh-tw': '列出 CWC 的 Websockets 伺服器埠 `55155` 轉送到的埠。',
65+
de: 'Liste der Ports, an die der Websockets-Server-Port `55155` von CWC weitergeleitet wird.',
66+
es: 'Lista de puertos a los que se reenvía el puerto `55155` del servidor Websockets de CWC.',
67+
fr: 'Liste des ports vers lesquels le port `55155` du serveur Websockets de CWC est transféré.',
6868
'pt-br':
69-
'Ao usar Remote-SSH, liste as portas para as quais a porta padrão 55155 foi encaminhada.',
70-
ru: 'При использовании Remote-SSH перечислите порты, на которые был перенаправлен порт по умолчанию 55155.',
71-
ko: 'Remote-SSH를 사용할 때 기본 포트 55155가 전달된 포트를 나열합니다.',
72-
it: 'Quando si utilizza Remote-SSH, elenca le porte a cui è stata inoltrata la porta predefinita 55155.',
73-
tr: 'Remote-SSH kullanırken, varsayılan 55155 bağlantı noktasının yönlendirildiği bağlantı noktalarını listeleyin.',
74-
cs: 'Při použití Remote-SSH uveďte porty, na které byl přesměrován výchozí port 55155.',
75-
hu: 'Remote-SSH használatakor sorolja fel azokat a portokat, amelyekre az alapértelmezett 55155-es port továbbításra került.',
76-
bg: 'Когато използвате Remote-SSH, избројте портовете, към които е пренасочен портът по подразбиране 55155.'
69+
'Liste as portas para as quais a porta `55155` do servidor Websockets do CWC é encaminhada.',
70+
ru: 'Список портов, на которые перенаправляется порт `55155` сервера Websockets CWC.',
71+
ko: 'CWC의 Websockets 서버 포트 `55155`가 전달되는 포트 목록입니다.',
72+
it: 'Elenca le porte a cui è inoltrata la porta `55155` del server Websockets di CWC.',
73+
tr: "CWC'nin Websockets sunucu bağlantı noktası `55155`'in yönlendirildiği bağlantı noktalarını listeleyin.",
74+
cs: 'Seznam portů, na které je přesměrován port `55155` serveru Websockets CWC.',
75+
hu: 'Azon portok listája, amelyekre a CWC Websockets szerverének `55155`-ös portja továbbítva van.',
76+
bg: 'Списък на портовете, към които е пренасочен порт `55155` на Websockets сървъра на CWC.'
7777
},
7878
'forwarded-ports.add.placeholder': {
7979
en: 'Port number (e.g. 55156)',

‎packages/ui/src/components/editor/settings-view/ForwardedPorts/ForwardedPorts.module.scss‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
border: 1px solid var(--cwc-border-color-dimmed);
2424
padding: 2px 2px 2px 6px;
2525
border-radius: 8px;
26-
font-weight: 500;
2726
}

‎packages/ui/src/components/editor/settings-view/Item/Item.module.scss‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@
5656
color: var(--cwc-text-secondary);
5757
}
5858

59+
.code {
60+
font-family: var(--vscode-editor-font-family);
61+
background-color: var(--cwc-bg-tertiary);
62+
padding: 2px 4px;
63+
border-radius: 4px;
64+
font-size: 12px;
65+
}
66+
5967
.below {
6068
width: 100%;
6169
padding: 0 12px 12px 12px;

‎packages/ui/src/components/editor/settings-view/Item/Item.tsx‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,17 @@ export const Item: React.FC<Props> = (props) => {
3939
className={styles.description}
4040
style={{ whiteSpace: 'normal' }}
4141
>
42-
{props.description}
42+
{typeof props.description === 'string'
43+
? props.description.split('`').map((part, i) =>
44+
i % 2 === 1 ? (
45+
<code key={i} className={styles.code}>
46+
{part}
47+
</code>
48+
) : (
49+
part
50+
)
51+
)
52+
: props.description}
4353
</div>
4454
)}
4555
</div>

0 commit comments

Comments
 (0)