finished about menu
This commit is contained in:
@@ -11,10 +11,12 @@ from ui.widgets.channel import Channel
|
|||||||
from ui.widgets.context_menu import ContextMenu, NoSelectStatic
|
from ui.widgets.context_menu import ContextMenu, NoSelectStatic
|
||||||
from ui.widgets.chunk_types.audio import AudioChunk, Chunk
|
from ui.widgets.chunk_types.audio import AudioChunk, Chunk
|
||||||
from ui.screens.settings import SettingsScreen
|
from ui.screens.settings import SettingsScreen
|
||||||
|
from ui.screens.license_screen import LicenseScreen
|
||||||
|
|
||||||
from project import ProjectChannel, Project, ChunkType
|
from project import ProjectChannel, Project, ChunkType
|
||||||
from settings_store import ConfigHandler
|
from settings_store import ConfigHandler
|
||||||
|
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
|
||||||
class AppUI(App):
|
class AppUI(App):
|
||||||
@@ -60,6 +62,7 @@ class AppUI(App):
|
|||||||
if choice == None: return
|
if choice == None: return
|
||||||
|
|
||||||
match choice:
|
match choice:
|
||||||
|
# File menu
|
||||||
case "Save":
|
case "Save":
|
||||||
if not self.open_project_path:
|
if not self.open_project_path:
|
||||||
self.handle_menu_click("Save as") # just move it to save as
|
self.handle_menu_click("Save as") # just move it to save as
|
||||||
@@ -143,6 +146,13 @@ class AppUI(App):
|
|||||||
case "Settings":
|
case "Settings":
|
||||||
self.push_screen(SettingsScreen())
|
self.push_screen(SettingsScreen())
|
||||||
|
|
||||||
|
# About menu
|
||||||
|
case "Chookspace repo":
|
||||||
|
webbrowser.open("https://chookspace.com/SpookyDervish/Terminal-DAW")
|
||||||
|
self.notify("Openned the repo in your default browser.")
|
||||||
|
case "License":
|
||||||
|
self.push_screen(LicenseScreen())
|
||||||
|
|
||||||
case _:
|
case _:
|
||||||
self.notify("Sorry, that isn't implemented yet... ;-;", severity="warning")
|
self.notify("Sorry, that isn't implemented yet... ;-;", severity="warning")
|
||||||
|
|
||||||
@@ -168,7 +178,7 @@ class AppUI(App):
|
|||||||
],
|
],
|
||||||
"About": [
|
"About": [
|
||||||
"Chookspace repo",
|
"Chookspace repo",
|
||||||
"Copyright"
|
"License"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
37
src/ui/screens/license_screen.py
Normal file
37
src/ui/screens/license_screen.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
from textual.screen import ModalScreen
|
||||||
|
from textual.containers import HorizontalGroup, Vertical
|
||||||
|
from textual.app import ComposeResult
|
||||||
|
from textual.widgets import Static
|
||||||
|
from textual.binding import Binding
|
||||||
|
|
||||||
|
|
||||||
|
class LicenseScreen(ModalScreen):
|
||||||
|
DEFAULT_CSS = """
|
||||||
|
LicenseScreen {
|
||||||
|
align: center middle;
|
||||||
|
|
||||||
|
#center {
|
||||||
|
width: 65;
|
||||||
|
height: 12;
|
||||||
|
border: panel $primary;
|
||||||
|
|
||||||
|
align: center top;
|
||||||
|
padding: 1 2;
|
||||||
|
|
||||||
|
Static {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
BINDINGS = [
|
||||||
|
Binding("escape", "dismiss", "Cancel", tooltip="Close")
|
||||||
|
]
|
||||||
|
|
||||||
|
def compose(self) -> ComposeResult:
|
||||||
|
with Vertical(id="center") as center:
|
||||||
|
center.border_title = "License"
|
||||||
|
yield Static("[b]=== Copyright © 2026 ===[/b]\n\nTerminal-DAW is licensed under the GPL-3.0 License and will always be hosted on https://chookspace.com under the account SpookyDervish.\n\n[d]I hope you enjoy what I've made even if it isn't perfect. :P - SpookyDervish[/d]")
|
||||||
Reference in New Issue
Block a user