diff --git a/src/core/OSTreeTUI.cpp b/src/core/OSTreeTUI.cpp index 32cc11f..f6819ed 100644 --- a/src/core/OSTreeTUI.cpp +++ b/src/core/OSTreeTUI.cpp @@ -100,27 +100,8 @@ int OSTreeTUI::main(const std::string& repo, const std::vector& sta return filterManager.branchBoxRender(); }); - // promotion - ContentPromotionManager promotionManager(showTooltips); - promotionManager.setBranchRadiobox(Radiobox(&allBranches, &promotionManager.selectedBranch)); - promotionManager.setApplyButton(Button(" Apply ", [&] { - ostreeRepo.promoteCommit(visibleCommitViewMap.at(selectedCommit), - ostreeRepo.getBranches().at(static_cast(promotionManager.selectedBranch)), - {}, promotionManager.newSubject, - true); - //refresh_repository(); - notificationText = " Applied content promotion. "; - }, ButtonOption::Simple())); - Component promotionView = Renderer(promotionManager.composePromotionComponent(), [&] { - if (visibleCommitViewMap.size() <= 0) { - return text(" please select a commit to continue commit-promotion... ") | color(Color::RedLight) | bold | center; - } - return promotionManager.renderPromotionView(ostreeRepo, screen.dimy(), - ostreeRepo.getCommitList().at(visibleCommitViewMap.at(selectedCommit))); - }); - // interchangeable view (composed) - Manager manager(infoView, filterView, promotionView); + Manager manager(infoView, filterView); Component managerRenderer = manager.managerRenderer; // FOOTER diff --git a/src/core/manager.cpp b/src/core/manager.cpp index a40e294..01d4771 100644 --- a/src/core/manager.cpp +++ b/src/core/manager.cpp @@ -12,15 +12,14 @@ // Manager -Manager::Manager(const ftxui::Component& infoView, const ftxui::Component& filterView, const ftxui::Component& promotionView) { +Manager::Manager(const ftxui::Component& infoView, const ftxui::Component& filterView) { using namespace ftxui; tabSelection = Menu(&tab_entries, &tab_index, MenuOption::HorizontalAnimated()); tabContent = Container::Tab({ infoView, - filterView, - promotionView + filterView }, &tab_index); diff --git a/src/core/manager.hpp b/src/core/manager.hpp index 4246214..8f10c82 100644 --- a/src/core/manager.hpp +++ b/src/core/manager.hpp @@ -19,7 +19,7 @@ class Manager { int tab_index{0}; std::vector tab_entries = { - " Info ", " Filter ", " Promote " + " Info ", " Filter " }; ftxui::Component tabSelection; @@ -30,7 +30,7 @@ class Manager { ftxui::Component managerRenderer; public: - Manager(const ftxui::Component& infoView, const ftxui::Component& filterView, const ftxui::Component& promotionView); + Manager(const ftxui::Component& infoView, const ftxui::Component& filterView); }; class CommitInfoManager {