新增断网彩蛋

This commit is contained in:
2023-03-19 15:49:49 +08:00
parent 3132cbef65
commit 73d6a77318
3 changed files with 13 additions and 8 deletions

1
2048 Submodule

Submodule 2048 added at fc1ef4fe5a

View File

@@ -1920,11 +1920,12 @@ def GetNewInformation():
text = requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/information/index.html").text
except:
traceback.print_exc()
text = """<p>无法连接到服务器</p>
text = f"""<p>无法连接到服务器</p>
<hr/>
<p>你可以尝试:</p>
<p>1. 判断是否能正常连接网络</p>
<p>2. 作者的服务出问题了到这反馈https://gitee.com/gfdgd-xi/deep-wine-runner/issues</p>"""
<p>2. 作者的服务出问题了?(到这反馈:<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/issues'>https://gitee.com/gfdgd-xi/deep-wine-runner/issues</a></p>
<p>3. 玩个<a href="file://{programPath}/2048/index.html">游戏</a>解闷下</p>"""
global webInformation
if bad:
webInformation = QtWidgets.QTextBrowser()
@@ -2399,7 +2400,9 @@ updateThingsString = transla.transe("U", '''※1、Windows 应用适配工具新
11、支持禁用程序的多语言支持默认禁用因为是机翻的
12、支持在程序本地翻译缺失的情况下自动机翻缺失语句
13、从此版本开始不再区分吾爱版、Spark 版和 UOS 版;
14、新增下载量查询
14、新增下载量查询
15、更新程序公告
16、新增断网彩蛋。
''')
for i in information["Thank"]:
thankText += f"{i}\n"

View File

@@ -1,7 +1,8 @@
# 此库用于实现 52 版不连接程序服务器
# 此库用于实现 52 版不连接程序服务器(不再区分)
import requests
unConnect = False
# 不再区分吾爱版
#with open("/var/lib/dpkg/status", "r") as i:
# unConnect = "Package: spark-deepin-wine-runner-52" in open("/var/lib/dpkg/status", "r").read()
#if unConnect:
@@ -11,17 +12,17 @@ class Respon:
text = ""
def get(url, timeout=None): # -> requests.Response:
if unConnect:
#if unConnect:
# 全部 Url 都拦截
raise Exception("52专版不支持连接服务器")
#raise Exception("52专版不支持连接服务器")
if timeout == None:
return requests.get(url)
return requests.get(url, timeout=timeout)
def post(url, data, timeout=None):
if unConnect:
#if unConnect:
# 全部 Url 都拦截
raise Exception("52专版不支持连接服务器")
# raise Exception("52专版不支持连接服务器")
if timeout == None:
return requests.post(url, data)
return requests.post(url, data, timeout=timeout)