diff --git a/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs b/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs index b0801a9..77b45ee 100644 --- a/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs @@ -29,6 +29,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase public Func? ShowSettingsModal { get; set; } public Func? ShowListSettingsModal { get; set; } public Func? ShowWorktreesOverviewModal { get; set; } + public Func? ShowRepoImportModal { get; set; } [RelayCommand] private async Task OpenSettings() @@ -50,6 +51,16 @@ public sealed partial class ListsIslandViewModel : ViewModelBase await RefreshRowAsync(row.Id); } + [RelayCommand] + private async System.Threading.Tasks.Task OpenRepoImportAsync() + { + if (ShowRepoImportModal is null || _services is null) return; + var vm = _services.GetRequiredService(); + await vm.LoadAsync(); + await ShowRepoImportModal(vm); + await LoadAsync(); + } + private bool _worktreesOverviewOpen; [RelayCommand] diff --git a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml index 030091d..c681d14 100644 --- a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml +++ b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml @@ -168,19 +168,28 @@ - - + + + + + diff --git a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml.cs b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml.cs index 7351071..d14acad 100644 --- a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml.cs +++ b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml.cs @@ -30,6 +30,14 @@ public partial class ListsIslandView : UserControl if (top is null) window.Show(); else await window.ShowDialog(top); }; + vm.ShowRepoImportModal = async modal => + { + var window = new RepoImportModalView { DataContext = modal }; + modal.CloseAction = () => window.Close(); + var top = TopLevel.GetTopLevel(this) as Window; + if (top is null) window.Show(); + else await window.ShowDialog(top); + }; vm.ShowWorktreesOverviewModal = async modal => { var top = TopLevel.GetTopLevel(this) as Window;