Skip to content

Commit

Permalink
console log update
Browse files Browse the repository at this point in the history
  • Loading branch information
MehmetYukselSekeroglu committed Feb 6, 2024
1 parent 8a9ede3 commit 5d374bb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions guilib/login_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from guilib.loginScreen import Ui_AuthenticationScreen

from hivelibrary import database_tools
from hivelibrary import console_tools

from PyQt5.QtWidgets import *
import sqlite3
Expand All @@ -11,6 +12,9 @@
class LoginScreen(QWidget):
def __init__(self, sqlite_cnn:sqlite3.Connection, sqlite_curosr:sqlite3.Cursor, targetWindow):
super().__init__()

console_tools.InformationPrinter("Starting login screen")

# set external varaibles
self.db_connections = sqlite_cnn
self.db_cursor = sqlite_curosr
Expand Down Expand Up @@ -41,19 +45,22 @@ def tryAuthenticate(self):
input_password = self.loginScreen.lineEdit_initralAuth_password.text()

if self.CURRENT_TRY >= self.MAX_LOGIN_TRY:
console_tools.WarnPrinter("Maximum trial limit exceeded, exiting the program")
self.exitProtocol()


authenticateStatus = database_tools.is_authenticated(username=input_username,password=input_password,db_cursor=self.db_cursor)

if authenticateStatus["success"] != True:
console_tools.ErrorPrinter("Wrong password or username")
err_text = f"Status: Failed, {str(self.MAX_LOGIN_TRY - self.CURRENT_TRY)} credit left."
self.loginScreen.label_4_authenticate_status.setText(err_text)
self.loginScreen.lineEdit_initralAuth_username.clear()
self.loginScreen.lineEdit_initralAuth_password.clear()
return

else:
console_tools.InformationPrinter("Authentication successfully")
self.hide()
self.targetMainWindow.show()

Expand Down
12 changes: 6 additions & 6 deletions hivelibrary/banner.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
BANNER_TEXT:str = """
____ _ ____ _ _
| _ \ _ __(_)_ __ ___ ___ / ___| ___ ___ _ _ _ __(_) |_ _ _
| |_) | '__| | '_ ` _ \ / _ \ \___ \ / _ \/ __| | | | '__| | __| | | |
| __/| | | | | | | | | __/ ___) | __/ (__| |_| | | | | |_| |_| |
|_| |_| |_|_| |_| |_|\___| |____/ \___|\___|\__,_|_| |_|\__|\__, |
|___/
_____ _ _ _ _ ____
|_ _| |__ ___| | | (_)_ _____ __ _|___ \
| | | '_ \ / _ \ |_| | \ \ / / _ \ \ \ / / __) |
| | | | | | __/ _ | |\ V / __/ \ V / / __/
|_| |_| |_|\___|_| |_|_| \_/ \___| \_/ |_____|
"""


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion main_icon_files_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -53764,7 +53764,7 @@
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x16\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x8c\xf9\xf5\x7c\xc7\
\x00\x00\x01\x8d\x1c\xb9\x18\x11\
"

qt_version = [int(v) for v in QtCore.qVersion().split('.')]
Expand Down
Binary file removed raw_ui_files/logo.png
Binary file not shown.

0 comments on commit 5d374bb

Please sign in to comment.