mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-29 03:35:31 +08:00
Opt: Minor improvements on toast notifications
This commit is contained in:
@@ -20,9 +20,13 @@ class Device(Screenshot, Control, AppControl):
|
|||||||
|
|
||||||
def send_notification(self, title, message):
|
def send_notification(self, title, message):
|
||||||
if self.config.ENABLE_NOTIFICATIONS and sys.platform == 'win32':
|
if self.config.ENABLE_NOTIFICATIONS and sys.platform == 'win32':
|
||||||
from win10toast_persist import ToastNotifier
|
from notifypy import Notify
|
||||||
notify = ToastNotifier()
|
notification = Notify()
|
||||||
notify.show_toast(title, message, icon_path='assets/gooey/icon.ico', duration=None)
|
notification.title = title
|
||||||
|
notification.message = message
|
||||||
|
notification.application_name = "AzurLaneAutoScript"
|
||||||
|
notification.icon = "assets/gooey/icon.ico"
|
||||||
|
notification.send(block=False)
|
||||||
|
|
||||||
def handle_night_commission(self, hour=21, threshold=30):
|
def handle_night_commission(self, hour=21, threshold=30):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -13,5 +13,6 @@ cnocr==1.2.2
|
|||||||
gooey
|
gooey
|
||||||
colored
|
colored
|
||||||
# python-Levenshtein
|
# python-Levenshtein
|
||||||
win10toast-persist
|
# win10toast-persist
|
||||||
|
notify-py
|
||||||
jellyfish
|
jellyfish
|
||||||
Reference in New Issue
Block a user