Skip to content

Commit 639c8e6

Browse files
authored
tweak: update OAuth callback branding (anomalyco#34081)
1 parent e3bfd4c commit 639c8e6

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

packages/core/src/oauth/page.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// offline and drop into any transport (`res.end(...)`, Effect `response.end`,
77
// etc.).
88
//
9-
// The visual language mirrors the opencode app: the design tokens are a curated
9+
// The visual language mirrors the OpenCode app: the design tokens are a curated
1010
// subset of the OC-2 semantic tokens in `packages/ui/src/styles/theme.css`, and
1111
// the wordmark is the same geometry as `packages/ui/src/components/logo.tsx`.
1212
// Keep this file in sync with those sources when the brand changes.
@@ -25,8 +25,8 @@ export function success(options?: CallbackPageOptions) {
2525
body: renderCard({
2626
status: "success",
2727
headline: "Authorization successful",
28-
message: provider ? `opencode is now connected to ${escapeHtml(provider)}.` : "opencode is now authorized.",
29-
footnote: "You can close this window and return to opencode.",
28+
message: provider ? `OpenCode is now connected to ${escapeHtml(provider)}.` : "OpenCode is now authorized.",
29+
footnote: "You can close this window.",
3030
}),
3131
script: options?.autoClose === false ? undefined : AUTO_CLOSE_SCRIPT,
3232
})
@@ -40,10 +40,10 @@ export function error(detail: string, options?: CallbackPageOptions) {
4040
status: "error",
4141
headline: "Authorization failed",
4242
message: provider
43-
? `opencode couldn't finish connecting to ${escapeHtml(provider)}.`
44-
: "opencode couldn't complete authorization.",
43+
? `OpenCode couldn't finish connecting to ${escapeHtml(provider)}.`
44+
: "OpenCode couldn't complete authorization.",
4545
detail,
46-
footnote: "Close this window and try again from opencode.",
46+
footnote: "Close this window and try again from OpenCode.",
4747
}),
4848
})
4949
}
@@ -100,7 +100,7 @@ function renderDocument(input: { title: string; body: string; script?: string })
100100
<meta charset="utf-8" />
101101
<meta name="viewport" content="width=device-width, initial-scale=1" />
102102
<meta name="robots" content="noindex" />
103-
<title>${escapeHtml(input.title)} · opencode</title>
103+
<title>${escapeHtml(input.title)} · OpenCode</title>
104104
<style>${STYLES}</style>
105105
</head>
106106
<body>
@@ -116,8 +116,8 @@ function bootstrapScript(options: BootstrapOptions) {
116116
var TOKEN_URL=new URL(${scriptString(options.tokenPath)},window.location.origin).href;
117117
(function(){
118118
var card=document.getElementById("oc-card"),headline=document.getElementById("oc-headline"),message=document.getElementById("oc-message"),detail=document.getElementById("oc-detail"),footnote=document.getElementById("oc-footnote");
119-
function fail(text){card.dataset.status="error";headline.textContent="Authorization failed";message.textContent=PROVIDER?("opencode couldn't finish connecting to "+PROVIDER+"."):"opencode couldn't complete authorization.";if(text){detail.textContent=text;detail.hidden=false}footnote.textContent="Close this window and try again from opencode."}
120-
function ok(){card.dataset.status="success";headline.textContent="Authorization successful";message.textContent=PROVIDER?("opencode is now connected to "+PROVIDER+"."):"opencode is now authorized.";detail.hidden=true;footnote.textContent="You can close this window and return to opencode.";setTimeout(function(){try{window.close()}catch(e){}},2500)}
119+
function fail(text){card.dataset.status="error";headline.textContent="Authorization failed";message.textContent=PROVIDER?("OpenCode couldn't finish connecting to "+PROVIDER+"."):"OpenCode couldn't complete authorization.";if(text){detail.textContent=text;detail.hidden=false}footnote.textContent="Close this window and try again from OpenCode."}
120+
function ok(){card.dataset.status="success";headline.textContent="Authorization successful";message.textContent=PROVIDER?("OpenCode is now connected to "+PROVIDER+"."):"OpenCode is now authorized.";detail.hidden=true;footnote.textContent="You can close this window.";setTimeout(function(){try{window.close()}catch(e){}},2500)}
121121
try{
122122
var hash=new URLSearchParams((window.location.hash||"").slice(1));
123123
var search=new URLSearchParams(window.location.search||"");
@@ -249,8 +249,8 @@ const STYLES = `
249249
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
250250
`
251251

252-
// opencode wordmark — same path geometry as packages/ui/src/components/logo.tsx (Logo).
253-
const WORDMARK = `<svg class="wordmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 234 42" fill="none" aria-label="opencode" role="img">
252+
// OpenCode wordmark — same path geometry as packages/ui/src/components/logo.tsx (Logo).
253+
const WORDMARK = `<svg class="wordmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 234 42" fill="none" aria-label="OpenCode" role="img">
254254
<path d="M18 30H6V18H18V30Z" fill="var(--oc-icon-weak)" />
255255
<path d="M18 12H6V30H18V12ZM24 36H0V6H24V36Z" fill="var(--oc-icon-base)" />
256256
<path d="M48 30H36V18H48V30Z" fill="var(--oc-icon-weak)" />

0 commit comments

Comments
 (0)