From e5c6fa89e8d650ecfb9abf539f0924943512d083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Tue, 24 Dec 2024 23:07:58 +0800 Subject: [PATCH] . --- py/LunaTranslator/gui/setting_about.py | 9 +++++++-- py/LunaTranslator/gui/setting_year.py | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/py/LunaTranslator/gui/setting_about.py b/py/LunaTranslator/gui/setting_about.py index f0952e05..61df1f1e 100644 --- a/py/LunaTranslator/gui/setting_about.py +++ b/py/LunaTranslator/gui/setting_about.py @@ -266,8 +266,13 @@ def createimageview(self): def changelog(self, basel: QHBoxLayout): - _ = WebivewWidget(self) - _.navigate(dynamiclink("{main_server}/ChangeLog")) + link = dynamiclink("{main_server}/ChangeLog") + try: + _ = WebivewWidget(self) + _.navigate(link) + except: + _ = QWidget() + os.startfile(link) basel.addWidget(_) diff --git a/py/LunaTranslator/gui/setting_year.py b/py/LunaTranslator/gui/setting_year.py index 60061181..c6f2c14a 100644 --- a/py/LunaTranslator/gui/setting_year.py +++ b/py/LunaTranslator/gui/setting_year.py @@ -193,7 +193,6 @@ def yearsummary(self, basel: QHBoxLayout): for m, info in everymonth_uid_time.items(): tu_m[m] = getimages(info) developer, webtags = getallgamelabels(yearinfos) - _ = WebivewWidget(self) with open("files/yearsummary/yearsummary.value.js", "w", encoding="utf8") as ff2: ff2.write( r""" @@ -219,5 +218,11 @@ webtags={webtags} ) ) - _.navigate(os.path.abspath("files/yearsummary/yearsummary.html")) + link = os.path.abspath("files/yearsummary/yearsummary.html") + try: + _ = WebivewWidget(self) + _.navigate(link) + except: + _ = QWidget() + os.startfile(link) basel.addWidget(_)