you can navigate using the repo name and owner name lol
This commit is contained in:
@@ -45,7 +45,7 @@ class SearchResult(HorizontalGroup):
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
updated_string = time_delta(datetime.now() - self.updated_at)
|
||||
yield Static(f"[@click='view_user({self.author["id"]})']{self.author["login"]}[/] / [@click='screen.view_repo(\"{self.author["login"]}\",\"{self.repo_name}\")']{self.repo_name}[/]{' [d]\[[cyan]fork[/]]' if self.is_fork else ''}\n{self.description}\n[d]Updated {updated_string} ago")
|
||||
yield Static(f"[@click='app.view_user({self.author["id"]})']{self.author["login"]}[/] / [@click='app.view_repo(\"{self.author["login"]}\",\"{self.repo_name}\")']{self.repo_name}[/]{' [d]\[[cyan]fork[/]]' if self.is_fork else ''}\n{self.description}\n[d]Updated {updated_string} ago")
|
||||
|
||||
class SearchScreen(Screen):
|
||||
DEFAULT_CSS = """
|
||||
@@ -68,9 +68,6 @@ class SearchScreen(Screen):
|
||||
super().__init__()
|
||||
|
||||
self.selects_changed = [] # just used to prevent some issues
|
||||
|
||||
def action_view_repo(self, author: str, repo_name: str):
|
||||
self.app.switch_screen(RepoViewScreen(author, repo_name))
|
||||
|
||||
@work(exclusive=True)
|
||||
async def action_search_query(self):
|
||||
|
||||
Reference in New Issue
Block a user