mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 01:51:21 +08:00
fix: return to settings view after migration wizard when opened from settings
This commit is contained in:
@@ -164,6 +164,7 @@ export const LanguageBridge: Component<{ children: any }> = (props) => {
|
||||
// Inner app component that uses the contexts
|
||||
const AppContent: Component = () => {
|
||||
const [currentView, setCurrentView] = createSignal<ViewType>("newTask")
|
||||
const [migrationReturnView, setMigrationReturnView] = createSignal<ViewType>("newTask") // legacy-migration
|
||||
const session = useSession()
|
||||
const server = useServer()
|
||||
|
||||
@@ -248,12 +249,20 @@ const AppContent: Component = () => {
|
||||
/>
|
||||
</Match>
|
||||
<Match when={currentView() === "settings"}>
|
||||
<Settings onMigrateClick={() => setCurrentView("migration")} />
|
||||
<Settings
|
||||
onMigrateClick={() => {
|
||||
setMigrationReturnView("settings")
|
||||
setCurrentView("migration")
|
||||
}}
|
||||
/>
|
||||
{/* legacy-migration */}
|
||||
</Match>
|
||||
{/* legacy-migration start */}
|
||||
<Match when={currentView() === "migration"}>
|
||||
<MigrationWizard onBack={() => setCurrentView("newTask")} onComplete={() => setCurrentView("newTask")} />
|
||||
<MigrationWizard
|
||||
onBack={() => setCurrentView(migrationReturnView())}
|
||||
onComplete={() => setCurrentView(migrationReturnView())}
|
||||
/>
|
||||
</Match>
|
||||
{/* legacy-migration end */}
|
||||
</Switch>
|
||||
|
||||
Reference in New Issue
Block a user