refactor(app): unify provider connect dialog (#35518)
This commit is contained in:
@@ -1095,9 +1095,9 @@ export default function LegacyLayout(props: ParentProps) {
|
||||
|
||||
function connectProvider() {
|
||||
const run = ++dialogRun
|
||||
void import("@/components/dialog-select-provider").then((x) => {
|
||||
void import("@/components/dialog-connect-provider").then((x) => {
|
||||
if (dialogDead || dialogRun !== run) return
|
||||
dialog.show(() => <x.DialogSelectProvider />)
|
||||
void dialog.show(() => <x.DialogConnectProvider />)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -76,18 +76,11 @@ export function useUsageExceededDialogs() {
|
||||
setGoUpsellState(keys.lastSeenAt, Date.now())
|
||||
if (dontShowAgain) setGoUpsellState(keys.dontShow, Date.now())
|
||||
else {
|
||||
void import("../../components/dialog-connect-provider").then((x) =>
|
||||
dialog.show(() => (
|
||||
<x.DialogConnectProvider
|
||||
provider="opencode-go"
|
||||
onBack={() => {
|
||||
void import("../../components/dialog-select-provider").then((provider) => {
|
||||
dialog.show(() => <provider.DialogSelectProvider />)
|
||||
})
|
||||
}}
|
||||
/>
|
||||
)),
|
||||
)
|
||||
void import("../../components/dialog-connect-provider").then((x) => {
|
||||
const controller = x.useProviderConnectController()
|
||||
controller.select("opencode-go")
|
||||
void dialog.show(() => <x.DialogConnectProvider controller={controller} />)
|
||||
})
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user