Improve SidebarView

This commit is contained in:
世界
2025-11-26 22:25:53 +08:00
parent c5fd6a6b4e
commit 8855e0eef9
2 changed files with 45 additions and 87 deletions
+1 -2
View File
@@ -18,7 +18,7 @@ public struct MainView: View {
public var body: some View {
NavigationSplitView {
SidebarView()
SidebarView(selection: $viewModel.selection)
.navigationSplitViewColumnWidth(150)
} detail: {
NavigationStack {
@@ -60,7 +60,6 @@ public struct MainView: View {
.onReceive(environments.openSettings) {
viewModel.openSettings()
}
.environment(\.selection, $viewModel.selection)
.environment(\.importProfile, $viewModel.importProfile)
.environment(\.importRemoteProfile, $viewModel.importRemoteProfile)
.environment(\.profileEditor, profileEditor)