mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-03 04:23:59 +03:00
add about page
This commit is contained in:
+4
-1
@@ -15,6 +15,7 @@ from .pages.playlists import PlaylistManagerPage
|
||||
from .pages.queue import QueuePage
|
||||
from .pages.logs import LogsPage
|
||||
from .pages.settings import SettingsPage
|
||||
from .pages.about import AboutPage
|
||||
|
||||
|
||||
class MainWindow(QtWidgets.QMainWindow):
|
||||
@@ -47,17 +48,19 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self._queue_page = QueuePage()
|
||||
self._logs_page = LogsPage()
|
||||
self._settings_page = SettingsPage()
|
||||
self._about_page = AboutPage()
|
||||
|
||||
self._pages: list[QtWidgets.QWidget] = [
|
||||
self._playlists_page,
|
||||
self._queue_page,
|
||||
self._logs_page,
|
||||
self._settings_page,
|
||||
self._about_page,
|
||||
]
|
||||
for p in self._pages:
|
||||
self._stack.addWidget(p)
|
||||
|
||||
for label in ("Playlists", "Queue", "Logs", "Settings"):
|
||||
for label in ("Playlists", "Queue", "Logs", "Settings", "About"):
|
||||
item = QtWidgets.QListWidgetItem(label)
|
||||
item.setSizeHint(QtCore.QSize(200, 36))
|
||||
self._nav.addItem(item)
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from PySide6 import QtCore, QtWidgets
|
||||
|
||||
|
||||
class AboutPage(QtWidgets.QWidget):
|
||||
def __init__(self, parent: QtWidgets.QWidget | None = None) -> None:
|
||||
super().__init__(parent)
|
||||
|
||||
layout = QtWidgets.QVBoxLayout(self)
|
||||
|
||||
title = QtWidgets.QLabel("About")
|
||||
title.setObjectName("pageTitle")
|
||||
layout.addWidget(title)
|
||||
|
||||
subtitle = QtWidgets.QLabel(
|
||||
"ytpl-sync is a desktop app for keeping local copies of YouTube playlists in sync."
|
||||
)
|
||||
subtitle.setWordWrap(True)
|
||||
layout.addWidget(subtitle)
|
||||
|
||||
info_box = QtWidgets.QGroupBox("Project")
|
||||
info_layout = QtWidgets.QFormLayout(info_box)
|
||||
|
||||
author = QtWidgets.QLabel("Dark_Zoul")
|
||||
info_layout.addRow("Author", author)
|
||||
|
||||
repo = QtWidgets.QLabel(
|
||||
'<a href="https://github.com/darkzoul5/YoutubePlaylistSync">'
|
||||
"https://github.com/darkzoul5/YoutubePlaylistSync</a>"
|
||||
)
|
||||
repo.setTextInteractionFlags(
|
||||
QtCore.Qt.TextInteractionFlag.TextBrowserInteraction
|
||||
)
|
||||
repo.setOpenExternalLinks(True)
|
||||
repo.setWordWrap(True)
|
||||
info_layout.addRow("Repository", repo)
|
||||
|
||||
layout.addWidget(info_box)
|
||||
|
||||
suggestions_box = QtWidgets.QGroupBox("Suggestions")
|
||||
suggestions_layout = QtWidgets.QVBoxLayout(suggestions_box)
|
||||
|
||||
suggestions = [
|
||||
"Keep yt-dlp updated regularly so site extraction stays reliable.",
|
||||
"Open issues with a playlist URL or log snippet when a sync fails.",
|
||||
"Use the release builds when you want a ready-to-run binary package.",
|
||||
]
|
||||
for text in suggestions:
|
||||
label = QtWidgets.QLabel(f"• {text}")
|
||||
label.setWordWrap(True)
|
||||
suggestions_layout.addWidget(label)
|
||||
|
||||
suggestions_layout.addStretch(1)
|
||||
layout.addWidget(suggestions_box)
|
||||
layout.addStretch(1)
|
||||
Reference in New Issue
Block a user