Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f86e4e5

Browse files
优化获取头像逻辑
1 parent 20d2caf commit f86e4e5

18 files changed

+206
-194
lines changed

‎Resources/Markdown/js/waifu-tips.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,19 @@ jQuery(document).ready(function ($) {
201201
showMessage('到了要说再见的时候了吗');
202202
});
203203
$(document).on("click", "li a", function () {
204-
showMessage('加载<span style="color:#0099cc;">『' + $(this).text() + '』</span>中...请稍候', 600);
204+
var text = $(this).text();
205+
if (text == '') return;
206+
showMessage('加载<span style="color:#0099cc;">『' + text + '』</span>中...请稍候', 600);
205207
});
206208
$(document).on("mouseover", "li a", function () {
207-
showMessage('要看看<span style="color:#0099cc;">『' + $(this).text() + '』</span>么?');
209+
var text = $(this).text();
210+
if (text == '') return;
211+
showMessage('要看看<span style="color:#0099cc;">『' + text + '』</span>么?');
208212
});
209213
$(document).on("click", "p a", function () {
210-
showMessage('加载<span style="color:#0099cc;">『' + $(this).text() + '』</span>中...请稍候', 600);
214+
var text = $(this).text();
215+
if (text == '') return;
216+
showMessage('加载<span style="color:#0099cc;">『' + text + '』</span>中...请稍候', 600);
211217
});
212218
$(document).on("mouseover", "p a", function () {
213219
var text = $(this).text();
@@ -216,7 +222,7 @@ jQuery(document).ready(function ($) {
216222
showMessage('要<span style="color:#0099cc;">『' + text + '』</span>么?');
217223
else if (alt == '微信' || alt == '支付宝')
218224
showMessage('这是我的' + alt + '二维码~,要赞助一下么?');
219-
else
225+
elseif(text!='')
220226
showMessage('要看看<span style="color:#0099cc;">『' + text + '』</span>么?');
221227
});
222228
$(document).on("mouseover", ".prev", function () {

‎UiFiles/LoginDialog.ui

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<property name="sizeHint" stdset="0">
9494
<size>
9595
<width>20</width>
96-
<height>40</height>
96+
<height>70</height>
9797
</size>
9898
</property>
9999
</spacer>
@@ -143,36 +143,14 @@
143143
<height>30</height>
144144
</size>
145145
</property>
146-
<property name="alignment">
147-
<set>Qt::AlignCenter</set>
148-
</property>
149-
<property name="placeholderText">
150-
<string>Github Account</string>
151-
</property>
152-
</widget>
153-
</item>
154-
<item>
155-
<widget class="QLineEdit" name="lineEditPassword">
156-
<property name="minimumSize">
157-
<size>
158-
<width>0</width>
159-
<height>30</height>
160-
</size>
161-
</property>
162-
<property name="maximumSize">
163-
<size>
164-
<width>16777215</width>
165-
<height>30</height>
166-
</size>
167-
</property>
168-
<property name="echoMode">
169-
<enum>QLineEdit::Password</enum>
146+
<property name="focusPolicy">
147+
<enum>Qt::ClickFocus</enum>
170148
</property>
171149
<property name="alignment">
172150
<set>Qt::AlignCenter</set>
173151
</property>
174152
<property name="placeholderText">
175-
<string>Github Password</string>
153+
<string>Github Username</string>
176154
</property>
177155
</widget>
178156
</item>
@@ -357,22 +335,6 @@
357335
</customwidgets>
358336
<resources/>
359337
<connections>
360-
<connection>
361-
<sender>lineEditPassword</sender>
362-
<signal>returnPressed()</signal>
363-
<receiver>buttonLogin</receiver>
364-
<slot>click()</slot>
365-
<hints>
366-
<hint type="sourcelabel">
367-
<x>161</x>
368-
<y>153</y>
369-
</hint>
370-
<hint type="destinationlabel">
371-
<x>151</x>
372-
<y>237</y>
373-
</hint>
374-
</hints>
375-
</connection>
376338
<connection>
377339
<sender>buttonClose</sender>
378340
<signal>clicked()</signal>

‎UiFiles/Ui_DonateDialog.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\DonateDialog.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormDonateDialog(object):
1215
def setupUi(self, FormDonateDialog):
1316
FormDonateDialog.setObjectName("FormDonateDialog")
@@ -91,4 +94,3 @@ def retranslateUi(self, FormDonateDialog):
9194
ui.setupUi(FormDonateDialog)
9295
FormDonateDialog.show()
9396
sys.exit(app.exec_())
94-

‎UiFiles/Ui_ErrorDialog.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\ErrorDialog.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormErrorDialog(object):
1215
def setupUi(self, FormErrorDialog):
1316
FormErrorDialog.setObjectName("FormErrorDialog")
@@ -113,4 +116,3 @@ def retranslateUi(self, FormErrorDialog):
113116
ui.setupUi(FormErrorDialog)
114117
FormErrorDialog.show()
115118
sys.exit(app.exec_())
116-

‎UiFiles/Ui_IssuesDialog.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\IssuesDialog.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormIssuesDialog(object):
1215
def setupUi(self, FormIssuesDialog):
1316
FormIssuesDialog.setObjectName("FormIssuesDialog")
@@ -126,4 +129,3 @@ def retranslateUi(self, FormIssuesDialog):
126129
ui.setupUi(FormIssuesDialog)
127130
FormIssuesDialog.show()
128131
sys.exit(app.exec_())
129-

‎UiFiles/Ui_LoginDialog.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\LoginDialog.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormLoginDialog(object):
1215
def setupUi(self, FormLoginDialog):
1316
FormLoginDialog.setObjectName("FormLoginDialog")
@@ -28,7 +31,7 @@ def setupUi(self, FormLoginDialog):
2831
self.gridLayout.addItem(spacerItem, 2, 2, 1, 1)
2932
spacerItem1 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
3033
self.gridLayout.addItem(spacerItem1, 1, 1, 1, 1)
31-
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
34+
spacerItem2 = QtWidgets.QSpacerItem(20, 70, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
3235
self.gridLayout.addItem(spacerItem2, 3, 1, 1, 1)
3336
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
3437
self.gridLayout.addItem(spacerItem3, 2, 0, 1, 1)
@@ -41,16 +44,10 @@ def setupUi(self, FormLoginDialog):
4144
self.lineEditAccount = QtWidgets.QLineEdit(self.widgetLoginEdit)
4245
self.lineEditAccount.setMinimumSize(QtCore.QSize(0, 30))
4346
self.lineEditAccount.setMaximumSize(QtCore.QSize(16777215, 30))
47+
self.lineEditAccount.setFocusPolicy(QtCore.Qt.ClickFocus)
4448
self.lineEditAccount.setAlignment(QtCore.Qt.AlignCenter)
4549
self.lineEditAccount.setObjectName("lineEditAccount")
4650
self.verticalLayout_2.addWidget(self.lineEditAccount)
47-
self.lineEditPassword = QtWidgets.QLineEdit(self.widgetLoginEdit)
48-
self.lineEditPassword.setMinimumSize(QtCore.QSize(0, 30))
49-
self.lineEditPassword.setMaximumSize(QtCore.QSize(16777215, 30))
50-
self.lineEditPassword.setEchoMode(QtWidgets.QLineEdit.Password)
51-
self.lineEditPassword.setAlignment(QtCore.Qt.AlignCenter)
52-
self.lineEditPassword.setObjectName("lineEditPassword")
53-
self.verticalLayout_2.addWidget(self.lineEditPassword)
5451
self.labelNotice = QtWidgets.QLabel(self.widgetLoginEdit)
5552
self.labelNotice.setMinimumSize(QtCore.QSize(0, 20))
5653
self.labelNotice.setText("")
@@ -104,22 +101,20 @@ def setupUi(self, FormLoginDialog):
104101
self.verticalLayout.addItem(spacerItem6)
105102

106103
self.retranslateUi(FormLoginDialog)
107-
self.lineEditPassword.returnPressed.connect(self.buttonLogin.click)
108104
self.buttonClose.clicked.connect(FormLoginDialog.reject)
109105
QtCore.QMetaObject.connectSlotsByName(FormLoginDialog)
110106

111107
def retranslateUi(self, FormLoginDialog):
112108
_translate = QtCore.QCoreApplication.translate
113109
FormLoginDialog.setWindowTitle(_translate("FormLoginDialog", "Login"))
114-
self.lineEditAccount.setPlaceholderText(_translate("FormLoginDialog", "Github Account"))
115-
self.lineEditPassword.setPlaceholderText(_translate("FormLoginDialog", "Github Password"))
110+
self.lineEditAccount.setPlaceholderText(_translate("FormLoginDialog", "Github Username"))
116111
self.buttonLogin.setText(_translate("FormLoginDialog", "Login"))
117112
self.labelRegister.setText(_translate("FormLoginDialog", "<html><head/><body><p><a href=\"https://github.com/join?source=login\"><span style=\" text-decoration: none; color:#ffffff;\">Register</span></a></p></body></html>"))
118113
self.labelForgot.setText(_translate("FormLoginDialog", "<html><head/><body><p><a href=\"https://github.com/password_reset\"><span style=\" text-decoration: none; color:#e6e6e6;\">Forgot?</span></a></p></body></html>"))
119-
120114
from Widgets.Buttons.ProgressButton import ProgressButton
121115
from Widgets.Buttons.RotateButton import RotateButton
122116

117+
123118
if __name__ == "__main__":
124119
import sys
125120
app = QtWidgets.QApplication(sys.argv)
@@ -128,4 +123,3 @@ def retranslateUi(self, FormLoginDialog):
128123
ui.setupUi(FormLoginDialog)
129124
FormLoginDialog.show()
130125
sys.exit(app.exec_())
131-

‎UiFiles/Ui_MainWindow.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\MainWindow.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormMainWindow(object):
1215
def setupUi(self, FormMainWindow):
1316
FormMainWindow.setObjectName("FormMainWindow")
@@ -147,7 +150,7 @@ def setupUi(self, FormMainWindow):
147150
self.verticalLayout_3.setObjectName("verticalLayout_3")
148151
self.webViewContent = QtWebKitWidgets.QWebView(self.widgetContents)
149152
self.webViewContent.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
150-
self.webViewContent.setUrl(QtCore.QUrl("about:blank"))
153+
self.webViewContent.setProperty("url", QtCore.QUrl("about:blank"))
151154
self.webViewContent.setObjectName("webViewContent")
152155
self.verticalLayout_3.addWidget(self.webViewContent)
153156
self.horizontalLayout_2.addWidget(self.widgetContents)
@@ -165,13 +168,13 @@ def retranslateUi(self, FormMainWindow):
165168
self.buttonGroup.setToolTip(_translate("FormMainWindow", "QQ Group"))
166169
self.buttonHome.setToolTip(_translate("FormMainWindow", "Home Page"))
167170
self.buttonBackToUp.setToolTip(_translate("FormMainWindow", "Back to Top"))
168-
169171
from PyQt5 import QtWebKitWidgets
170172
from Widgets.Buttons.RotateButton import RotateButton
171173
from Widgets.Buttons.RubberBandButton import RubberBandButton
172174
from Widgets.TreeView import TreeView
173175
from Widgets.WaterWidget import WaterWidget
174176

177+
175178
if __name__ == "__main__":
176179
import sys
177180
app = QtWidgets.QApplication(sys.argv)
@@ -180,4 +183,3 @@ def retranslateUi(self, FormMainWindow):
180183
ui.setupUi(FormMainWindow)
181184
FormMainWindow.show()
182185
sys.exit(app.exec_())
183-

‎UiFiles/Ui_PreviewWidget.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\PreviewWidget.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormPreviewWidget(object):
1215
def setupUi(self, FormPreviewWidget):
1316
FormPreviewWidget.setObjectName("FormPreviewWidget")
@@ -88,4 +91,3 @@ def retranslateUi(self, FormPreviewWidget):
8891
ui.setupUi(FormPreviewWidget)
8992
FormPreviewWidget.show()
9093
sys.exit(app.exec_())
91-

‎UiFiles/Ui_ScrollArea.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\ScrollArea.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormScrollArea(object):
1215
def setupUi(self, FormScrollArea):
1316
FormScrollArea.setObjectName("FormScrollArea")
@@ -49,4 +52,3 @@ def retranslateUi(self, FormScrollArea):
4952
ui.setupUi(FormScrollArea)
5053
FormScrollArea.show()
5154
sys.exit(app.exec_())
52-

‎UiFiles/Ui_SkinDialog.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Form implementation generated from reading ui file 'G:\Workspace\PyQtClient\UiFiles\SkinDialog.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.10.1
5+
# Created by: PyQt5 UI code generator 5.15.2
66
#
7-
# WARNING! All changes made in this file will be lost!
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
810

911
from PyQt5 import QtCore, QtGui, QtWidgets
1012

13+
1114
class Ui_FormSkinDialog(object):
1215
def setupUi(self, FormSkinDialog):
1316
FormSkinDialog.setObjectName("FormSkinDialog")
@@ -119,10 +122,10 @@ def retranslateUi(self, FormSkinDialog):
119122
self.tabWidgetSkinMain.setTabText(self.tabWidgetSkinMain.indexOf(self.tabPicture), _translate("FormSkinDialog", "Picture"))
120123
self.label.setText(_translate("FormSkinDialog", "Transparency"))
121124
self.buttonRestore.setText(_translate("FormSkinDialog", "Restore the default theme"))
122-
123125
from Widgets.Skins.ColourfulWidget import ColourfulWidget
124126
from Widgets.Skins.ThemeWidget import ThemeWidget
125127

128+
126129
if __name__ == "__main__":
127130
import sys
128131
app = QtWidgets.QApplication(sys.argv)
@@ -131,4 +134,3 @@ def retranslateUi(self, FormSkinDialog):
131134
ui.setupUi(FormSkinDialog)
132135
FormSkinDialog.show()
133136
sys.exit(app.exec_())
134-

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /