Add kimai "visible" field, moar kimai screens
This commit is contained in:
@ -7,7 +7,16 @@ from textual.coordinate import Coordinate
|
||||
from textual.containers import Horizontal, Vertical
|
||||
from textual.events import DescendantBlur
|
||||
from textual.screen import Screen, ModalScreen
|
||||
from textual.widgets import Header, Footer, DataTable, Input, Label, Checkbox, TabbedContent, TabPane
|
||||
from textual.widgets import (
|
||||
Header,
|
||||
Footer,
|
||||
DataTable,
|
||||
Input,
|
||||
Label,
|
||||
Checkbox,
|
||||
TabbedContent,
|
||||
TabPane,
|
||||
)
|
||||
|
||||
from peewee import fn, JOIN
|
||||
|
||||
@ -558,6 +567,11 @@ class HamsterScreen(Screen):
|
||||
yield ActivityList()
|
||||
yield Footer()
|
||||
|
||||
def on_mount(self) -> None:
|
||||
self.query_one("TabbedContent Tabs").can_focus = False
|
||||
self.query_one("#activities DataTable").focus()
|
||||
|
||||
def action_show_tab(self, tab: str) -> None:
|
||||
"""Switch to a new tab."""
|
||||
self.get_child_by_type(TabbedContent).active = tab
|
||||
self.query_one(f"#{tab} DataTable").focus()
|
||||
|
Reference in New Issue
Block a user