Skip to content

Commit 262d44c

Browse files
authored
fix(site): link the chrome extension in the browse install and mark the cli as optional (#62494)
1 parent 93c65af commit 262d44c

21 files changed

Lines changed: 42 additions & 22 deletions

File tree

‎services/site/src/component/site/download-sections.tsx‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ export function ExtensionDownload(props: {
371371
lead: string
372372
command?: string
373373
commands?: { method: string; command: string }[]
374+
/** Where the lead's [bracketed] words link to. */
375+
store?: string
374376
}) {
375377
const i18n = useI18n()
376378
const state = useCopy()
@@ -380,7 +382,23 @@ export function ExtensionDownload(props: {
380382
<section data-component="block" data-slot="product-download" data-section="download">
381383
<SectionHeading id="download" title={i18n.t("download.action.install")} label />
382384
<div data-slot="body" ref={root}>
383-
<p data-slot="lead">{props.lead}</p>
385+
<p data-slot="lead">
386+
<For each={props.lead.split(/(\[[^\]]+\])/)}>
387+
{(part) =>
388+
part.startsWith("[") && part.endsWith("]") ? (
389+
<Show when={props.store} fallback={part.slice(1, -1)}>
390+
{(href) => (
391+
<a href={href()} target="_blank" rel="noopener">
392+
{part.slice(1, -1)}
393+
</a>
394+
)}
395+
</Show>
396+
) : (
397+
part
398+
)
399+
}
400+
</For>
401+
</p>
384402
<Show when={props.commands ?? (props.command ? [{ method: props.command.split(" ")[0], command: props.command }] : undefined)}>
385403
{(commands) => (
386404
<ul data-component="download-list">

‎services/site/src/component/site/extension-data.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ export const extensionPages: readonly Extension[] = [
5151
{ title: "Allowlists", body: "Limit a session's tabs to the sites you name." },
5252
],
5353
install: {
54-
lead: "Install the Chrome extension first. It walks you through the rest of the steps. To install the CLI directly, use any of these.",
54+
lead: "Install the [Chrome extension] first. It walks you through the rest of the steps. To install the CLI directly (you should not need to do this), use any of these.",
5555
commands: [
5656
{ method: "curl", command: "curl -fsSL https://opencode.ai/browse/install | bash" },
57-
{ method: "powershell", command: "irm https://opencode.ai/browse/install.ps1 | iex" },
57+
{ method: "pwsh", command: "irm https://opencode.ai/browse/install.ps1 | iex" },
5858
{ method: "npm", command: "npm install -g @opencode/browse && browse install" },
5959
{ method: "bun", command: "bun add -g @opencode/browse && browse install" },
6060
],

‎services/site/src/component/site/extension-page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export function ExtensionPage(props: { slug: ExtensionSlug; path?: string }) {
157157
</For>
158158
</ul>
159159

160-
<ExtensionDownload lead={extension().install} command={command()} commands={data().install.commands} />
160+
<ExtensionDownload lead={extension().install} command={command()} commands={data().install.commands} store={data().store} />
161161

162162
<MoreFromAnomaly slot="more-from-anomaly" exclude={props.slug} />
163163
</Site>

‎services/site/src/i18n/content/ar.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export const content = {
198198
allowlists: { title: "قوائم السماح", body: "اقصر علامات تبويب الجلسة على المواقع التي تحددها." },
199199
},
200200
install:
201-
"ثبّت إضافة Chrome أولًا، وستُرشدك خلال بقية الخطوات. لتثبيت CLI مباشرة، استخدم أيًّا من هذه الأوامر.",
201+
"ثبّت [إضافة Chrome] أولًا، وستُرشدك خلال بقية الخطوات. لتثبيت CLI مباشرة (لن تحتاج إلى ذلك عادةً)، استخدم أيًّا من هذه الأوامر.",
202202
},
203203
},
204204
apps: {

‎services/site/src/i18n/content/br.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ export const content = {
390390
},
391391
},
392392
install:
393-
"Instale a extensão do Chrome primeiro. Ela guia você pelo resto dos passos. Para instalar a CLI diretamente, use qualquer um destes.",
393+
"Instale a [extensão do Chrome] primeiro. Ela guia você pelo resto dos passos. Para instalar a CLI diretamente (você não deve precisar disso), use qualquer um destes.",
394394
},
395395
},
396396
apps: {

‎services/site/src/i18n/content/da.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export const content = {
269269
allowlists: { title: "Hvidlister", body: "Begræns en sessions faner til de sites, du angiver." },
270270
},
271271
install:
272-
"Installer Chrome-udvidelsen først. Den guider dig gennem resten af trinene. Vil du installere CLI'en direkte, så brug en af disse.",
272+
"Installer [Chrome-udvidelsen] først. Den guider dig gennem resten af trinene. Vil du installere CLI'en direkte (det burde du ikke have brug for), så brug en af disse.",
273273
},
274274
},
275275
apps: {

‎services/site/src/i18n/content/de.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export const content = {
302302
allowlists: { title: "Allowlists", body: "Beschränke die Tabs einer Session auf die Websites, die du nennst." },
303303
},
304304
install:
305-
"Installiere zuerst die Chrome-Extension. Sie führt dich durch die restlichen Schritte. Um die CLI direkt zu installieren, nimm einen dieser Befehle.",
305+
"Installiere zuerst die [Chrome-Extension]. Sie führt dich durch die restlichen Schritte. Um die CLI direkt zu installieren (das solltest du nicht brauchen), nimm einen dieser Befehle.",
306306
},
307307
},
308308
apps: {

‎services/site/src/i18n/content/es.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const content = {
365365
},
366366
},
367367
install:
368-
"Instala primero la extensión de Chrome. Te guía por el resto de los pasos. Para instalar la CLI directamente, usa cualquiera de estos.",
368+
"Instala primero la [extensión de Chrome]. Te guía por el resto de los pasos. Para instalar la CLI directamente (no deberías necesitarlo), usa cualquiera de estos.",
369369
},
370370
},
371371
apps: {

‎services/site/src/i18n/content/fr.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const content = {
365365
},
366366
},
367367
install:
368-
"Installez d'abord l'extension Chrome. Elle vous guide pour le reste des étapes. Pour installer la CLI directement, utilisez l'une de ces commandes.",
368+
"Installez d'abord l'[extension Chrome]. Elle vous guide pour le reste des étapes. Pour installer la CLI directement (vous ne devriez pas en avoir besoin), utilisez l'une de ces commandes.",
369369
},
370370
},
371371
apps: {

‎services/site/src/i18n/content/it.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const content = {
365365
},
366366
},
367367
install:
368-
"Installa prima l'estensione di Chrome. Ti guida nel resto dei passaggi. Per installare la CLI direttamente, usa uno di questi.",
368+
"Installa prima l'[estensione di Chrome]. Ti guida nel resto dei passaggi. Per installare la CLI direttamente (non dovrebbe servirti), usa uno di questi.",
369369
},
370370
},
371371
apps: {

0 commit comments

Comments
 (0)