-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
987887a
commit 95a9d63
Showing
17 changed files
with
615 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Form implementation generated from reading ui file 'e:\NoTopDomain\libs\feedback.ui' | ||
# | ||
# Created by: PyQt5 UI code generator 5.15.9 | ||
# | ||
# 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_feedbacker(object): | ||
def setupUi(self, feedbacker): | ||
feedbacker.setObjectName("feedbacker") | ||
feedbacker.setWindowModality(QtCore.Qt.ApplicationModal) | ||
feedbacker.resize(399, 318) | ||
font = QtGui.QFont() | ||
font.setFamily("萍方0") | ||
feedbacker.setFont(font) | ||
self.gridLayout = QtWidgets.QGridLayout(feedbacker) | ||
self.gridLayout.setObjectName("gridLayout") | ||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) | ||
self.gridLayout.addItem(spacerItem, 3, 1, 1, 1) | ||
self.pushButton_2 = QtWidgets.QPushButton(feedbacker) | ||
self.pushButton_2.setEnabled(False) | ||
self.pushButton_2.setObjectName("pushButton_2") | ||
self.gridLayout.addWidget(self.pushButton_2, 4, 1, 1, 1) | ||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) | ||
self.gridLayout.addItem(spacerItem1, 4, 0, 1, 1) | ||
self.formLayout = QtWidgets.QFormLayout() | ||
self.formLayout.setObjectName("formLayout") | ||
self.label_3 = QtWidgets.QLabel(feedbacker) | ||
self.label_3.setObjectName("label_3") | ||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_3) | ||
self.textEdit = QtWidgets.QTextEdit(feedbacker) | ||
self.textEdit.setObjectName("textEdit") | ||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.textEdit) | ||
self.label = QtWidgets.QLabel(feedbacker) | ||
self.label.setObjectName("label") | ||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label) | ||
self.lineEdit = QtWidgets.QLineEdit(feedbacker) | ||
self.lineEdit.setObjectName("lineEdit") | ||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit) | ||
self.label_4 = QtWidgets.QLabel(feedbacker) | ||
self.label_4.setObjectName("label_4") | ||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_4) | ||
self.lineEdit_2 = QtWidgets.QLineEdit(feedbacker) | ||
self.lineEdit_2.setObjectName("lineEdit_2") | ||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.lineEdit_2) | ||
self.gridLayout.addLayout(self.formLayout, 2, 0, 1, 2) | ||
self.label_2 = QtWidgets.QLabel(feedbacker) | ||
self.label_2.setOpenExternalLinks(True) | ||
self.label_2.setObjectName("label_2") | ||
self.gridLayout.addWidget(self.label_2, 0, 0, 1, 2) | ||
|
||
self.retranslateUi(feedbacker) | ||
QtCore.QMetaObject.connectSlotsByName(feedbacker) | ||
|
||
def retranslateUi(self, feedbacker): | ||
_translate = QtCore.QCoreApplication.translate | ||
feedbacker.setWindowTitle(_translate("feedbacker", "反馈")) | ||
self.pushButton_2.setText(_translate("feedbacker", "发送反馈")) | ||
self.label_3.setText(_translate("feedbacker", "反馈内容:")) | ||
self.textEdit.setPlaceholderText(_translate("feedbacker", "作者建议你去github issue上提交呢...(必填)")) | ||
self.label.setText(_translate("feedbacker", "反馈标题")) | ||
self.lineEdit.setPlaceholderText(_translate("feedbacker", "必填")) | ||
self.label_4.setText(_translate("feedbacker", "联系方式/昵称")) | ||
self.lineEdit_2.setPlaceholderText(_translate("feedbacker", "选填")) | ||
self.label_2.setText(_translate("feedbacker", "<a href=\"https://github.com/LYXOfficial/notopdomain/issues\">去Github提交Issue</a href>")) |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from PyQt5.QtCore import * | ||
from PyQt5.QtWidgets import * | ||
from PyQt5.QtGui import * | ||
from threading import * | ||
import sys,base64 | ||
import datetime | ||
from . import mail,b64,Ui_feedback | ||
class Feedbacker(QWidget,Ui_feedback.Ui_feedbacker): | ||
ok=pyqtSignal() | ||
def __init__(self): | ||
super().__init__() | ||
self.setupUi(self) | ||
self.retranslateUi(self) | ||
self.setup() | ||
def Ok(self): | ||
QMessageBox.information(self,"提示","发送成功,感谢您的反馈!") | ||
self.close() | ||
def setup(self): | ||
self.ok.connect(self.Ok) | ||
self.icon=QPixmap() | ||
self.icon.loadFromData(base64.b64decode(b64.icon)) | ||
self.setWindowIcon(QIcon(self.icon)) | ||
self.pushButton_2.clicked.connect(lambda:Thread(target=self.send).start()) | ||
self.textEdit.textChanged.connect(self.sete) | ||
def sete(self): | ||
if self.textEdit.toPlainText().replace(" ","")=="" and self.lineEdit.text().replace(" ","")=="": | ||
self.pushButton_2.setDisabled(True) | ||
else: | ||
self.pushButton_2.setEnabled(True) | ||
def send(self): | ||
self.pushButton_2.setText("发送中...") | ||
self.pushButton_2.setEnabled(0) | ||
self.lineEdit.setEnabled(0) | ||
self.lineEdit_2.setEnabled(0) | ||
self.textEdit.setEnabled(0) | ||
mail.mail(c=self.textEdit.toPlainText(),t=self.lineEdit.text(),f=self.lineEdit_2.text()) | ||
self.ok.emit() | ||
def start(message): | ||
global window | ||
window=Feedbacker() | ||
window.textEdit.setText("我在使用NoTopDomain时,遇到了如下这个bug:\n"+message+"\n希望修复!!!") | ||
window.show() | ||
if __name__=="__main__": | ||
app = QApplication(sys.argv) | ||
window=Feedbacker() | ||
window.show() | ||
sys.exit(app.exec_()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>feedbacker</class> | ||
<widget class="QWidget" name="feedbacker"> | ||
<property name="windowModality"> | ||
<enum>Qt::ApplicationModal</enum> | ||
</property> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>399</width> | ||
<height>318</height> | ||
</rect> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<family>萍方0</family> | ||
</font> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>反馈</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="3" column="1"> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item row="4" column="1"> | ||
<widget class="QPushButton" name="pushButton_2"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="text"> | ||
<string>发送反馈</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="4" column="0"> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item row="2" column="0" colspan="2"> | ||
<layout class="QFormLayout" name="formLayout"> | ||
<item row="1" column="0"> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="text"> | ||
<string>反馈内容:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="1"> | ||
<widget class="QTextEdit" name="textEdit"> | ||
<property name="placeholderText"> | ||
<string>作者建议你去github issue上提交呢...(必填)</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>反馈标题</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1"> | ||
<widget class="QLineEdit" name="lineEdit"> | ||
<property name="placeholderText"> | ||
<string>必填</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QLabel" name="label_4"> | ||
<property name="text"> | ||
<string>联系方式/昵称</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="1"> | ||
<widget class="QLineEdit" name="lineEdit_2"> | ||
<property name="placeholderText"> | ||
<string>选填</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item row="0" column="0" colspan="2"> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string><a href="https://github.com/LYXOfficial/notopdomain/issues">去Github提交Issue</a href></string> | ||
</property> | ||
<property name="openExternalLinks"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import smtplib | ||
from email.mime.text import MIMEText | ||
from email.header import Header | ||
from email.utils import formataddr | ||
import os | ||
def mail(c="test",t="test",f=""): | ||
mail_host = "smtp-mail.outlook.com" | ||
mail_user = "ariasakafeedbacksforprogram@hotmail.com" | ||
mail_pass = "misakaMikoto0502" | ||
mail_nick = "NoTopDomain Feedback System" | ||
sender = 'ariasakafeedbacksforprogram@hotmail.com' | ||
receivers = ['lyx2010official@outlook.com'] | ||
content = c | ||
if f: | ||
content+="\nFrom %s"%f | ||
title = t | ||
message = MIMEText(content, 'plain', 'utf-8') | ||
message['From'] = formataddr([mail_nick, mail_user]) | ||
message['To'] = ",".join(receivers) | ||
message['Subject'] = title | ||
try: | ||
smtpObj = smtplib.SMTP(mail_host, 587) | ||
smtpObj.starttls() | ||
smtpObj.login(mail_user, mail_pass) | ||
smtpObj.sendmail(sender, receivers, message.as_string()) | ||
print("mail has been send successfully.") | ||
except smtplib.SMTPException as e: | ||
print(e) | ||
if __name__=="__main__": | ||
mail() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .system_hotkey import * |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//使用Nuitka打包程序 | ||
nuitka NoTopDomain.py --mingw64 --standalone --enable-plugin=pyqt5 --follow-import-to=pyqt5,sys,os,psutil,subprocess,b64,base64,random,webbrowser,math,json,hashlib,threading,win32api,win32con,win32gui,win32gui_struct,win32process,ctypes,Ui_NTD,system_hotkey --windows-icon-from-ico=app.ico --onefile --nofollow-imports --windows-disable-console | ||
//编译C++工具包动态链接库 | ||
# 使用Nuitka打包程序 | ||
nuitka NoTopDomain.py --mingw64 --standalone --windows-uac-admin --windows-uac-uiaccess --enable-plugin=pyqt5 --windows-icon-from-ico=app.ico --onefile --nofollow-imports --windows-disable-console | ||
# 编译C++工具包动态链接库 | ||
g++ -std=c++14 -o2 NTDTools.cpp -shared -o -s NTDTools.dll | ||
g++ -std=c++14 -o2 NTDTools.cpp -m32 -shared -o -s NTDTools32.dll |
This file was deleted.
Oops, something went wrong.