mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
.
This commit is contained in:
parent
404906c4cc
commit
e92d79e5b6
@ -124,7 +124,7 @@ def versioncheckthread(self):
|
|||||||
self.progresssignal.emit("……", 0)
|
self.progresssignal.emit("……", 0)
|
||||||
if not x:
|
if not x:
|
||||||
continue
|
continue
|
||||||
self.versiontextsignal.emit("...") # ,'',url,url))
|
self.versiontextsignal.emit("获取中") # ,'',url,url))
|
||||||
_version = getvesionmethod()
|
_version = getvesionmethod()
|
||||||
|
|
||||||
if _version is None:
|
if _version is None:
|
||||||
@ -177,30 +177,15 @@ def createdownloadprogress(self):
|
|||||||
return self.downloadprogress
|
return self.downloadprogress
|
||||||
|
|
||||||
|
|
||||||
def wraplink(text: str):
|
|
||||||
link = "{main_server}/Github/LunaTranslator/releases"
|
|
||||||
if text.startswith("v"):
|
|
||||||
|
|
||||||
link = "{main_server}/Github/LunaTranslator/releases/tag/" + text
|
|
||||||
return makehtml(
|
|
||||||
link,
|
|
||||||
show=text,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def createversionlabel(self):
|
def createversionlabel(self):
|
||||||
|
|
||||||
self.versionlabel = QLabel()
|
self.versionlabel = LLabel()
|
||||||
self.versionlabel.setOpenExternalLinks(True)
|
self.versionlabel.setOpenExternalLinks(True)
|
||||||
self.versionlabel.setTextInteractionFlags(
|
self.versionlabel.setTextInteractionFlags(
|
||||||
Qt.TextInteractionFlag.LinksAccessibleByMouse
|
Qt.TextInteractionFlag.LinksAccessibleByMouse
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
self.versionlabel.setText(
|
self.versionlabel.setText(self.versionlabel_cache)
|
||||||
wraplink(
|
|
||||||
self.versionlabel_cache,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return self.versionlabel
|
return self.versionlabel
|
||||||
@ -208,7 +193,7 @@ def createversionlabel(self):
|
|||||||
|
|
||||||
def versionlabelmaybesettext(self, x):
|
def versionlabelmaybesettext(self, x):
|
||||||
try:
|
try:
|
||||||
self.versionlabel.setText(wraplink(x))
|
self.versionlabel.setText(x)
|
||||||
except:
|
except:
|
||||||
self.versionlabel_cache = x
|
self.versionlabel_cache = x
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user