Skip to content

Commit

Permalink
Created draft TUI app and .tcss file with some arbitrary parameters f…
Browse files Browse the repository at this point in the history
…or testing.
  • Loading branch information
b-peri committed Oct 3, 2023
1 parent 3f93654 commit 16c2564
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions datashuttle/tui/css/tab_content.tcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Screen {
padding: 0;
}
TabbedContent {
width: 100%
}
#create_text {
text-style: italic;
}
27 changes: 27 additions & 0 deletions datashuttle/tui/view/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from pathlib import Path

from textual.app import App, ComposeResult
from textual.widgets import Header, Label, TabbedContent, TabPane

# from textual import events


class MyApp(App):
TITLE = "DataShuttle"

tui_path = Path(__file__).parents[1]
CSS_PATH = rf"{tui_path}\css\tab_content.tcss"

def compose(self) -> ComposeResult:
yield Header()
# yield Label("Do you love DataShuttle?", id = "question")
with TabbedContent():
with TabPane("Create", id="create"):
yield Label("Create", id="create_text")
with TabPane("Transfer", id="transfer"):
yield Label("Transfer; Seems to work!")


if __name__ == "__main__":
app = MyApp()
app.run()

0 comments on commit 16c2564

Please sign in to comment.