diff options
| author | GitHub Action <[email protected]> | 2025-11-08 01:59:02 +0000 |
|---|---|---|
| committer | GitHub Action <[email protected]> | 2025-11-08 01:59:02 +0000 |
| commit | 34ff87d504836ff71b3bb2d466842c00ee3c5ec2 (patch) | |
| tree | cc8ac777f2f082ff676b179017c7dc0f3270314b /packages/console/app/src/routes/workspace | |
| parent | 16357e804145b7f96a2a53badb7dcb6c5453dafe (diff) | |
| download | opencode-34ff87d504836ff71b3bb2d466842c00ee3c5ec2.tar.gz opencode-34ff87d504836ff71b3bb2d466842c00ee3c5ec2.zip | |
chore: format code
Diffstat (limited to 'packages/console/app/src/routes/workspace')
11 files changed, 28 insertions, 101 deletions
diff --git a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx index 9e51bbe10..05f8edd01 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/billing-section.tsx @@ -133,8 +133,7 @@ export function BillingSection() { <div data-slot="section-title"> <h2>Billing</h2> <p> - Manage payments methods. <a href="mailto:[email protected]">Contact us</a> if you have any - questions. + Manage payments methods. <a href="mailto:[email protected]">Contact us</a> if you have any questions. </p> </div> <div data-slot="section-content"> @@ -164,32 +163,20 @@ export function BillingSection() { placeholder="Enter amount" /> <div data-slot="form-actions"> - <button - data-color="ghost" - type="button" - onClick={() => hideAddBalanceForm()} - > + <button data-color="ghost" type="button" onClick={() => hideAddBalanceForm()}> Cancel </button> <button data-color="primary" type="button" - disabled={ - !store.addBalanceAmount || - checkoutSubmission.pending || - store.checkoutRedirecting - } + disabled={!store.addBalanceAmount || checkoutSubmission.pending || store.checkoutRedirecting} onClick={onClickCheckout} > - {checkoutSubmission.pending || store.checkoutRedirecting - ? "Loading..." - : "Add"} + {checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Add"} </button> </div> </div> - <Show - when={checkoutSubmission.result && (checkoutSubmission.result as any).error} - > + <Show when={checkoutSubmission.result && (checkoutSubmission.result as any).error}> {(err: any) => <div data-slot="form-error">{err()}</div>} </Show> </div> @@ -210,10 +197,7 @@ export function BillingSection() { <div data-slot="card-details"> <Switch> <Match when={billingInfo()?.paymentMethodType === "card"}> - <Show - when={billingInfo()?.paymentMethodLast4} - fallback={<span data-slot="number">----</span>} - > + <Show when={billingInfo()?.paymentMethodLast4} fallback={<span data-slot="number">----</span>}> <span data-slot="secret">••••</span> <span data-slot="number">{billingInfo()?.paymentMethodLast4}</span> </Show> @@ -241,9 +225,7 @@ export function BillingSection() { disabled={checkoutSubmission.pending || store.checkoutRedirecting} onClick={onClickCheckout} > - {checkoutSubmission.pending || store.checkoutRedirecting - ? "Loading..." - : "Enable Billing"} + {checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable Billing"} </button> </Show> </div> diff --git a/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx index e6461ac83..77c017964 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/monthly-limit-section.tsx @@ -104,13 +104,9 @@ export function MonthlyLimitSection() { </button> </Show> </div> - <Show - when={billingInfo()?.monthlyLimit} - fallback={<p data-slot="usage-status">No usage limit set.</p>} - > + <Show when={billingInfo()?.monthlyLimit} fallback={<p data-slot="usage-status">No usage limit set.</p>}> <p data-slot="usage-status"> - Current usage for{" "} - {new Date().toLocaleDateString("en-US", { month: "long", timeZone: "UTC" })} is $ + Current usage for {new Date().toLocaleDateString("en-US", { month: "long", timeZone: "UTC" })} is $ {(() => { const dateLastUsed = billingInfo()?.timeMonthlyUsageUpdated if (!dateLastUsed) return "0" diff --git a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx index a7218546d..0fb2a0df6 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/payment-section.tsx @@ -89,10 +89,7 @@ export function PaymentSection() { <td data-slot="payment-receipt"> <button onClick={async () => { - const receiptUrl = await downloadReceiptAction( - params.id, - payment.paymentID!, - ) + const receiptUrl = await downloadReceiptAction(params.id, payment.paymentID!) if (receiptUrl) { window.open(receiptUrl, "_blank") } diff --git a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx index 50d00ef30..8dcc4da92 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx @@ -69,11 +69,7 @@ export function ReloadSection() { }) createEffect(() => { - if ( - !setReloadSubmission.pending && - setReloadSubmission.result && - !(setReloadSubmission.result as any).error - ) { + if (!setReloadSubmission.pending && setReloadSubmission.result && !(setReloadSubmission.result as any).error) { setStore("show", false) } }) @@ -108,8 +104,8 @@ export function ReloadSection() { } > <p> - Auto reload is <b>enabled</b>. We'll reload <b>${billingInfo()?.reloadAmount}</b>{" "} - (+$1.23 processing fee) when balance reaches <b>${billingInfo()?.reloadTrigger}</b>. + Auto reload is <b>enabled</b>. We'll reload <b>${billingInfo()?.reloadAmount}</b> (+$1.23 processing fee) + when balance reaches <b>${billingInfo()?.reloadTrigger}</b>. </p> </Show> <button data-color="primary" type="button" onClick={() => show()}> @@ -194,8 +190,8 @@ export function ReloadSection() { minute: "2-digit", second: "2-digit", })} - . Reason: {billingInfo()?.reloadError?.replace(/\.$/, "")}. Please update your payment - method and try again. + . Reason: {billingInfo()?.reloadError?.replace(/\.$/, "")}. Please update your payment method and try + again. </p> <form action={reload} method="post" data-slot="create-form"> <input type="hidden" name="workspaceID" value={params.id} /> diff --git a/packages/console/app/src/routes/workspace/[id]/index.tsx b/packages/console/app/src/routes/workspace/[id]/index.tsx index 2e7f7d64b..45f67ca38 100644 --- a/packages/console/app/src/routes/workspace/[id]/index.tsx +++ b/packages/console/app/src/routes/workspace/[id]/index.tsx @@ -51,9 +51,7 @@ export default function () { disabled={checkoutSubmission.pending || store.checkoutRedirecting} onClick={onClickCheckout} > - {checkoutSubmission.pending || store.checkoutRedirecting - ? "Loading..." - : "Enable billing"} + {checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable billing"} </button> } > diff --git a/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx b/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx index e1c2c00cf..565981c7f 100644 --- a/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/keys/key-section.tsx @@ -146,20 +146,14 @@ export function KeySection() { title="Copy API key" > <span>{key.keyDisplay}</span> - <Show - when={copied()} - fallback={<IconCopy style={{ width: "14px", height: "14px" }} />} - > + <Show when={copied()} fallback={<IconCopy style={{ width: "14px", height: "14px" }} />}> <IconCheck style={{ width: "14px", height: "14px" }} /> </Show> </button> </Show> </td> <td data-slot="key-user-email">{key.email}</td> - <td - data-slot="key-last-used" - title={key.timeUsed ? formatDateUTC(key.timeUsed) : undefined} - > + <td data-slot="key-last-used" title={key.timeUsed ? formatDateUTC(key.timeUsed) : undefined}> {key.timeUsed ? formatDateForTable(key.timeUsed) : "-"} </td> <td data-slot="key-actions"> diff --git a/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx b/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx index 4b2a12fdc..5aa1b969e 100644 --- a/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/members/member-section.tsx @@ -85,12 +85,7 @@ const updateMember = action(async (form: FormData) => { ) }, "member.update") -function MemberRow(props: { - member: any - workspaceID: string - actorID: string - actorRole: string -}) { +function MemberRow(props: { member: any; workspaceID: string; actorID: string; actorRole: string }) { const submission = useSubmission(updateMember) const isCurrentUser = () => props.actorID === props.member.id const isAdmin = () => props.actorRole === "admin" diff --git a/packages/console/app/src/routes/workspace/[id]/model-section.tsx b/packages/console/app/src/routes/workspace/[id]/model-section.tsx index 223d69fc8..7a1980ebe 100644 --- a/packages/console/app/src/routes/workspace/[id]/model-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/model-section.tsx @@ -5,15 +5,7 @@ import { withActor } from "~/context/auth.withActor" import { ZenData } from "@opencode-ai/console-core/model.js" import styles from "./model-section.module.css" import { querySessionInfo } from "../common" -import { - IconAlibaba, - IconAnthropic, - IconMoonshotAI, - IconOpenAI, - IconStealth, - IconXai, - IconZai, -} from "~/component/icon" +import { IconAlibaba, IconAnthropic, IconMoonshotAI, IconOpenAI, IconStealth, IconXai, IconZai } from "~/component/icon" const getModelLab = (modelId: string) => { if (modelId.startsWith("claude")) return "Anthropic" @@ -76,8 +68,7 @@ export function ModelSection() { <div data-slot="section-title"> <h2>Models</h2> <p> - Manage which models workspace members can access.{" "} - <a href="/docs/zen#pricing ">Learn more</a>. + Manage which models workspace members can access. <a href="/docs/zen#pricing ">Learn more</a>. </p> </div> <div data-slot="models-list"> diff --git a/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx b/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx index 7b949c661..65edc6847 100644 --- a/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/new-user-section.tsx @@ -43,24 +43,15 @@ export function NewUserSection() { <div data-component="feature-grid"> <div data-slot="feature"> <h3>Tested & Verified Models</h3> - <p> - We've benchmarked and tested models specifically for coding agents to ensure the best - performance. - </p> + <p>We've benchmarked and tested models specifically for coding agents to ensure the best performance.</p> </div> <div data-slot="feature"> <h3>Highest Quality</h3> - <p> - Access models configured for optimal performance - no downgrades or routing to cheaper - providers. - </p> + <p>Access models configured for optimal performance - no downgrades or routing to cheaper providers.</p> </div> <div data-slot="feature"> <h3>No Lock-in</h3> - <p> - Use Zen with any coding agent, and continue using other providers with opencode - whenever you want. - </p> + <p>Use Zen with any coding agent, and continue using other providers with opencode whenever you want.</p> </div> </div> diff --git a/packages/console/app/src/routes/workspace/[id]/provider-section.tsx b/packages/console/app/src/routes/workspace/[id]/provider-section.tsx index 67314fbdc..5419ed7fb 100644 --- a/packages/console/app/src/routes/workspace/[id]/provider-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/provider-section.tsx @@ -55,10 +55,7 @@ const listProviders = query(async (workspaceID: string) => { function ProviderRow(props: { provider: Provider }) { const params = useParams() const providers = createAsync(() => listProviders(params.id)) - const saveSubmission = useSubmission( - saveProvider, - ([fd]) => fd.get("provider")?.toString() === props.provider.key, - ) + const saveSubmission = useSubmission(saveProvider, ([fd]) => fd.get("provider")?.toString() === props.provider.key) const removeSubmission = useSubmission( removeProvider, ([fd]) => fd.get("provider")?.toString() === props.provider.key, @@ -94,16 +91,9 @@ function ProviderRow(props: { provider: Provider }) { <td data-slot="provider-key"> <Show when={store.editing} - fallback={ - <span>{providerData() ? maskCredentials(providerData()!.credentials) : "-"}</span> - } + fallback={<span>{providerData() ? maskCredentials(providerData()!.credentials) : "-"}</span>} > - <form - id={`provider-form-${props.provider.key}`} - action={saveProvider} - method="post" - data-slot="edit-form" - > + <form id={`provider-form-${props.provider.key}`} action={saveProvider} method="post" data-slot="edit-form"> <div data-slot="input-wrapper"> <input ref={(r) => (input = r)} diff --git a/packages/console/app/src/routes/workspace/common.tsx b/packages/console/app/src/routes/workspace/common.tsx index 5b638192c..a6eaaeb1e 100644 --- a/packages/console/app/src/routes/workspace/common.tsx +++ b/packages/console/app/src/routes/workspace/common.tsx @@ -67,10 +67,7 @@ export const querySessionInfo = query(async (workspaceID: string) => { return withActor(() => { return { isAdmin: Actor.userRole() === "admin", - isBeta: - Resource.App.stage === "production" - ? workspaceID === "wrk_01K46JDFR0E75SG2Q8K172KF3Y" - : true, + isBeta: Resource.App.stage === "production" ? workspaceID === "wrk_01K46JDFR0E75SG2Q8K172KF3Y" : true, } }, workspaceID) }, "session.get") |
