fix bug
This commit is contained in:
@@ -21,6 +21,7 @@ struct ContentView: View {
|
||||
setupView
|
||||
}
|
||||
}
|
||||
.overlay(multiRepoSelectionOverlay)
|
||||
.preferredColorScheme(.dark)
|
||||
.onAppear {
|
||||
// 自动加载已保存的配置
|
||||
@@ -35,6 +36,30 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var multiRepoSelectionOverlay: some View {
|
||||
if let pending = settingsVM.pendingMultiRepoSelection {
|
||||
SelectionModal(
|
||||
title: "选择\(pending.target.title)仓库",
|
||||
icon: "list.bullet.rectangle.portrait.fill",
|
||||
items: pending.options,
|
||||
selectedItem: nil,
|
||||
itemTitle: { $0.name },
|
||||
onSelect: { option in
|
||||
Task {
|
||||
await settingsVM.selectPendingMultiRepoOption(option)
|
||||
if settingsVM.configSuccess {
|
||||
appState.applyLoadedConfigState()
|
||||
}
|
||||
}
|
||||
},
|
||||
onCancel: {
|
||||
settingsVM.cancelPendingMultiRepoSelection()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - 主界面
|
||||
|
||||
private var mainTabView: some View {
|
||||
|
||||
Reference in New Issue
Block a user