Skip to content

Commit

Permalink
Add tab for suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
xBaank committed Jul 25, 2024
1 parent 6dcab8f commit aa64561
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
44 changes: 40 additions & 4 deletions Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@
ColorScheme = customColors
};

var videosWin = new Window
var videosWin = new View
{
Title = "Videos",
X = Pos.Right(queueWin),
BorderStyle = LineStyle.Rounded,
Y = Pos.Bottom(searchWin),
Width = Dim.Fill(),
Height = Dim.Fill() - 8,
Expand Down Expand Up @@ -107,8 +105,46 @@ out var time

top.Add(queueWin, searchWin, videosWin, playerWin, statusBar);

var tabView = new TabView
{
X = 0,
Y = 0,
Width = Dim.Fill(),
Height = Dim.Fill()
};

var resultsTab = new Tab
{
DisplayText = "Results",
X = 0,
Y = 0,
Width = Dim.Fill(),
Height = Dim.Fill()
};
var suggestionsTab = new Tab
{
DisplayText = "Suggestions",
X = 0,
Y = 0,
Width = Dim.Fill(),
Height = Dim.Fill()
};

resultsTab.View = new View
{
X = 0,
Y = 0,
Width = Dim.Fill(),
Height = Dim.Fill()
};

tabView.AddTab(resultsTab, true);
tabView.AddTab(suggestionsTab, false);

videosWin.Add(tabView);

var player = new PlayerView(playerWin, playerController);
var videosResults = new VideosResultsView(videosWin, playerController);
var videosResults = new VideosResultsView(resultsTab.View, playerController);
var videoSearch = new VideoSearchView(searchWin, videosResults, playerController);
var queue = new QueueView(queueWin, playerController);
videoSearch.ShowSearch();
Expand Down
2 changes: 1 addition & 1 deletion Console/Views/VideosResultsView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Console.Views;

public class VideosResultsView(Window win, PlayerController playerController)
public class VideosResultsView(View win, PlayerController playerController)
{
private SpinnerView? spinner = null;

Expand Down

0 comments on commit aa64561

Please sign in to comment.