This commit is contained in:
2025-10-30 15:50:40 +08:00
parent ead93c1e49
commit 39dfb62cbf
11 changed files with 35420 additions and 131325 deletions

View File

@@ -291,6 +291,7 @@ class MiaoStarsBasicApi:
"""获取用户头像""" """获取用户头像"""
# Cloudreve V4 获取用户信息以获取头像URL # Cloudreve V4 获取用户信息以获取头像URL
user_info = self.getUserInfo() user_info = self.getUserInfo()
logger.info(f"用户信息API返回{user_info}")
if user_info.get("code") != 0: if user_info.get("code") != 0:
return QPixmap(":app/images/logo.png") return QPixmap(":app/images/logo.png")
@@ -326,7 +327,7 @@ class MiaoStarsBasicApi:
# 转换响应格式 # 转换响应格式
if isinstance(r, dict): if isinstance(r, dict):
return {"code": 0, "data": r} return r
else: else:
return {"code": -1, "msg": "获取用户信息失败"} return {"code": -1, "msg": "获取用户信息失败"}

View File

@@ -109,26 +109,26 @@ class UserConfig:
if self.userData: if self.userData:
return self.userData["data"].get("nickname", "") return self.userData["data"].get("nickname", "")
else: else:
return "" return None
@property @property
def userEmail(self): def userEmail(self):
if self.userData: if self.userData:
return self.userData["data"].get("user_name", "") return self.userData["data"].get("email", "")
else: else:
return "" return None
@property @property
def userGroup(self): def userGroup(self):
if self.userData: if self.userData:
return self.userData.get("data", {}).get("group", {}).get("name", "") return self.userData.get("data", {}).get("group", {}).get("name", "")
else: else:
return "" return None
@property # @property
def userScore(self): # def userScore(self):
if self.userData: # if self.userData:
return str(self.userData["data"].get("score", 0)) # return str(self.userData["data"].get("score", 0))
@property @property
def userCreatedTime(self): def userCreatedTime(self):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

View File

@@ -0,0 +1,2 @@
# 注意转换完成后把resource.py里的import PySide6改为import PyQt6
pyside6-rcc ./app/resource/resource.qrc -o ./app/resource/resource.py

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,7 @@
<file>images/empty.png</file> <file>images/empty.png</file>
<file>images/title.jpg</file> <file>images/title.jpg</file>
<file>images/loadFailure.png</file> <file>images/loadFailure.png</file>
<file>images/logolong.png</file>
<file>icons/login.svg</file> <file>icons/login.svg</file>
<file>icons/register.svg</file> <file>icons/register.svg</file>

View File

@@ -33,7 +33,7 @@ class RegisterWindow(Window):
def __init__(self, parent=None): def __init__(self, parent=None):
logger.info("初始化注册窗口") logger.info("初始化注册窗口")
super().__init__(parent=parent) super().__init__(parent=parent)
setThemeColor("#2F80ED") setThemeColor("#1976d2")
self.setTitleBar(MSFluentTitleBar(self)) self.setTitleBar(MSFluentTitleBar(self))
self.verificationCode = "" self.verificationCode = ""
@@ -43,6 +43,7 @@ class RegisterWindow(Window):
self.loginLayout = QVBoxLayout() self.loginLayout = QVBoxLayout()
self.promotionalImageLabel = ImageLabel(self) self.promotionalImageLabel = ImageLabel(self)
self.logoImage = ImageLabel(self)
self.pivot = Pivot(self) self.pivot = Pivot(self)
self.stackedWidget = PopUpAniStackedWidget(self) self.stackedWidget = PopUpAniStackedWidget(self)
@@ -65,8 +66,13 @@ class RegisterWindow(Window):
self.setWindowIcon(QIcon(":app/images/logo.png")) self.setWindowIcon(QIcon(":app/images/logo.png"))
self.setFixedSize(690, 470) self.setFixedSize(690, 470)
self.promotionalImageLabel.setImage(":app/images/background.png") # self.promotionalImageLabel.setImage(":app/images/background.png")
self.promotionalImageLabel.scaledToWidth(300) # self.promotionalImageLabel.scaledToWidth(300)
self.logoImage.setImage(":app/images/logolong.png")
self.logoImage.scaledToWidth(130)
self
self.pivot.addItem("LoginWidget", "登录", icon=":app/icons/login.svg") self.pivot.addItem("LoginWidget", "登录", icon=":app/icons/login.svg")
@@ -108,19 +114,23 @@ class RegisterWindow(Window):
def __initLayout(self): def __initLayout(self):
logger.debug("初始化注册窗口布局") logger.debug("初始化注册窗口布局")
self.loginLayout.setContentsMargins(10, 40, 10, 40) self.loginLayout.setContentsMargins(10, 40, 10, 40)
self.hBoxLayout.setContentsMargins(25, 30, 15, 30) self.hBoxLayout.setContentsMargins(25, 30, 15, 0)
self.loginLayout.addWidget(
self.logoImage, 0, Qt.AlignmentFlag.AlignTop | Qt.AlignmentFlag.AlignCenter,
)
self.loginLayout.addWidget( self.loginLayout.addWidget(
self.pivot, 0, Qt.AlignmentFlag.AlignTop | Qt.AlignmentFlag.AlignLeft self.pivot, 0, Qt.AlignmentFlag.AlignTop | Qt.AlignmentFlag.AlignCenter,
) )
self.loginLayout.addSpacing(25)
self.loginLayout.addSpacing(10)
self.loginLayout.addWidget(self.stackedWidget) self.loginLayout.addWidget(self.stackedWidget)
self.hBoxLayout.addWidget( # self.hBoxLayout.addWidget(
self.promotionalImageLabel, 0, Qt.AlignmentFlag.AlignBottom # self.promotionalImageLabel, 0, Qt.AlignmentFlag.AlignBottom
) # )
self.hBoxLayout.addSpacing(10) self.hBoxLayout.addSpacing(10)
self.hBoxLayout.addWidget(VerticalSeparator(self)) # self.hBoxLayout.addWidget(VerticalSeparator(self))
self.hBoxLayout.addSpacing(10) self.hBoxLayout.addSpacing(10)
self.hBoxLayout.addLayout(self.loginLayout) self.hBoxLayout.addLayout(self.loginLayout)
logger.debug("注册窗口布局初始化完成") logger.debug("注册窗口布局初始化完成")

View File

@@ -66,9 +66,9 @@ class BasicInformationSettingCard(GroupHeaderCardWidget):
lang("当前用户组"), lang("当前用户组"),
QLabel(self), QLabel(self),
) )
self.addGroup( # self.addGroup(
":app/icons/Score.svg", userConfig.userScore, "积分", QLabel(self) # ":app/icons/Score.svg", userConfig.userScore, "积分", QLabel(self)
) # )
self.addGroup( self.addGroup(
":app/icons/Date.svg", ":app/icons/Date.svg",
userConfig.userCreatedTime, userConfig.userCreatedTime,
@@ -245,7 +245,7 @@ class SettingInterface(ScrollArea):
self.themeSettingWidget = ThemeSettingWidget(self.scrollWidget) self.themeSettingWidget = ThemeSettingWidget(self.scrollWidget)
self.agreementLabelWidget = AgreementLabelWidget(self.scrollWidget) self.agreementLabelWidget = AgreementLabelWidget(self.scrollWidget)
self.infoLabel = BodyLabel( self.infoLabel = BodyLabel(
"增值电信业务经营许可证B1-20191399鄂ICP备2025132158号 \n ©2025 LeonPan \n 武汉喵星创想互联网科技有限公司", "Powered by LeonCloud with ❤ \n ©2025 LeonPan",
self.scrollWidget, self.scrollWidget,
) )

View File

@@ -8,7 +8,7 @@ from qfluentwidgets import (
CheckBox, CheckBox,
LineEdit, LineEdit,
PasswordLineEdit, PasswordLineEdit,
PushButton, PrimaryPushButton,
) )
from app.core import CaptchaThread,cfg, qconfig from app.core import CaptchaThread,cfg, qconfig
@@ -31,7 +31,7 @@ class LoginWidget(QWidget):
self.rememberMeCheckBox.checkStateChanged.connect( self.rememberMeCheckBox.checkStateChanged.connect(
lambda: qconfig.set(cfg.rememberMe, self.rememberMeCheckBox.isChecked()) lambda: qconfig.set(cfg.rememberMe, self.rememberMeCheckBox.isChecked())
) )
self.loginButton = PushButton("登录", self) self.loginButton = PrimaryPushButton("登录", self)
self.loginButton.setDisabled(False) self.loginButton.setDisabled(False)
self.verificationCodeLabel = QLabel(self) self.verificationCodeLabel = QLabel(self)

View File

@@ -2,8 +2,9 @@ loguru==0.7.3
numpy==2.3.3 numpy==2.3.3
Pillow==11.3.0 Pillow==11.3.0
pycryptodome==3.21.0 pycryptodome==3.21.0
PyQt6==6.9.2 PyQt6==6.10.0
PyQt6-fluent-widgets==1.8.4 PyQt6-fluent-widgets==1.8.4
PySideSix_Frameless_Window==0.4.3 PySideSix_Frameless_Window==0.4.3
Requests==2.32.5 Requests==2.32.5
rsa==4.9.1 rsa==4.9.1
pyside6==6.10.0