summaryrefslogtreecommitdiffstats
path: root/ui/main_window.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-05-03 10:43:31 +0200
committerDanilo M. <danix@danix.xyz>2026-05-03 10:43:31 +0200
commit9caf81db7e50552bb7b496b9d467bd344458a429 (patch)
tree656e28d90294e73aee732560f20e6b76b083cebe /ui/main_window.py
parent8263e7374d2c81ed0a64481a978d6e7157016b08 (diff)
downloadpublisher-9caf81db7e50552bb7b496b9d467bd344458a429.tar.gz
publisher-9caf81db7e50552bb7b496b9d467bd344458a429.zip
feat: hugo server panel with start/stop and log streaming
Diffstat (limited to 'ui/main_window.py')
-rw-r--r--ui/main_window.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/main_window.py b/ui/main_window.py
index ad7134f..463c3dc 100644
--- a/ui/main_window.py
+++ b/ui/main_window.py
@@ -98,8 +98,14 @@ class MainWindow(QMainWindow):
self._stack.addWidget(self._git_view)
self._page_git = self._stack.count() - 1
+ from ui.hugo_panel import HugoPanel
+
+ self._hugo_panel = HugoPanel(Path(self.config.blog_repo), parent=self)
+ self._stack.addWidget(self._hugo_panel)
+ self._page_hugo = self._stack.count() - 1
+
# Remaining placeholders
- for name in ["taxonomy", "media", "hugo"]:
+ for name in ["taxonomy", "media"]:
w = QLabel(f"[{name}]")
w.setAlignment(Qt.AlignmentFlag.AlignCenter)
self._stack.addWidget(w)
@@ -249,3 +255,7 @@ class MainWindow(QMainWindow):
def _on_fs_change(self, _path: str):
self._refresh_articles()
+
+ def closeEvent(self, event):
+ self._hugo_panel._worker.stop()
+ super().closeEvent(event)