show files sidebar when viewing directory
This commit is contained in:
@@ -40,6 +40,8 @@ class RepoViewScreen(Screen):
|
|||||||
open_file: TextArea = file_screen.query_one("#open-file")
|
open_file: TextArea = file_screen.query_one("#open-file")
|
||||||
file_info = file_screen.query_one("#file-info-text")
|
file_info = file_screen.query_one("#file-info-text")
|
||||||
|
|
||||||
|
self.query_one("#repo-tree").display = True
|
||||||
|
|
||||||
self.query_one("#readme").display = False
|
self.query_one("#readme").display = False
|
||||||
self.query_one("#repo-info").display = False
|
self.query_one("#repo-info").display = False
|
||||||
files.display = False
|
files.display = False
|
||||||
@@ -100,6 +102,7 @@ class RepoViewScreen(Screen):
|
|||||||
self.query_one("#file-screen").display = False
|
self.query_one("#file-screen").display = False
|
||||||
files.clear(columns=True)
|
files.clear(columns=True)
|
||||||
loading = self.query_one(LoadingIndicator)
|
loading = self.query_one(LoadingIndicator)
|
||||||
|
self.query_one("#repo-tree").display = path != "."
|
||||||
|
|
||||||
self.query_one("#repo-info").display = path == "."
|
self.query_one("#repo-info").display = path == "."
|
||||||
|
|
||||||
@@ -252,11 +255,13 @@ class RepoViewScreen(Screen):
|
|||||||
yield Button("\ue726", flat=True, id="new-pull-request", tooltip="New Pull Request")
|
yield Button("\ue726", flat=True, id="new-pull-request", tooltip="New Pull Request")
|
||||||
yield Button("Go to file", flat=True)
|
yield Button("Go to file", flat=True)
|
||||||
|
|
||||||
|
yield RepoDirectoryTree(self.owner_name, self.repo_name, ".", id="repo-tree")
|
||||||
|
|
||||||
table = DataTable(id="files", show_cursor=False)
|
table = DataTable(id="files", show_cursor=False)
|
||||||
yield table
|
yield table
|
||||||
|
|
||||||
with Vertical(id="file-screen"):
|
with Vertical(id="file-screen"):
|
||||||
yield RepoDirectoryTree(self.owner_name, self.repo_name, ".")
|
|
||||||
with HorizontalGroup(id="file-commit"):
|
with HorizontalGroup(id="file-commit"):
|
||||||
yield Static("[b]Person[/] [r]aaaaabbbbb[/] [d]some commit message[/d]")
|
yield Static("[b]Person[/] [r]aaaaabbbbb[/] [d]some commit message[/d]")
|
||||||
with Right():
|
with Right():
|
||||||
|
|||||||
Reference in New Issue
Block a user