新增在线更新模块

This commit is contained in:
SiYuan 2024-02-28 21:17:51 +08:00
parent 43d6792926
commit a04a8e68e6
3 changed files with 53 additions and 1 deletions

View File

@ -33,4 +33,4 @@ os.makedirs(OUTPUT_DIR, exist_ok=True)
# 全局参数
SEND_LOG_FLAG = True # 是否发送错误日志
SERVER_API_URL = 'http://api.lc044.love' # api接口
# SERVER_API_URL = 'http://127.0.0.1:8000' # api接口
# SERVER_API_URL = 'http://127.0.0.1:8000' # api接口

11
app/ui/update/update.py Normal file
View File

@ -0,0 +1,11 @@
from app.ui.update.updateUi import Ui_Dialog
import shutil
from PyQt5.QtCore import QThread, pyqtSignal
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QWidget, QMessageBox, QAction, QLineEdit
class UpdateControl(QWidget, Ui_Dialog):
def __init__(self, parent=None):
super().__init__(parent)
self.setupUi(self)

41
app/ui/update/updateUi.py Normal file
View File

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'updateUi.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(590, 547)
font = QtGui.QFont()
font.setFamily("微软雅黑")
Dialog.setFont(font)
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName("verticalLayout")
self.btn_report = QtWidgets.QPushButton(Dialog)
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(30)
self.btn_report.setFont(font)
self.btn_report.setObjectName("btn_report")
self.verticalLayout.addWidget(self.btn_report)
self.progressBar = QtWidgets.QProgressBar(Dialog)
self.progressBar.setProperty("value", 0)
self.progressBar.setObjectName("progressBar")
self.verticalLayout.addWidget(self.progressBar)
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.btn_report.setText(_translate("Dialog", "正在更新"))