feat(app): tombol Donasi + GitHub (jendela & tray), label versi v1.1.0
docs: bagian Support dengan tautan donasi
This commit is contained in:
1 parent
42c8d94977
commit
657a8d10dc
2 files changed
+47
-3
No files matched your search
@@ -90,6 +90,7 @@ temperature source (Tctl vs Tccd).
|
|||||||
- **Plug and play**: the service waits for the device, streams while present and keeps
|
- **Plug and play**: the service waits for the device, streams while present and keeps
|
||||||
waiting through unplug/replug; a udev rule grants access to the logged-in user
|
waiting through unplug/replug; a udev rule grants access to the logged-in user
|
||||||
- **Single instance**: launching the app again just raises the running window
|
- **Single instance**: launching the app again just raises the running window
|
||||||
|
- **Donate / GitHub buttons** in the app (window and tray menu)
|
||||||
- **AppImage build** script (`packaging/build_appimage.sh`, PySide6 bundled)
|
- **AppImage build** script (`packaging/build_appimage.sh`, PySide6 bundled)
|
||||||
|
|
||||||
The GUI labels are in Indonesian.
|
The GUI labels are in Indonesian.
|
||||||
@@ -192,6 +193,15 @@ docs/ reverse-engineering.md — full analysis (Indonesian)
|
|||||||
assets/ previews and icon
|
assets/ previews and icon
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
If this project is useful to you:
|
||||||
|
|
||||||
|
- ❤ **Donate:** <https://donasi.oxpoe.qzz.io/> (buttons for it and for this repository are
|
||||||
|
in the app: window bottom row and the tray menu)
|
||||||
|
- ⭐ Star the repo, or open an issue with your cooler model and what worked — reports from
|
||||||
|
other IceBurg Digital revisions are the best way to widen hardware support.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
Reverse engineered and written by **oxpoe**, with the help of
|
Reverse engineered and written by **oxpoe**, with the help of
|
||||||
|
|||||||
+37
-3
@@ -18,19 +18,23 @@ import threading
|
|||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from PySide6.QtCore import QPointF, QRectF, Qt, QThread, QTimer, Signal
|
from PySide6.QtCore import QPointF, QRectF, Qt, QThread, QTimer, QUrl, Signal
|
||||||
from PySide6.QtGui import (QAction, QColor, QConicalGradient, QFont, QIcon,
|
from PySide6.QtGui import (QAction, QColor, QConicalGradient, QDesktopServices, QFont,
|
||||||
QPainter, QPen, QPixmap)
|
QIcon, QPainter, QPen, QPixmap)
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QApplication, QCheckBox, QComboBox, QFormLayout, QGroupBox, QHBoxLayout, QLabel,
|
QApplication, QCheckBox, QComboBox, QFormLayout, QGroupBox, QHBoxLayout, QLabel,
|
||||||
QMenu, QPlainTextEdit, QProgressBar, QPushButton, QSystemTrayIcon, QVBoxLayout, QWidget,
|
QMenu, QPlainTextEdit, QProgressBar, QPushButton, QSystemTrayIcon, QVBoxLayout, QWidget,
|
||||||
)
|
)
|
||||||
from PySide6.QtNetwork import QLocalServer, QLocalSocket
|
from PySide6.QtNetwork import QLocalServer, QLocalSocket
|
||||||
|
|
||||||
|
APP_VERSION = "1.1.0"
|
||||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
sys.path.insert(0, HERE)
|
sys.path.insert(0, HERE)
|
||||||
import gamemax_report as gr # noqa: E402
|
import gamemax_report as gr # noqa: E402
|
||||||
|
|
||||||
|
DONATE_URL = "https://donasi.oxpoe.qzz.io/"
|
||||||
|
GITHUB_URL = "https://github.com/oxpoe/Gamemax-linux-apps"
|
||||||
|
|
||||||
SERVICE = "gamemax-report.service"
|
SERVICE = "gamemax-report.service"
|
||||||
CONFIG_PATH = gr.CONFIG_PATH
|
CONFIG_PATH = gr.CONFIG_PATH
|
||||||
INSTALL_DIR = os.path.expanduser("~/.local/share/gamemax-report")
|
INSTALL_DIR = os.path.expanduser("~/.local/share/gamemax-report")
|
||||||
@@ -69,6 +73,13 @@ def crash_log(text):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def open_link(url, parent=None):
|
||||||
|
"""Buka tautan di peramban; kalau gagal, tampilkan pesannya di log."""
|
||||||
|
if not QDesktopServices.openUrl(QUrl(url)):
|
||||||
|
if parent is not None:
|
||||||
|
parent.log(f"tidak bisa membuka tautan: {url}")
|
||||||
|
|
||||||
|
|
||||||
def systemctl(*args):
|
def systemctl(*args):
|
||||||
return subprocess.run(["systemctl", "--user", *args], capture_output=True, text=True)
|
return subprocess.run(["systemctl", "--user", *args], capture_output=True, text=True)
|
||||||
|
|
||||||
@@ -336,6 +347,22 @@ class Window(QWidget):
|
|||||||
form.addRow("", row)
|
form.addRow("", row)
|
||||||
root.addWidget(settings)
|
root.addWidget(settings)
|
||||||
|
|
||||||
|
# ---- tautan
|
||||||
|
links = QHBoxLayout()
|
||||||
|
donate = QPushButton("❤ Donasi")
|
||||||
|
donate.setToolTip(DONATE_URL)
|
||||||
|
donate.clicked.connect(lambda: open_link(DONATE_URL, self))
|
||||||
|
github = QPushButton("GitHub")
|
||||||
|
github.setToolTip(GITHUB_URL)
|
||||||
|
github.clicked.connect(lambda: open_link(GITHUB_URL, self))
|
||||||
|
links.addWidget(donate)
|
||||||
|
links.addWidget(github)
|
||||||
|
links.addStretch(1)
|
||||||
|
self.version_label = QLabel(f"v{APP_VERSION}")
|
||||||
|
self.version_label.setStyleSheet("color:#8a8f8a;")
|
||||||
|
links.addWidget(self.version_label)
|
||||||
|
root.addLayout(links)
|
||||||
|
|
||||||
# ---- detail + log
|
# ---- detail + log
|
||||||
self.detail = QPlainTextEdit()
|
self.detail = QPlainTextEdit()
|
||||||
self.detail.setReadOnly(True)
|
self.detail.setReadOnly(True)
|
||||||
@@ -662,12 +689,19 @@ class Tray:
|
|||||||
toggle = QAction("Aktifkan / matikan", menu)
|
toggle = QAction("Aktifkan / matikan", menu)
|
||||||
toggle.triggered.connect(lambda: self.window.on_toggle())
|
toggle.triggered.connect(lambda: self.window.on_toggle())
|
||||||
self.blank_action.triggered.connect(lambda checked: self.window.blank.setChecked(checked))
|
self.blank_action.triggered.connect(lambda checked: self.window.blank.setChecked(checked))
|
||||||
|
donate_action = QAction("❤ Donasi", menu)
|
||||||
|
donate_action.triggered.connect(lambda: open_link(DONATE_URL, self.window))
|
||||||
|
github_action = QAction("GitHub", menu)
|
||||||
|
github_action.triggered.connect(lambda: open_link(GITHUB_URL, self.window))
|
||||||
quit_action = QAction("Keluar", menu)
|
quit_action = QAction("Keluar", menu)
|
||||||
quit_action.triggered.connect(app.quit)
|
quit_action.triggered.connect(app.quit)
|
||||||
menu.addAction(show)
|
menu.addAction(show)
|
||||||
menu.addAction(toggle)
|
menu.addAction(toggle)
|
||||||
menu.addAction(self.blank_action)
|
menu.addAction(self.blank_action)
|
||||||
menu.addSeparator()
|
menu.addSeparator()
|
||||||
|
menu.addAction(donate_action)
|
||||||
|
menu.addAction(github_action)
|
||||||
|
menu.addSeparator()
|
||||||
menu.addAction(quit_action)
|
menu.addAction(quit_action)
|
||||||
self.icon.setContextMenu(menu)
|
self.icon.setContextMenu(menu)
|
||||||
self.icon.activated.connect(
|
self.icon.activated.connect(
|
||||||
|
|||||||
Reference in new issue
Block a user