mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
rm
This commit is contained in:
parent
f6addee92e
commit
be3a29da94
@ -877,7 +877,7 @@ class TranslatorWindow(resizableframeless):
|
|||||||
self.translate_text.textbrowser.setselectable(globalconfig["selectable"])
|
self.translate_text.textbrowser.setselectable(globalconfig["selectable"])
|
||||||
self.titlebar.raise_()
|
self.titlebar.raise_()
|
||||||
t = QTimer(self)
|
t = QTimer(self)
|
||||||
t.setInterval(33)
|
t.setInterval(25)
|
||||||
self._isentered = False
|
self._isentered = False
|
||||||
t.timeout.connect(self.__betterenterevent)
|
t.timeout.connect(self.__betterenterevent)
|
||||||
t.start()
|
t.start()
|
||||||
@ -894,116 +894,6 @@ class TranslatorWindow(resizableframeless):
|
|||||||
self.enterfunction(2 + globalconfig["disappear_delay_tool"])
|
self.enterfunction(2 + globalconfig["disappear_delay_tool"])
|
||||||
self.autohidedelaythread()
|
self.autohidedelaythread()
|
||||||
self.tracewindowposthread()
|
self.tracewindowposthread()
|
||||||
today = time.strftime("%Y-%m-%d", time.localtime())
|
|
||||||
if globalconfig.get("lastvisday", None) != today:
|
|
||||||
globalconfig["lastvisday"] = today
|
|
||||||
self.__showlinks()
|
|
||||||
|
|
||||||
def __showsupport(self, _):
|
|
||||||
dia = QDialog(self, Qt.WindowType.WindowCloseButtonHint)
|
|
||||||
dia.setWindowTitle("支持作者")
|
|
||||||
vbox = QVBoxLayout()
|
|
||||||
dia.setLayout(vbox)
|
|
||||||
vbox.addWidget(QLabel("如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~"))
|
|
||||||
_view = pixmapviewer(self)
|
|
||||||
_view.showpixmap(QPixmap.fromImage(QImage("./files/zan.jpg")))
|
|
||||||
_view.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
|
|
||||||
dia.resize(400, 400)
|
|
||||||
vbox.addWidget(_view)
|
|
||||||
dia.exec()
|
|
||||||
|
|
||||||
def __showlinks(self):
|
|
||||||
__text = (
|
|
||||||
_TR("欢迎使用")
|
|
||||||
+ " LunaTranslator\nGithub "
|
|
||||||
+ _TR("官方网站")
|
|
||||||
+ " "
|
|
||||||
+ _TR("使用说明")
|
|
||||||
+ "\n"
|
|
||||||
)
|
|
||||||
__tags = [
|
|
||||||
{
|
|
||||||
"orig": _TR("欢迎使用") + " LunaTranslator",
|
|
||||||
"hira": "",
|
|
||||||
},
|
|
||||||
{"orig": "\n", "hira": "\n"},
|
|
||||||
{
|
|
||||||
"orig": "Github",
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": lambda s: gobject.baseobject.openlink(
|
|
||||||
"https://github.com/HIllya51/LunaTranslator"
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{"orig": " ", "hira": ""},
|
|
||||||
{
|
|
||||||
"orig": _TR("官方网站"),
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": lambda s: gobject.baseobject.openlink(
|
|
||||||
dynamiclink("{main_server}/")
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{"orig": " ", "hira": ""},
|
|
||||||
{
|
|
||||||
"orig": _TR("使用说明"),
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": lambda s: gobject.baseobject.openlink(
|
|
||||||
dynamiclink("{docs_server}/")
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{"orig": "\n", "hira": ""},
|
|
||||||
]
|
|
||||||
if getlanguse() == "zh":
|
|
||||||
__text += "支持作者 QQ群 Bilibili"
|
|
||||||
__tags += [
|
|
||||||
{
|
|
||||||
"orig": "支持作者",
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": self.__showsupport,
|
|
||||||
},
|
|
||||||
{"orig": " ", "hira": ""},
|
|
||||||
{
|
|
||||||
"orig": "QQ群",
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": lambda s: gobject.baseobject.openlink(
|
|
||||||
dynamiclink("{main_server}/Resource/QQGroup")
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{"orig": " ", "hira": ""},
|
|
||||||
{
|
|
||||||
"orig": "Bilibili",
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": lambda s: gobject.baseobject.openlink(
|
|
||||||
dynamiclink("{main_server}/Resource/Bilibili")
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]
|
|
||||||
else:
|
|
||||||
__text += "Discord Patreon"
|
|
||||||
__tags += [
|
|
||||||
{
|
|
||||||
"orig": "Discord",
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": lambda s: gobject.baseobject.openlink(
|
|
||||||
dynamiclink("{main_server}/Resource/DiscordGroup")
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{"orig": " ", "hira": ""},
|
|
||||||
{
|
|
||||||
"orig": "Patreon",
|
|
||||||
"hira": "1",
|
|
||||||
"clickfunction": lambda s: gobject.baseobject.openlink(
|
|
||||||
"https://www.patreon.com/hillya51"
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]
|
|
||||||
self.translate_text.append(
|
|
||||||
True,
|
|
||||||
globalconfig["showatcenter"],
|
|
||||||
__text,
|
|
||||||
__tags,
|
|
||||||
(False, True, True),
|
|
||||||
"black",
|
|
||||||
)
|
|
||||||
|
|
||||||
def setselectable(self):
|
def setselectable(self):
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -221,16 +221,11 @@
|
|||||||
},
|
},
|
||||||
"volcengine": {
|
"volcengine": {
|
||||||
"args": {
|
"args": {
|
||||||
"注册网址": "https://console.volcengine.com/ai/ability/detail/1",
|
|
||||||
"密钥获取": "https://console.volcengine.com/iam/keymanage/",
|
"密钥获取": "https://console.volcengine.com/iam/keymanage/",
|
||||||
"Access Key ID": "",
|
"Access Key ID": "",
|
||||||
"Secret Access Key": ""
|
"Secret Access Key": ""
|
||||||
},
|
},
|
||||||
"argstype": {
|
"argstype": {
|
||||||
"注册网址": {
|
|
||||||
"type": "label",
|
|
||||||
"islink": true
|
|
||||||
},
|
|
||||||
"密钥获取": {
|
"密钥获取": {
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"islink": true
|
"islink": true
|
||||||
|
@ -52,15 +52,13 @@
|
|||||||
|
|
||||||
**model** https://help.aliyun.com/zh/model-studio/product-overview/billing-for-alibaba-cloud-model-studio/#2550bcc04d2tk
|
**model** https://help.aliyun.com/zh/model-studio/product-overview/billing-for-alibaba-cloud-model-studio/#2550bcc04d2tk
|
||||||
|
|
||||||
### **字节跳动豆包大模型**
|
### **字节跳动豆包大模型(火山引擎)**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**API接口地址** `https://ark.cn-beijing.volces.com/api/v3`
|
**API接口地址** `https://ark.cn-beijing.volces.com/api/v3`
|
||||||
|
|
||||||
**SECRET_KEY** 跟[官方文档](https://www.volcengine.com/docs/82379/1263279)获取
|
**SECRET_KEY** [创建API Key](https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D)获取
|
||||||
|
|
||||||
**model** 创建[推理接入点](https://console.volcengine.com/ark/region:ark+cn-beijing/endpoint?current=1&pageSize=10)后,填入**接入点**而非**模型**
|
**model** [创建推理接入点](https://console.volcengine.com/ark/region:ark+cn-beijing/endpoint?current=1&pageSize=10)后,填入**接入点**而非**模型**
|
||||||
|
|
||||||
![img](https://image.lunatranslator.org/zh/damoxing/doubao.png)
|
![img](https://image.lunatranslator.org/zh/damoxing/doubao.png)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user